Change Process Instance State

I am working on a prototype workflow. In this workflow, there is a series of tasks, and one task, lets call it verification, requires external systems work. The verification task may timeout, or. may return a result that will indicate the next step in the workflow.

What I’d like to be able to do is basically set the workflow to a specific step after this task completes. The reasoning is that depending on the result of verification, we might send them to one of many different next steps in the workflow.

Using Python is there a way to access the process instance in Camunda and change it to a specific next step in the workflow? I am using PyZeebe.


Hi @Brian_Teeter,

No, you can’t do this.

Here’s an ideological explanation of why I think this is not a good idea:

The model is the expression of the process. So if the token goes from Service Task A to Node X in the model, I can (should be able to) tell that by looking at the model itself. “Spooky action at a distance” with tokens teleporting around the model means that your process definition is now split between the model and arbitrary code.

So it is mixing concerns.

What you describe sounds to me like a conditional gateway after a service task?



Josh - thanks for the post. That is where I ended up, I now have a task that has conditional pathways depending on its output. It is simpler and follows the overall pattern much better.

Thanks - Brian

1 Like