Created attachment 545659 [details] Simple reproducer Description of problem: If the activation is cancelled by AgendaFilter (getCause() == FILTER) the Ruleflow stops at current Rule Task node and the process never ends. Version-Release number of selected component (if applicable): BRMS-5.3.0.dev5 How reproducible: Every time Steps to Reproduce: 1. Insert events to create Activations 2. Start process with rule task and add event listeners (Process, Agenda) 3. call fireAllRules with AgendaFilter parameter Actual results: Process is never finished nor it moves to next node once no activations are left to fire. Expected results: Process continues once all rules are fired and eventually completes. Additional info: Included workaround shows this problem on StatefulKnowledgeSession although the same problem is on stateless.
I'm not sure we should actually change the current behaviour. The purpose of the RuleSetNode is to only move forward when there are no more activations in the associated RuleFlowGroup. How these activations are fired is not really relevant (using fireAllRules, using reactive execution, or using filters). If you want a RuleFlowGroup to continue, I guess you could have a rule terminate all other activations, or use it in combination with for example an activation group, to make sure activations that were not triggered by the filter are cancelled. Doing this however by default is not recommended imho.
I agree that RuleSetNode should not continue when there are outstanding activations present but the cancelled activations are not outstanding. Calling fireAllRules will not reactivate them. In this context cancelled activation is the same as fired activation. There might be two possible solutions: - move from the RuleSetNode after (there are no more activations || all remaining activations are cancelled) - remove activations from agenda after cancellation
Ok, I'll need to check this in detail then, as if all the activations were cancelled, then the ruleflow group should indeed move forward. Maybe it's not listening to cancellations.
Mario Fusco <mario.fusco> made a comment on jira JBRULES-3376 The fix for the issue JBRULES-3374 also fixed this one
Mario Fusco <mario.fusco> updated the status of jira JBRULES-3376 to Resolved
Moving this to ON_QA as comment 5 suggests this has been fixed a while ago.
It works in 5.3.0.ER5
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.