> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/workflows/designing-workflows/processes/shape-repository/service-task/delegates/startworkflowinstance-delegate.md).

# 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        | Required | Description                                                                                                                                                     |
| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| processId         | Yes      | 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      | <p>The resource type of the workflow business item in string format, for example TE for a Term.</p><p>Required if <strong>resourceId</strong> is filled in.</p> |
| propertyKeyList   | No       | The key values for the workflow form properties as a comma separated list.                                                                                      |
| propertyValueList | Y/N      | <p>The values for the workflow form properties as a comma separated list.</p><p>Required if <strong>propertyKeyList</strong> is filled in.</p>                  |

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>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.collibra.com/workflows/designing-workflows/processes/shape-repository/service-task/delegates/startworkflowinstance-delegate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
