NOT COMPLETED - NEED TO FIND HOW TO RELATE FLOWS TOGETHER, workFilters ISN’t WORKING FOR ME
Update Data On An Existing Work Item When Submitting A Task
Video explanation
- Coming soon…
Steps to set up
- Create a new or use an existing workflow at the workflow that will be the source used to update other work items (I’ll call this the source workflow)
- Create a new or use an existing workflow (can even be the same workflow at the source workflow) that will be used to update work items in (I’ll call this the target workflow)
- Go into the workflow builder for the source 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 update of data in other work items
- “publishDataDirection”: “ToRelatedEntity”
- “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 source workflow”
- e.g. “$.taskOneInSourceWorkflow.sectionOne.textComponent”
- e.g. or “Explicit text value”
- 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”: “”
- }
- ],
- “updateType”: “Set”,
- “targetPath”: “$”,
- “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
- }
- “workFilters”: [
- {
- “targetPath”: “”,
- Similar to the “toProperty” property above
- An explicit value or a data path of a component from the source workflow that, if the value in it matches the “valuePath” property below then this work item will be updated, if it doesn’t match then this work item will not be updated
- “valuePath”: “”
- Similar to the “fromPath” property above
- An explicit value or a data path
- }
- ]