Why is PROCESS_CANCELLED event sent from a terminate end event instead of PROCESS_COMPLETED?

I noticed recently that the TerminateEndEventActivityBehavior sends a PROCESS_CANCELLED event instead of a PROCESS_COMPLETED event. Can you share the reason behind why PROCESS_CANCELLED was chosen over PROCESS_COMPLETED? We have been thinking about this a bit since it impacts our event-driven service and feel PROCESS_COMPLETED might make more sense since the process designer modeled that the process should end when reaching this end event. Before deciding whether we should alter the behavior of flowable in our use case, we would first like to better understand the reason PROCESS_CANCELLED was chosen from your perspective. Any insight on this decision would be extremely helpful to us. Thanks!

Hi Rob,

I agree that a PROCESS_COMPLETED event would make more sense. But it would be even better to introduce a new event type PROCESS_COMPLETED_WITH_TERMINATE_END_EVENT I think. We also have this for the error end event. What do you think?



I think defining a separate event type makes sense since it allows a listener to identify how the process was completed. I’ll create a PR for this change.