Check if workflow has gone beyond a certain point

What is the best way to determine if a workflow has gone beyond a certain point in the flow. The use case is we need to understand what point it is up to to determine if we can inject data into the flow.

I can update a variable and then query for that variable to determine this as one option. Is there any way to get the exact task that an instance is up to. I have tried the processinstance rest api and task api but its unclear from the response which field points to the point in the workflow. Also, as the workflow could also include other bpmn constructs such as sub-processes, events and gateways whats the best api to use to see what part of the workflow it is currently executing or waiting at.

Regards

Brian

Hi Brian,

as you said you can create a variable. But there are also another possibilities e.g. find an execution with specific activityId and definitionId.
When you want to inject data into the process I would prefer message catching intermediate event to wait on and inject data.

Regards
Martin

Hi Martin,

That makes sense. Thanks.

Brian