StartWorkflowInstance delegate
The StartWorkflowInstance delegate starts a new workflow instance for the given workflow processId. It is possible to specify the business item of the workflow that is to be started. All checks and authorizations will follow the same rules and logic as if the workflow was started form the REST or Component API layers.
Field name | Mandatory | Description |
---|---|---|
processId | Y | The process ID of the workflow you want to start. This is the ID in the workflow xml definition, for example approvalProcess. |
resourceId | Y/N | The resource ID of the workflow business item, if not provided, a 'global' workflow is started. |
resourceType | Y/N |
The resource type of the workflow business item in string format, for example TE for a Term. Mandatory if resourceId is filled in. |
propertyKeyList | N | The key values for the workflow form properties as a comma separated list. |
propertyValueList | Y/N |
The values for the workflow form properties as a comma separated list. Mandatory if propertyKeyList is filled in. |
The delegate is deprecated. Replace your service task containing this delegate with a script task, for example:
<scriptTask id="scripttask1" name="Start workflow" scriptFormat="groovy" activiti:autoStoreVariables="false"> <script><![CDATA[ import com.collibra.dgc.core.api.dto.workflow.StartWorkflowInstancesRequest; import com.collibra.dgc.core.api.model.workflow.WorkflowBusinessItemType; def workflowDefinitionId = workflowDefinitionApi.getWorkflowDefinitionByProcessId(subWorkflow).getId(); workflowInstanceApi.startWorkflowInstances(StartWorkflowInstancesRequest.builder() .workflowDefinitionId(workflowDefinitionId) .addBusinessItemId(string2Uuid(${targetTermId})) .businessItemType(WorkflowBusinessItemType.valueOf("ASSET")) .build()) ]]></script> </scriptTask>