Restarting a workflow on updating the workflow context

0
Hello All, I am trying out mendix workflow for a leave approval scenario. Leave Request is my WorkflowContext and it needs to be approved by Manager and HR. I was able to create this functionality and workflow creation and approvals working as expected. Now I wanted to add couple more extra features User can cancel the request by opening the Leave Request page and click on cancel, so workflow should be aborted (I know admin can abort a workflow from dashboard/ Approvers can reject) Restarting the workflow if Leave Request is updated I am trying to do this activities from WorkflowContext page but I am not able to get the workflow object for doing any operations
asked
1 answers
0

To abort a workflow (instance) you need to have the System.Workflow object and use the microflow activity "Change workflow state".  The System.Workflow object can be retrieved via the System.WorkflowUSerTask object and via the microflow activity "Retrieve workflows" (which takes the context object as parameter). The returned list contains all the workflows (instances) where this context object is used in. Mostly this is 1.

answered