Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

iio888
Copy link

@iio888 iio888 commented Aug 14, 2024

fix #5823
Welcome to post suggestions.


This change is Reviewable

Send BreakSignal when executing End Activity
Check isBreaking when a child completed in Flowchart
@iio888
Copy link
Author

iio888 commented Aug 14, 2024

@dotnet-policy-service agree

Add test case of Breaking from a While which includes a Flowchart
Add test case of ending a flowchart when the end activity is nested in a If.
Add test case
Copy link
Member

@sfmskywalker sfmskywalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense. Only thing I'm unsure of is whether we should reuse the BreakSignal, or if it would be better to create a dedicated EndSignal. The former is intended to break out of a "scope" such as a for-each activity's Body, while the latter would be intended to complete the closest flowchart activity containing the End activity.

Thoughts?

@iio888
Copy link
Author

iio888 commented Aug 17, 2024

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

@iio888
Copy link
Author

iio888 commented Aug 19, 2024

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

@sfmskywalker
Copy link
Member

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.

@iio888 iio888 marked this pull request as draft August 20, 2024 01:22
@iio888 iio888 marked this pull request as ready for review August 20, 2024 02:49
@iio888 iio888 marked this pull request as draft September 2, 2024 12:12
@iio888 iio888 marked this pull request as ready for review September 5, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]Cannot break a Flowchart in While
2 participants