Can I tell if my process instance was finished via event subprocess or main flow

Hi, I want to know if is there a way for us to know if the process instance was finished on the main flow or the event subprocess. In both cases, the process instance ends up on COMPLETED state on the db.

Hi @fpiecho,

you could for example set different values to a specific variable for both end events.
Thereby you could see which end event was reached.

See the documentation for variables.

Cheers
Tobias

Hi @tmetzke!
That was my guessing, but I thought that may be there was a state that camunda stores on process instances that finishes through event subprocess.
Thanks for your answer!

Another option is that you can find out the path a finished process by using the History API to query where an instance has been.

1 Like