06-23-2015 11:44 AM
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<signal id="SystemSignal" name="System Signal"></signal>
<process id="myProcessSignal" name="My process signal" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<subProcess id="subprocess1" name="Sub Process">
<serviceTask id="servicetask2" name="Service Task2" activiti:async="true" activiti:exclusive="false" activiti:class="testDelegates.TestDelegate"></serviceTask>
<startEvent id="startevent2" name="Start"></startEvent>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent2" targetRef="servicetask2"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="servicetask2" targetRef="endevent1"></sequenceFlow>
</subProcess>
<serviceTask id="servicetask1" name="Service Task1" activiti:async="true" activiti:exclusive="false" activiti:class="testDelegates.TestDelegate"></serviceTask>
<serviceTask id="servicetask3" name="Service Task3" activiti:async="true" activiti:exclusive="false" activiti:class="testDelegates.TestDelegate"></serviceTask>
<sequenceFlow id="flow4" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
<sequenceFlow id="flow5" sourceRef="servicetask1" targetRef="subprocess1"></sequenceFlow>
<serviceTask id="servicetask4" name="Service Task4" activiti:class="testDelegates.TestDelegateSignal"></serviceTask>
<sequenceFlow id="flow9" sourceRef="subprocess1" targetRef="servicetask3"></sequenceFlow>
<boundaryEvent id="systemSignalCatch" name="systemSignalCatch" attachedToRef="subprocess1" cancelActivity="true">
<signalEventDefinition signalRef="SystemSignal"></signalEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow10" sourceRef="systemSignalCatch" targetRef="servicetask4"></sequenceFlow>
<sequenceFlow id="flow11" sourceRef="servicetask3" targetRef="servicetask1"></sequenceFlow>
<endEvent id="terminateendevent1" name="TerminateEndEvent">
<terminateEventDefinition></terminateEventDefinition>
</endEvent>
<sequenceFlow id="flow12" sourceRef="servicetask4" targetRef="terminateendevent1"></sequenceFlow>
</process>
….
Execution exec = runtime.createExecutionQuery().signalEventSubscription("System Signal").singleResult();
if(exec != null){
runtime.signalEventReceived("System Signal", exec.getId());
}
06-24-2015 02:27 AM
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.