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

Possibility to choose the execution of all actions or not #596

Open
EricoSC opened this issue Mar 25, 2024 · 1 comment
Open

Possibility to choose the execution of all actions or not #596

EricoSC opened this issue Mar 25, 2024 · 1 comment

Comments

@EricoSC
Copy link

EricoSC commented Mar 25, 2024

Hi!

I'm doing experiments with this engine, where I'm simulating some real cases in my work and studying possibilities where my current scenario is not able to perform.

Looking deeper into this project, all actions linked to the rules will be executed.

image

The scenario I'm simulating is: When I have an entity that are parameters of the rule, and I have several rules that there are actions to be executed, I want only the first success/failure match to be executed.

I know that in the library there is a method where I can execute the action in isolation.
image

My idea is to use it for this purpose, where I can send the only first action decision to external APIs, but the engine is designed to execute all actions when registered in success or not

A quick fix would be to add a non-required boolean parameter in the ExecuteAllRulesAsync method that indicates that we don't want to execute the actions so no action will be performed after all the rules are executed, or add a property in the rule indicating that it is not to execute the given action, so we could have the choice that that rule can execute the action automatically without handling the ExecuteActionWorkflowAsync method for that rule.

@asulwer
Copy link

asulwer commented Jun 27, 2024

this project is no longer maintained but...my fork is. i can look into adding support for your question

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

No branches or pull requests

2 participants