I want to throw and catch intermediate message catch event in activiti. But I don't know how to implement it. The following is my bpmn where I link between web service with other human talks by intermediate message event.
<?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: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/processdef">
<message id="msg" name="msg"></message>
<process id="process" isExecutable="true">
<startEvent id="start" name="start" activiti:initiator="initiator"></startEvent>
<serviceTask id="upload" name="upload project" activiti:exclusive="false" activiti:class="fitman.services.MyAuthUser_WS"></serviceTask>
<userTask id="provide" name="provide project details" activiti:assignee="${initiator}">
<extensionElements>
<activiti:formProperty id="user" name="user" type="user" required="true"></activiti:formProperty>
<activiti:formProperty id="name" name="name" type="string"></activiti:formProperty>
<activiti:formProperty id="toAddress" name="toAddress" type="string"></activiti:formProperty>
<activiti:formProperty id="subject" name="subject" type="string"></activiti:formProperty>
<activiti:formProperty id="textBody" name="textBody" type="string"></activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="sid-8D423749-D7C6-4617-843B-FC4B62CC2E0A" sourceRef="start" targetRef="provide"></sequenceFlow>
<sequenceFlow id="sid-50642463-711F-4AD0-ABFC-F1A383392D4D" sourceRef="provide" targetRef="upload"></sequenceFlow>
<sequenceFlow id="sid-9611F0F0-6CC0-4F56-8A7B-35624A0BB2D2" sourceRef="upload" targetRef="msg1"></sequenceFlow>
<userTask id="validate" name="validate" activiti:assignee="msg1"></userTask>
<sequenceFlow id="sid-B4044992-C9F3-47C8-A206-99CABAC46B6D" sourceRef="msg1" targetRef="validate"></sequenceFlow>
<endEvent id="end"></endEvent>
<sequenceFlow id="sid-163DD9FE-3708-4A6B-85FC-EB1E2354182B" sourceRef="validate" targetRef="end"></sequenceFlow>
<intermediateCatchEvent id="msg1" name="msg1">
<messageEventDefinition messageRef="msg"></messageEventDefinition>
</intermediateCatchEvent>
</process>
</definitions>
What I am doing wrong or any idea how to implement it.
Now I am using signal, but still unable to start other user task after catching it; What I am doing wrong?
<?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: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/processdef">
<signal id="newMsg" name="newMsg"></signal>
<process id="model1" isExecutable="true">
<startEvent id="start" activiti:initiator="initiator"></startEvent>
<userTask id="task1" name="task1" activiti:assignee="${initiator}">
<extensionElements>
<activiti:formProperty id="a" name="a" type="string"></activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="sid-16842953-EA94-42A2-B116-C68A98C85090" sourceRef="start" targetRef="task1"></sequenceFlow>
<sequenceFlow id="sid-E2E35140-E272-4D5C-88A1-CD1039E6672B" sourceRef="task1" targetRef="serv1"></sequenceFlow>
<sequenceFlow id="sid-9E02B791-B3C0-4B62-81BB-DA10424469DF" sourceRef="serv1" targetRef="s1"></sequenceFlow>
<intermediateCatchEvent id="s1" name="s1">
<signalEventDefinition signalRef="newMsg"></signalEventDefinition>
</intermediateCatchEvent>
<userTask id="task2" name="task2" activiti:assignee="s1">
<extensionElements>
<activiti:formProperty id="prenom" name="prenom" type="string"></activiti:formProperty>
<activiti:taskListener event="create" class="fitman.services.MyTaskListener"></activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-BC7E1EC1-6839-4440-A123-4127C00FAAA3" sourceRef="s1" targetRef="task2"></sequenceFlow>
<sequenceFlow id="sid-5A09EDC9-7B1F-4BAD-8D3B-DEB53A01768A" sourceRef="task2" targetRef="serv2"></sequenceFlow>
<sequenceFlow id="sid-1DCF980A-AB99-4839-A5BA-8900A1AA0D51" sourceRef="serv2" targetRef="end"></sequenceFlow>
<serviceTask id="serv1" name="serv1" activiti:class="fitman.services.MyAuthUser_WS"></serviceTask>
<serviceTask id="serv2" name="serv2" activiti:class="fitman.services.MyAuthUser_WS"></serviceTask>
<endEvent id="end" name="end"></endEvent>
</process>
</definitions>