Skip to content

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

@EricoSC

Description

@EricoSC

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions