[
https://issues.jboss.org/browse/DROOLS-922?page=com.atlassian.jira.plugin...
]
Mario Fusco resolved DROOLS-922.
--------------------------------
Resolution: Rejected
I believe the loop is the behaviour you should expect with that given rule set. The
sequence of events there is:
* insertion of MyMessage( "ATrigger" )
* fireAllRules executes "Rule A Start" that inserts "A-StateGuard" and
"A-StartTimer"
* insertion of MyMessage( "BTrigger" )
* fireAllRules executes "Second State" that
# inserts "RuleFlow ended"
# triggers rule "CleanUp" that remove all the 3 Strings
# since there's no String "A-StartTimer" rule "Rule A Start" can
be triggered again inserting "A-StateGuard" and "A-StartTimer"
# the insertion of "A-StateGuard" also triggers again "Second State"
... that closes the loop that is executed until the timed rules remove
"A-StartTimer".
I think you could achieve what you wanted by NOT deleting the String
"A-StateGuard" in the consequence of rule "CleanUp".
Please reopen this ticket if you think that I'm overlooking something.
Drools Loops with this CEP test
-------------------------------
Key: DROOLS-922
URL:
https://issues.jboss.org/browse/DROOLS-922
Project: Drools
Issue Type: Bug
Reporter: David Weir
Assignee: Mario Fusco
Attachments: DroolsLoopingTest.java, MyMessage.java
I want to emulate the workflow style rules using state guards. When I run the attached,
it loops many times until the incoming event expires.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)