I have a scenario if any workflow get error out, we creates a user task to resolve the error and after that i have to resume the workflow from where it got errored out. i have implemented this in my Camunda7 implementation. but i am curious if i can implement the same this in Camunda 8. for example
example.bpmn (5.8 KB)
in this workflow if service2 node gets errored out then then token will be transfer to error handler subprocess and it will create a user task. now i want to to resume the workflow from service2 after resolving the error and completing the user task. is this possible in camunda 8. please share if you have any example.
an event subprocess starting with an error event always interrupts the process execution and terminates it, once the subprocess (here the user task) is completed.
I’m curious about the hacks you did to continue the super process in Camunda 7.
In Camunda 8 are not as many APIs available to manipulate a process instance as in Camunda 8.
But you can start a new process instance with the same data and use the .startBeforeElement(elementId) parameter to skip the required activities.
Thank you for the quick response!!
sending the updated bpmn example.bpmn (6.5 KB)
so what i am doing i am passing the activity id and process instance id to the error handler process and after completing the user task resuming the worflow from where it errored out.
here is code to restart the workflow in camunda 7 .
Modification of the own process instance
Process instance modification within the same instance is not recommended! An activity which tries to modify its own process instance can cause undefined behavior, which should be avoided.
(It’s a quote from the docs, and it depends on the complexity of the BPMN diagram, the internal state of the process instance and concurrency of commands)
I haven’t dared to give it a try to modify my own process instance from a service task worker, as the quote from the docs applies to Camunda 8 as well.