12-08-2014 04:03 PM
<message id="testMessage" name="testMessage"></message>
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="User Task1"></userTask>
<sequenceFlow id="flow2" sourceRef="scripttask1" targetRef="usertask1"></sequenceFlow>
<endEvent id="endevent2" name="End"></endEvent>
<scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>execution.setVariable("customerId", "1")</script>
</scriptTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="scripttask1"></sequenceFlow>
<boundaryEvent id="message" name="testMessage" attachedToRef="usertask1" cancelActivity="true">
<messageEventDefinition messageRef="testMessage"></messageEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow3" sourceRef="message" targetRef="endevent2"></sequenceFlow>
</process>
runtimeService.createExecutionQuery().messageEventSubscriptionName("testMessage").variableValueEqualsIgnoreCase("customerId", "1").singleResult()
This should work according to the user guide
def id1 = runtimeService.createExecutionQuery().messageEventSubscriptionName("testMessage").singleResult().id
def id2 = runtimeService.createExecutionQuery().variableValueEquals("customerId", "1").singleResult().id
assert id1 != id2
12-08-2014 05:18 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.