Bug 780950 (SOA-3417) - BusinessRulesProcessor action needs better support for stateful CEP scenarios
Summary: BusinessRulesProcessor action needs better support for stateful CEP scenarios
Keywords:
Status: MODIFIED
Alias: SOA-3417
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.2.0.ER4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0 GA
Assignee: Nobody
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks: 782575
TreeView+ depends on / blocked
 
Reported: 2011-09-26 13:18 UTC by Michael Pellegrini
Modified: 2021-10-15 11:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
cep_diff (17.39 KB, application/octet-stream)
2011-10-05 15:15 UTC, Kevin Conner
no flags Details
test-cep-esb.zip (12.43 KB, application/zip)
2011-10-05 18:30 UTC, Len DiMaggio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBESB-3698 0 Major Closed BusinessRulesProcessor action needs better support for stateful CEP scenarios 2014-08-26 21:10:55 UTC
Red Hat Issue Tracker SOA-3417 0 Major Closed BusinessRulesProcessor action needs better support for stateful CEP scenarios 2014-08-26 21:10:56 UTC

Description Michael Pellegrini 2011-09-26 13:18:43 UTC
project_key: SOA

In order to support common CEP scenarios, the BusinessRulesProcessor action needs an option to automatically control the lifecycle of the stateful knowledge session.

Currently, if using stateful knowledge sessions, you must control when the session is created, reused, and disposed of using message properties.  In a CEP scenario, there is no need for this lifecycle nor is it desired.

It would be better to have an option that will automatically create a new session upon receiving the first message and automatically reuse the existing session upon receiving subsequent messages. Dispose would not be needed as Drools automatically manages working memory in stream mode.

Comment 2 Anne-Louise Tangring 2011-09-27 19:12:52 UTC
Changing this at this point would have too big of an impact. 

Comment 3 Kevin Conner 2011-10-05 04:26:39 UTC
It is possible to use CEP, without referencing DISPOSE/CONTINUE, by defining the "org.jboss.soa.esb.services.rules.continueState" property within jbossesb-properties.xml as "true".  This will affect all references of stateful sessions as there is currently no way to specify this per action.

Comment 4 Michael Pellegrini 2011-10-05 11:55:34 UTC
I was aware of this option, and as you point out it could be too global of a setting in certain scenarios.  I still think it would be best to keep this setting as part of the jboss-esb.xml at the BRP action (or even a new CEP action).  For now, I worked around this using a custom action which controls the dispose/continue options based on receiving the first message or subsequent messages.

Comment 5 Kevin Conner 2011-10-05 15:15:09 UTC
Attached diff which enables default continue behaviour per action

Comment 6 Kevin Conner 2011-10-05 15:15:09 UTC
Attachment: Added: cep_diff


Comment 8 Len DiMaggio 2011-10-05 18:30:05 UTC
Attachment: Added: test-cep-esb.zip


Comment 9 tcunning 2011-10-07 01:14:33 UTC
Link: Added: This issue relates to JBESB-3698


Comment 10 tcunning 2011-10-07 01:19:26 UTC
Committed Kevin's patch to ESB, will be in ER5.


cunningts-imac:product cunningt$ svn commit


Sending        product/samples/quickstarts/business_ruleservice_cep/readme.txt
Sending        product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/RuleInfoBuilder.java
Sending        product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/RuleInfoImpl.java
Sending        product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/RuleServiceCallHelper.java
Sending        product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/StatefulRuleInfoImpl.java
Sending        product/services/jbrules/src/main/java/org/jboss/soa/esb/actions/BusinessRulesProcessor.java
Sending        product/services/jbrules/src/main/java/org/jboss/soa/esb/services/rules/RuleInfo.java
Sending        product/services/jbrules/src/main/java/org/jboss/soa/esb/services/rules/RuleServicePropertiesNames.java
Sending        product/services/jbrules/src/test/java/org/jboss/soa/esb/actions/BusinessRulesProcessorUnitTest.java
Transmitting file data .........
Committed revision 37516.
cunningts-imac:product cunningt$ 



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