Create New Work Items When Submitting a Task
- Creates a new work item upon the completion of a task in another workflow
- This can create a new work item in the same or different workflow
Video explanation
- Coming soon…
Steps to set up
- Create a new or use an existing workflow at the workflow that will trigger new work items to be created (I’ll call this the trigger workflow)
- Create a new or use an existing workflow (can even be the same workflow at the trigger workflow) that will be used to create new work items in (I’ll call this the target workflow)
- Go into the workflow builder for the trigger workflow (you need workflow owner permission to do this) then go into the Advanced Editor
- Add a new publish data activity in the task that you want to trigger the creation of new work and set the properties to this
- “operations”: [
- {
- “sectionName”: “{/sectionName}”
- The sectionName can be found on the target workflow’s task that you want the dataMapping to look at
- Go to the task page then look at the name property and take the value after the last slash (including the slash)
- e.g.
- If the value in the “name” property was "ecocystem/workflow/entity/generated-a153ef9d-bd50-4301-a358-a4713a8a566b/untitledstep__generated-9af54657-632b-42f3-a2a1-1d59ed426e93/untitledtask__generated-0ed276a7-a5f0-4276-8cab-b89369a36cd8”
- Then the sectionName would be “/untitledtask__generated-0ed276a7-a5f0-4276-8cab-b89369a36cd8”
- “dataMapping”: [
- {
- “fromPath”: “explicit value or data path of a component from the trigger workflow”
- e.g. “$.taskOneInTriggerWorkflow.sectionOne.textComponent”
- See the page on how to find data paths for more
- “toProperty”: “data path of a component from the target workflow”
- e.g. “$taskOneInTargetWorkflow.sectionOne.textComponent”
- },
- {
- You can optionally add in more object to the dataMapping property if you want to map more data to the new work item
- “fromPath”: “”
- “toProprty”: “”
- }
- ],
- “dataType”: “Object”
- }
- ],
- “relatedWork”: {
- “flowName”: “flowName”,
- You can find this in the “name” property in the “Properties” page in the target workflow
- “stepName”: “/stepName”,
- Can use the same value from the “sectionName” property above
- “targetName”: “target”,
- Can be anything, just used for labelling
- “sourceName”: “”
- Can be anything, just used for labelling
- “createWorkIfNotFound”: true
- }
- Publish both workflows
- Create work in the trigger workflow
- Submit the task that you set the publish data activity up on
- You will then see a newly created work item in your target workflow
- Done!