elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

[FIX] cannot end a flowchart when a End is Then Activity in If

Open iio888 opened this issue 1 year ago • 8 comments

fix #5823 Welcome to post suggestions.


This change is Reviewable

iio888 avatar Aug 14 '24 07:08 iio888

@dotnet-policy-service agree

iio888 avatar Aug 14 '24 07:08 iio888

Good idea! The EndSignal is better than BreakSignal exactly. I’ll modify my code. Thanks for your advice

iio888 avatar Aug 17 '24 06:08 iio888

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

iio888 avatar Aug 19 '24 07:08 iio888

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 avatar Aug 19 '24 11:08 sfmskywalker

@sfmskywalker Hi. Any thoughts about this pr?

iio888 avatar Sep 21 '24 07:09 iio888

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 avatar Sep 25 '24 15:09 bobhauser

@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.

sfmskywalker avatar Oct 03 '24 17:10 sfmskywalker

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.

iio888 avatar Oct 12 '24 06:10 iio888