0
我想在activiti中拋出並捕獲中間消息catch事件。但我不知道如何實施它。以下是我的bpmn,我通過中間消息事件將Web服務與其他人類談話鏈接起來。如何在activiti中發送消息
<?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>
我在做什麼錯誤或任何想法如何實現它。
現在我正在使用信號,但在捕捉它後仍然無法啓動其他用戶任務;我做錯了什麼?
<?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>
我是用信號做到的,但在捕獲中間信號捕捉器後卻沒有能夠觸發另一個用戶任務。 – user2746713
你能解釋一下用戶task2應該是受讓人的價值麼? name =「task2」activiti:assignee =「s1」 – user2746713