elsa-core
elsa-core copied to clipboard
[FIX] cannot end a flowchart when a End is Then Activity in If
@dotnet-policy-service agree
Good idea! The EndSignal is better than BreakSignal exactly.
I’ll modify my code. Thanks for your advice
Now the End Activity will ends all the parent flowcharts. Is it will be better that just ends the last flowchart and stop propagation? @sfmskywalker
Yes, the End activity should only end the current Flowchart and not all of its ancestors. This is in contrast to the Finish activity, which is intended to finish the workflow from anywhere in the graph.
@sfmskywalker Hi. Any thoughts about this pr?
I am concerned about this PR and how it would adversely affect existing workflows. The way that I expect End activities to work is for them to end the current flow. If there is a single flow in the process, then it would effectively end the process. But if there are concurrent flows, only the flow that reached an End should stop - the other concurrent flows should continue until they reach their respective End activities (or complete all activities if no explicit End).
This would be a very breaking change for many workflows in our organization. And it would go against how End activities are treated in BPMN.
Perhaps there should be a new Terminate activity or something if this new behaviour is required.
I think that the current Elsa End activity would be equivalent to then BPMN None End.
The proposed new End behaviour would be equivalent to the BPMN Terminate End.
@bobhauser Thanks for chiming in. You're right, actually. The description of the End activity states as much: it's a milestone event, and an explicit way to mark the end of a sequence.
@iio888 what do you think of the suggestion to introduce a new activity called Terminate? Its effect should be equivalent to that of the BPMN's Terminate End, which (I think) is essentially the same behavior as the one you implemented for the End activity in this PR.
Maybe there is something mistakes in my code. What I want to fix is equivalent to None End actually. As in #5823, I found some potential problems when I am using End and If and I have no idea to change the original functionality of End.
Thanks for your suggestions.