Bug 766557 - ActivationCancelledEvent causes process to stay in current node
Summary: ActivationCancelledEvent causes process to stay in current node
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion), jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Mario Fusco
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-12 10:55 UTC by Tomas Schlosser
Modified: 2025-02-10 03:14 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:14:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple reproducer (2.30 KB, application/x-gzip)
2011-12-12 10:55 UTC, Tomas Schlosser
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBRULES-3376 0 Major Resolved ActivationCancelledEvent causes process to stay in current node 2013-08-20 09:18:47 UTC

Description Tomas Schlosser 2011-12-12 10:55:04 UTC
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.

Comment 1 Kris Verlaenen 2012-01-16 20:32:35 UTC
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.

Comment 2 Tomas Schlosser 2012-01-17 09:31:28 UTC
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

Comment 3 Kris Verlaenen 2012-01-17 12:52:33 UTC
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.

Comment 4 JBoss JIRA Server 2012-02-06 09:40:58 UTC
Mario Fusco <mario.fusco> made a comment on jira JBRULES-3376

The fix for the issue JBRULES-3374 also fixed this one

Comment 5 JBoss JIRA Server 2012-02-06 09:41:16 UTC
Mario Fusco <mario.fusco> updated the status of jira JBRULES-3376 to Resolved

Comment 6 Lukáš Petrovický 2012-03-20 17:22:36 UTC
Moving this to ON_QA as comment 5 suggests this has been fixed a while ago.

Comment 7 Tomas Schlosser 2012-04-17 08:43:39 UTC
It works in 5.3.0.ER5

Comment 11 Red Hat Bugzilla 2025-02-10 03:14:30 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.