public String startWorkflow(StartWorkflowRequest startWorkflowRequest) {
        Validate.notNull(startWorkflowRequest, "StartWorkflowRequest cannot be null");
        Validate.notBlank(startWorkflowRequest.getName(), "Workflow name cannot be null or empty");
        Validate.isTrue(
                StringUtils.isBlank(startWorkflowRequest.getExternalInputPayloadStoragePath()),
                "External Storage Path must not be set");

        String version =
                startWorkflowRequest.getVersion() != null
                        ? startWorkflowRequest.getVersion().toString()
                        : "latest";
        try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
            objectMapper.writeValue(byteArrayOutputStream, startWorkflowRequest.getInput());
            byte[] workflowInputBytes = byteArrayOutputStream.toByteArray();
            long workflowInputSize = workflowInputBytes.length;
            MetricsContainer.recordWorkflowInputPayloadSize(
                    startWorkflowRequest.getName(), version, workflowInputSize);
            if (workflowInputSize
                    > conductorClientConfiguration.getWorkflowInputPayloadThresholdKB() * 1024L) {
                if (!conductorClientConfiguration.isExternalPayloadStorageEnabled()
                        || (workflowInputSize
                                > conductorClientConfiguration
                                                .getWorkflowInputMaxPayloadThresholdKB()
                                        * 1024L)) {
                    String errorMsg =
                            String.format(
                                    "Input payload larger than the allowed threshold of: %d KB",
                                    conductorClientConfiguration
                                            .getWorkflowInputPayloadThresholdKB());
                    throw new ConductorClientException(errorMsg);
                } else {
                    MetricsContainer.incrementExternalPayloadUsedCount(
                            startWorkflowRequest.getName(),
                            ExternalPayloadStorage.Operation.WRITE.name(),
                            ExternalPayloadStorage.PayloadType.WORKFLOW_INPUT.name());
                    String externalStoragePath =
                            uploadToExternalPayloadStorage(
                                    ExternalPayloadStorage.PayloadType.WORKFLOW_INPUT,
                                    workflowInputBytes,
                                    workflowInputSize);
                    startWorkflowRequest.setExternalInputPayloadStoragePath(externalStoragePath);
                    startWorkflowRequest.setInput(null);
                }
            }
        } catch (IOException e) {
            String errorMsg =
                    String.format(
                            "Unable to start workflow:%s, version:%s",
                            startWorkflowRequest.getName(), version);
            LOGGER.error(errorMsg, e);
            MetricsContainer.incrementWorkflowStartErrorCount(startWorkflowRequest.getName(), e);
            throw new ConductorClientException(errorMsg, e);
        }
        try {
            return postForEntity(
                    "workflow",
                    startWorkflowRequest,
                    null,
                    String.class,
                    startWorkflowRequest.getName());
        } catch (ConductorClientException e) {
            String errorMsg =
                    String.format(
                            "Unable to send start workflow request:%s, version:%s",
                            startWorkflowRequest.getName(), version);
            LOGGER.error(errorMsg, e);
            MetricsContainer.incrementWorkflowStartErrorCount(startWorkflowRequest.getName(), e);
            throw e;
        }
    }
Starts a workflow. If the size of the workflow input payload is bigger than {@link
ConductorClientConfiguration#getWorkflowInputPayloadThresholdKB()}, it is uploaded to {@link
ExternalPayloadStorage}, if enabled, else the workflow is rejected.

@param startWorkflowRequest the {@link StartWorkflowRequest} object to start the workflow.
@return the id of the workflow instance that can be used for tracking.
@throws ConductorClientException if {@link ExternalPayloadStorage} is disabled or if the
    payload size is greater than {@link
    ConductorClientConfiguration#getWorkflowInputMaxPayloadThresholdKB()}.
@throws NullPointerException if {@link StartWorkflowRequest} is null or {@link
    StartWorkflowRequest#getName()} is null.
@throws IllegalArgumentException if {@link StartWorkflowRequest#getName()} is empty.
client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java