William Timpany [https://community.jboss.org/people/wtimpany] created the 
discussion

"intermediateCatchEvent - conditionalEventDefinition using drools"

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

--------------------------------------------------------------
Hi, hopefully someone can point me in the correct direction.   

I have a Fact that I want to check in an Intermediate Catch Event, I want to 
compare that Fact to a hardcoded "Yes/No" value and to a Process Instance 
variable that is in the ksession.

The process instance variable called "currentInstanceId" needs to be checked as 
part of the condition match.   I have hardcoded the "currentInstanceId" into 
the condition for the moment (and this works for testing). But I need to 
replace the hard coded "35036-1" is with a comparison to the id in the current 
process scope.

Any help would be appreciated.

FYI: the logic that I am trying to implement is: process goes along until a 
point is reached, where the process should wait until an Asset does not have 
any Infrastructure associated.  The process should wait until a matching Fact 
is inserted into working memory.  e.g. matching InstanceInfrastructureFact() is 
inserted with values matching the wait condition.

Java Excerpt
  
InstanceInfrastructureFact instanceInfrastructureFact = new 
InstanceInfrastructureFact();
instanceInfrastructureFact.setExists("No");
instanceInfrastructureFact.setInstanceId("35036-1");
ksession.insert(instanceInfrastructureFact); 




BPMN Excerpt

    <intermediateCatchEvent id="_5" name="Wait Until - Has Production 
Infrastructure is false" >
      <conditionalEventDefinition>
        <condition xsi:type="tFormalExpression" 
language="http://www.jboss.org/drools/rule";>InstanceInfrastructureFact(exists 
== "No", instanceId == "35036-1")</condition>
      </conditionalEventDefinition>
    </intermediateCatchEvent>
--------------------------------------------------------------

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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to