Discussion:
[jboss-user] [jBPM] - jBPM skips my rule task nodes except for the last rule task
John Joel Boss
2013-02-20 09:45:32 UTC
Permalink
John Joel Boss [https://community.jboss.org/people/jjsaguit] created the discussion

"jBPM skips my rule task nodes except for the last rule task"

To view the discussion, visit: https://community.jboss.org/message/798514#798514

--------------------------------------------------------------
using jbpm 5.4 with drools 5.5.0 and eclipse juno

I have a test project with a workflow that goes :

[start] --> [script printing "Hello 1"] --> [rule task node to print "Rule 1"] --> [script printing "Hello 2"] --> [rule task node to print "Rule 2"] --> [END]

The output is:
Hello 1
Hello 2
Rule 2

I used AgendaEventListener added to my ksession to fire the rules and I think it works just fine. Full post at https://community.jboss.org/thread/221486 https://community.jboss.org/thread/221486.


I built the KnowledgeBuilder as the following:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

// adding my workflow
                    kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn"), ResourceType.BPMN2);

// adding my first rule with ruleflow-group "test1"
                    kbuilder.add(ResourceFactory.newClassPathResource("test.xls"), ResourceType.DTABLE);

// adding my second rule with ruleflow-group "test2"
                    kbuilder.add(ResourceFactory.newClassPathResource("test1.xls"), ResourceType.DTABLE);


Funny thing because if I comment out my second rule the output would be:
Hello 1
Rule 1
Hello 2

It seems like its only firing the last rule in the list.

Any idea whats wrong?

Test project attached
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798514#798514]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
John Joel Boss
2013-02-20 10:25:10 UTC
Permalink
John Joel Boss [https://community.jboss.org/people/jjsaguit] created the discussion

"Re: jBPM skips my rule task nodes except for the last rule task"

To view the discussion, visit: https://community.jboss.org/message/798526#798526

--------------------------------------------------------------
FIXED finally, the problem was I had all rules with the same RuleTable name - a mistake you shouldn't make
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798526#798526]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...