[jboss-jira] [JBoss JIRA] (JBRULES-3411) Incorrect rule activation in flow

James Nord (JIRA) jira-events at lists.jboss.org
Mon Mar 5 06:33:37 EST 2012


     [ https://issues.jboss.org/browse/JBRULES-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Nord updated JBRULES-3411:
--------------------------------

    Attachment: Drools_flow bug.zip


Sample project which shows the issue.
                
> Incorrect rule activation in flow
> ---------------------------------
>
>                 Key: JBRULES-3411
>                 URL: https://issues.jboss.org/browse/JBRULES-3411
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.3.1.Final
>         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Maven home: c:\Java\maven-3.0.3\bin\..
> Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
> Java home: c:\java\jdk1.6.0_24\jre
> Default locale: en_GB, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
>            Reporter: James Nord
>            Assignee: Mark Proctor
>         Attachments: Drools_flow bug.zip
>
>
> In the attached project the flow should always be terminated by the raising of a signal.
> That is the following should be printed to stdout when run (jtn.test.flow.ProcessTest)
> {noformat}
>   pre sub process
>   Raising Failure Signal
>   Signal received!
>   main exiting
> {noformat}
> However if you change the signal_abort_test_group1.drl file to not activate the "say hello" rule by either commenting it out or changing the eval(true) to eval false then the signal is not raised - as can be seen by the stdout
> {noformat}
>   pre sub process
>   post sub process
>   pre human task
>   main exiting
> {noformat}
> (and the showing of the HumanTaskUI)
> As the "say hello" rule does not change any state of the working memory it should be completely irrelavent if it is activated or not as to the path the flow takes.
> (a copy of the rule file is shown below but is included in the sample project)
> {code:title=signal_abort_test_group1.drl}
> package org.jbpm.examples.request
> import org.drools.runtime.process.WorkflowProcessInstance
> // if the whole rule is commented out the "Cancellation of request" is never run.
> rule "say hello"
> ruleflow-group "abort"
> 	when
> 		// if this is set to false then the "Cancellation of request" is never run.
> 		eval(false)
> 	then
> 		System.out.println("I'm alive");
> end
> rule "Cancellation of request"
> ruleflow-group "abort"
> 	when
> 		p: WorkflowProcessInstance()
> 	then
> 		System.out.println("Raising Failure Signal");
> 		kcontext.getKnowledgeRuntime().signalEvent("Failure", null, p.getId());
> end
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list