I am trying to use API calls from within a Long Lived process instance to find running User Tasks, and end them.
I have a number of User Tasks in gateways that need to be terminated immediately when the 'Master' task reaches a complete status.
I need to end the tasks even if the user has not opened their task, or has it saved to draft.
I see methods for re-assigning a Task, and Canceling a Task.
The difficulty I am having is identifying the User Tasks for the specific Process Instance.
I see methods for searching for tasks by Process Name, but that brings back too many results from parallel processes.
I also don't see a process id to match to in the result set.
I can get the process id for the desired process as a variable within the executing process, so I would like to use it to filter the result set.
Is there a way to filter / search for tasks that belong to a given process id?
Any help will be greatly appreciated.
Retrieving data ...