Start Workflow

ID: startWorkflow

Starts a workflow with the given node placed into the payload.

Configuration

Property Type Required Default Description
model text true The ID of the workflow model to be used.
swimlanes object false Identifies principals to be assigned into workflow swimlanes. The structure is:
{
    "swimlane1": ["domainId1/principalId1"],
    "swimlane2": ["domainId2/principalId2"]
}
runtime object false Allows for manual specification of runtime properties including applicationId and emailProviderId. If not provided, these will be configured automatically by using the default OneTeam application and email provider.
context object false Allows for manual specification of optional contextual information. This includes the projectId to identify the project that this workflow should be bound to. If a project is not specified, the project will be automatically configured based on the runtime repository and its associated project.
data object false JSON object of arbitrary properties to be set to the workflow data payload.

Samples

  • Start a workflow that is assigned to a user and set data onto the workflow

This configuration will launch a workflow using the workflow model my:workflow-model. Upon launch, the approver swimlane will be auto-assigned to the user with ID 58f5592750164fd6c4a5 who is in Domain ab88fc27e082e8a1fc18.

The workflow instance will have it's workflow data properties initialized such that the purpose is set.

{
    "model": "my:workflow-model",
    "swimlanes": {
        "approver": ["ab88fc27e082e8a1fc18/58f5592750164fd6c4a5"]
    },
    "data": {
        "purpose": "Publish article to live website"
    }
}
  • Start a workflow using a custom email provider and bound to a specific project.
{
    "model": "my:workflow-model",
    "context": {
        "projectId": "ab88fc27e082e8a1fc18"
    },
    "runtime": {
        "applicationId": "58f5592750164fd6c4a5",
        "emailProviderId": "167e9abc43109e9e1482"
    }
}