[jboss-user] [jBPM] - XOR split error - sequenceFlow condition not evaluating

Jason J do-not-reply at jboss.com
Fri Nov 2 23:07:01 EDT 2012


Jason J [https://community.jboss.org/people/jasonjho] created the discussion

"XOR split error - sequenceFlow condition not evaluating"

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

--------------------------------------------------------------
I just upgraded to Drools 5.5.0.CR1 and jBPM 5.4.0.CR1.

I have a workflow that has been working just fine on Drools 5.3.1.Final and jBPM 5.2.Final, but is breaking on the new version.

*Problem*
I have a diverging XOR gateway that is failing to evaluate on either branch.



<sequenceFlow id="_31-_43" sourceRef="_31" targetRef="_43" name="Saved" tns:priority="2" >
     <conditionExpression xsi:type="tFormalExpression" language="http://www.java.com/java" >
          
         QueryResults queryResults = kcontext.getKnowledgeRuntime().getQueryResults("Saved");
         Iterator iter = queryResults.iterator();
         if(!iter.hasNext()) {
           return false;
         }
         QueryResultsRow qResult = (QueryResultsRow)iter.next();
         SaveEvent se = (SaveEvent) qResult.get( "$saveEvent" );
         return se != null;
      </conditionExpression>
</sequenceFlow>
<sequenceFlow id="_31-_45" sourceRef="_31" targetRef="_45" name="Published" tns:priority="2" >
     <conditionExpression xsi:type="tFormalExpression" language="http://www.java.com/java" >          
         QueryResults queryResults = kcontext.getKnowledgeRuntime().getQueryResults("Published");
         Iterator iter = queryResults.iterator();
         if(!iter.hasNext()) {
           return false;
         }
         QueryResultsRow qResult = (QueryResultsRow)iter.next();
         PublishEvent pe = (PublishEvent) qResult.get( "$publishEvent" );
         return pe != null;
      </conditionExpression>
</sequenceFlow>



Here's an example of one of the rule queries that is being invoked:

query "Save"
     $processInstance : WorkflowProcessInstance()
     $saveEvent : SaveEvent()
end



The condition for either branch is based on the existence of a Fact in the working memory (thus, the need to use a rule query), and not a process variable which most conditions seem to be based on.


Is this a known regression?  I don't see why this would start failing on an upgraded deployment.

Thanks to anyone who can help.
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121102/55f71ec6/attachment.html 


More information about the jboss-user mailing list