04-13-2016 09:08 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" xmlns:tns="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<signal id="myActionSignal" name="My Action Completed Signal" activiti:scope="processInstance"></signal>
<message id="alertRcvd" name="alertRcvdMessage"></message>
<message id="myActionMessage" name="My Action Completed Message"></message>
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="messagestartevent1" name="Message start">
<messageEventDefinition messageRef="alertRcvd"></messageEventDefinition>
</startEvent>
<serviceTask id="mytask" name="My Service Task" activiti:async="true" activiti:delegateExpression="${myActionTask}"></serviceTask>
<scriptTask id="scripttask1" name="Script Task" scriptFormat="javascript" activiti:autoStoreVariables="false">
<script>print("Hello World. Service call completed.");</script>
</scriptTask>
<userTask id="usertask1" name="User Task"></userTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="messagestartevent1" targetRef="usertask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="scripttask1" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow5" sourceRef="usertask1" targetRef="mytask"></sequenceFlow>
<sequenceFlow id="flow6" sourceRef="boundarysignal1" targetRef="scripttask1"></sequenceFlow>
<boundaryEvent id="boundarysignal1" name="Action Completed Message" attachedToRef="mytask" cancelActivity="false">
<signalEventDefinition signalRef="myActionSignal"></signalEventDefinition>
</boundaryEvent>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="messagestartevent1" id="BPMNShape_messagestartevent1">
<omgdc:Bounds height="35.0" width="35.0" x="110.0" y="160.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="mytask" id="BPMNShape_mytask">
<omgdc:Bounds height="55.0" width="105.0" x="360.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="boundarysignal1" id="BPMNShape_boundarysignal1">
<omgdc:Bounds height="30.0" width="30.0" x="420.0" y="190.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">
<omgdc:Bounds height="55.0" width="105.0" x="515.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55.0" width="105.0" x="210.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="640.0" y="160.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="145.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="210.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="620.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="640.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="315.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="360.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="435.0" y="220.0"></omgdi:waypoint>
<omgdi:waypoint x="434.0" y="241.0"></omgdi:waypoint>
<omgdi:waypoint x="570.0" y="241.0"></omgdi:waypoint>
<omgdi:waypoint x="567.0" y="205.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
{
"message":"alertRcvdMessage",
}
{
"action":"signalEventReceived",
"signalName":"My Action Completed Signal"
}
{
"timestamp": 1460549262927,
"status": 500,
"error": "Internal Server Error",
"exception": "org.activiti.engine.ActivitiException",
"message": "Execution '12' has not subscribed to a signal event with name 'My Action Completed Signal'.",
"path": "/runtime/executions/12"
}
04-20-2016 09:21 AM
04-20-2016 10:28 AM
{
"action":"signal",
"signalName":"Some Signal"
}
.
public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception {
System.out.println("SignalName "+ signalName +"\n"+ "Signal Data "+ signalData);
leave(execution);
}
04-26-2016 06:53 AM
04-26-2016 09:41 PM
public void signal(ActivityExecution execution, String signalName, Object signalData){
if(signalName.equals("serviceCompletedSignal")){
add signalData to procVars;
leave();
}
else{// signalName.equals("allData is available")
add allData to procVars;
execute();
}
05-03-2016 07:41 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.