Starts a workflow

@param startWorkflowRequest the {@link StartWorkflowRequest} object to start the workflow
@return the id of the workflow instance that can be used for tracking
508221
public String startWorkflow(StartWorkflowRequest startWorkflowRequest) {
        Preconditions.checkNotNull(startWorkflowRequest, "StartWorkflowRequest cannot be null");
        return stub.startWorkflow(
                protoMapper.toProto(startWorkflowRequest)
        ).getWorkflowId();
    }
860810
def find_workflow(workflow_name, custom_id)
      params = { ATTR_ID => custom_id, ATTR_NAME => workflow_name }
      params[ATTR_PROG] = PROG
      data = @http.get(instance_website_url(params))['data']
      data && @properties.object_from(
        data['name'],
        @serializer.decode(data['properties'])
      )
    rescue Zenaton::InternalError => exception
      return nil if exception.message =~ /No workflow instance found/
      raise exception
    end
680215
public WorkflowDef getWorkflowDef(String name, @Nullable Integer version) {
        Preconditions.checkArgument(StringUtils.isNotBlank(name), "name cannot be blank");

        MetadataServicePb.GetWorkflowRequest.Builder request =
                MetadataServicePb.GetWorkflowRequest.newBuilder()
                        .setName(name);

        if (version != null)
            request.setVersion(version);

        return protoMapper.fromProto(stub.getWorkflow(request.build()).getWorkflow());
    }
874997
@Override
    public AsyncContext startAsync() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.startAsync();
        } finally {
            collaborator.postInvoke();
        }
    }
1075212
@Override
    public final QueryResult execute(String queryId, LogicalWorkflow workflow) throws ConnectorException {
        QueryResult result = null;
        Long time = null;
        try {
            for (LogicalStep project : workflow.getInitialSteps()) {
                ClusterName clusterName = ((Project) project).getClusterName();
                connectionHandler.startJob(clusterName.getName());
            }
            if (logger.isDebugEnabled()) {
                logger.debug("Executing [" + workflow.toString() + "]");
            }
            time = System.currentTimeMillis();
            result = executeWorkFlow(workflow);

            if (logger.isDebugEnabled()) {
                logger.debug(
                        "The query has finished. The result form the query [" + workflow.toString() + "] has returned "
                                + "[" +
                                result
                                        .getResultSet()
                                        .size() + "] rows");

            }
        } finally {
            for (LogicalStep project : workflow.getInitialSteps()) {
                connectionHandler.endJob(((Project) project).getClusterName().getName());
            }
            if (time != null) {
                logger.info("TIME - The execute time has been [" + (System.currentTimeMillis() - time) + "]");
            }
        }
        return result;
    }
189581
def transaction_begin(self, **kwargs):
        
        self.__transaction_id += 1
        self.__transactions.add(self.__transaction_id)
        self.log.debug("Starting transaction with ID %d", self.__subscription_id)
        self._transaction_begin(self.__transaction_id, **kwargs)
        return self.__transaction_id
685806
protected boolean isWorkflowProject(CmsUUID projectId) {

        try {
            return m_workflowProjectStatus.get(projectId).booleanValue();
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return false;
        }
    }
690581
@RequestMapping(method = RequestMethod.GET, value = "/workflowInstance/{woinRefNum}",
            produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.TEXT_XML_VALUE})
    public ResponseEntity<WorkflowInstanceRestModel> find( @PathVariable long woinRefNum ){
        WorkflowInstanceState woin = facade.findWorkflowInstance( woinRefNum, null );
        if( woin == null ){
            return new ResponseEntity<>( HttpStatus.NOT_FOUND );
        }
        else{
            return new ResponseEntity<>( createInstanceModel( woin ), HttpStatus.OK );
        }
    }
947006
@Service
    public Task getPendingTaskForWorkflow(String workflowId, String taskReferenceName) {
        return executionService.getPendingTaskForWorkflow(taskReferenceName, workflowId);
    }
1117789
public GetStatFlowResponse getStatFlow(GetStatFlowRequest request) {
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, STAT, "flow");
        
        if (request.getStartTime() != null) {
            internalRequest.addParameter("startTime", DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        
        if (request.getDomain() != null) {
            internalRequest.addParameter("domain", request.getDomain());
        }
        
        if (request.getPeriod() != null) {
            internalRequest.addParameter("period", String.valueOf(request.getPeriod()));
        }
        
        if (request.isWithRegion()) {
            internalRequest.addParameter("withRegion", "");
        }
        return this.invokeHttpClient(internalRequest, GetStatFlowResponse.class);
    }
1008499
public void terminateWorkflow(String workflowId, String reason) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        delete(new Object[]{"reason", reason}, "workflow/{workflowId}", workflowId);
    }
60082
def start_process(self, process_name, when, process_run_id=None):
        # type: (Text, datetime.datetime, Optional[str]) -> str
        """"""
        if process_run_id is None:
            process_run_id = uuid.uuid4().urn
        prov_label = "Run of workflow/packed.cwl#main/" + process_name
        self.document.activity(
            process_run_id, None, None,
            {provM.PROV_TYPE: WFPROV["ProcessRun"],
             provM.PROV_LABEL: prov_label})
        self.document.wasAssociatedWith(
            process_run_id, self.engine_uuid, str("wf:main/" + process_name))
        self.document.wasStartedBy(
            process_run_id, None, self.workflow_run_uri,
            when, None, None)
        return process_run_id
1213773
public String updateWorkflow(Workflow workflow) {
        executionDAO.updateWorkflow(workflow);
        indexDAO.indexWorkflow(workflow);
        return workflow.getWorkflowId();
    }
283316
synchronized HttpRequest startRequest(HttpRequest request) {
		if (request == null) {
			throw new IllegalArgumentException("Request is null");
		}

		if (requestInjector != null) {
			request.setInjector(requestInjector);
		}

		registerRequest(request);
		dispatchRequest(request);
		notifyRequestStarted(request);

		return request;
	}
318573
public void setStartWorkspaceRequests(java.util.Collection<StartRequest> startWorkspaceRequests) {
        if (startWorkspaceRequests == null) {
            this.startWorkspaceRequests = null;
            return;
        }

        this.startWorkspaceRequests = new com.amazonaws.internal.SdkInternalList<StartRequest>(startWorkspaceRequests);
    }
1268959
public Task getPendingTaskForWorkflow(String workflowId, String taskReferenceName) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "Workflow id cannot be blank");
        Preconditions.checkArgument(StringUtils.isNotBlank(taskReferenceName), "Task reference name cannot be blank");

        return getForEntity("tasks/in_progress/{workflowId}/{taskRefName}", null, Task.class, workflowId, taskReferenceName);
    }
1198675
public function startWorkflow(DataObject $object, $workflowID = null)
    {
        $existing = $this->getWorkflowFor($object);
        if ($existing) {
            throw new ExistingWorkflowException(_t(
                'WorkflowService.EXISTING_WORKFLOW_ERROR',
                "That object already has a workflow running"
            ));
        }

        $definition = null;
        if ($workflowID) {
            // Retrieve the workflow definition that has been triggered.

            $definition = $this->getDefinitionByID($object, $workflowID);
        }
        if (is_null($definition)) {
            // Fall back to the main workflow definition.

            $definition = $this->getDefinitionFor($object);
        }

        if ($definition) {
            $instance = new WorkflowInstance();
            $instance->beginWorkflow($definition, $object);
            $instance->execute();
        }
    }