Activiti 6.x【11】IntermediateEvent
生活随笔
收集整理的這篇文章主要介紹了
Activiti 6.x【11】IntermediateEvent
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
版權聲明:轉載注明出處就OK的說,有些東西會轉載,都會注明的說= =如果有冒犯麻煩見諒 https://blog.csdn.net/Pan1458689676/article/details/82728835
IntermediateEvent組件
- IntermediateEvent組件
- Demo1【Timer+Signal+Message】
- Demo2【Compensation+None】
- CompensationThrowingEvent注意事項【詳細可以參考官網】
IntermediateEvent分為拋出事件與捕獲事件。基本與邊界事件用法類似。依然以信號,消息,錯誤,時間為載體。具體分為六種。功能的話基本上直接翻譯就大致明白。
官網上也沒有詳細的描述,這里主要以兩個demo做講解。
Demo1【Timer+Signal+Message】
- 并行網關前三行為測試信號拋出中間事件與信號捕獲中間事件。
ServiceTask綁定如下【兩個都綁定了如下委托執行類】
ServiceTask
public class ServiceTask implements JavaDelegate {@Overridepublic void execute(DelegateExecution execution) {System.out.println("ServiceTask");} }- 并行網關第四行為測試消息捕獲中間事件。
ServiceTask綁定如下
ServiceTask
public class Message implements JavaDelegate {@Overridepublic void execute(DelegateExecution execution) {System.out.println("Message");} }- 并行網關之后為測試事件捕獲中間事件。
ServiceTask綁定如下
ServiceTask
public class Over implements JavaDelegate {@Overridepublic void execute(DelegateExecution execution) {System.out.println("Over");} }XML代碼
<?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="signalmsg" name="signalmsg"></signal><message id="msg" name="msgName"></message><process id="intermediate" name="My process" isExecutable="true"><startEvent id="startevent1" name="Start"></startEvent><parallelGateway id="parallelgateway1" name="Parallel Gateway"></parallelGateway><sequenceFlow id="flow1" sourceRef="startevent1" targetRef="parallelgateway1"></sequenceFlow><intermediateThrowEvent id="signalintermediatethrowevent1" name="SignalThrowEvent"><signalEventDefinition signalRef="signalmsg"></signalEventDefinition></intermediateThrowEvent><intermediateCatchEvent id="signalintermediatecatchevent1" name="SignalCatchEvent"><signalEventDefinition signalRef="signalmsg"></signalEventDefinition></intermediateCatchEvent><intermediateCatchEvent id="signalintermediatecatchevent2" name="SignalCatchEvent"><signalEventDefinition signalRef="signalmsg"></signalEventDefinition></intermediateCatchEvent><sequenceFlow id="flow2" sourceRef="parallelgateway1" targetRef="signalintermediatecatchevent1"></sequenceFlow><sequenceFlow id="flow3" sourceRef="parallelgateway1" targetRef="signalintermediatecatchevent2"></sequenceFlow><serviceTask id="servicetask1" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.ServiceTask"></serviceTask><sequenceFlow id="flow4" sourceRef="signalintermediatecatchevent1" targetRef="servicetask1"></sequenceFlow><serviceTask id="servicetask2" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.ServiceTask"></serviceTask><sequenceFlow id="flow5" sourceRef="signalintermediatecatchevent2" targetRef="servicetask2"></sequenceFlow><userTask id="usertask1" name="User Task"></userTask><sequenceFlow id="flow6" sourceRef="parallelgateway1" targetRef="usertask1"></sequenceFlow><sequenceFlow id="flow7" sourceRef="usertask1" targetRef="signalintermediatethrowevent1"></sequenceFlow><parallelGateway id="parallelgateway2" name="Parallel Gateway"></parallelGateway><sequenceFlow id="flow8" sourceRef="signalintermediatethrowevent1" targetRef="parallelgateway2"></sequenceFlow><sequenceFlow id="flow9" sourceRef="servicetask1" targetRef="parallelgateway2"></sequenceFlow><sequenceFlow id="flow10" sourceRef="servicetask2" targetRef="parallelgateway2"></sequenceFlow><intermediateCatchEvent id="messageintermediatecatchevent1" name="MessageCatchEvent"><messageEventDefinition messageRef="msg"></messageEventDefinition></intermediateCatchEvent><sequenceFlow id="flow12" sourceRef="parallelgateway1" targetRef="messageintermediatecatchevent1"></sequenceFlow><serviceTask id="servicetask3" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.Message"></serviceTask><sequenceFlow id="flow13" sourceRef="messageintermediatecatchevent1" targetRef="servicetask3"></sequenceFlow><sequenceFlow id="flow14" sourceRef="servicetask3" targetRef="parallelgateway2"></sequenceFlow><intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent"><timerEventDefinition><timeDuration>R1/PT5S</timeDuration></timerEventDefinition></intermediateCatchEvent><sequenceFlow id="flow15" sourceRef="parallelgateway2" targetRef="timerintermediatecatchevent1"></sequenceFlow><serviceTask id="servicetask4" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.Over"></serviceTask><sequenceFlow id="flow16" sourceRef="timerintermediatecatchevent1" targetRef="servicetask4"></sequenceFlow><endEvent id="endevent1" name="End"></endEvent><sequenceFlow id="flow17" sourceRef="servicetask4" targetRef="endevent1"></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_intermediate"><bpmndi:BPMNPlane bpmnElement="intermediate" id="BPMNPlane_intermediate"><bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"><omgdc:Bounds height="35.0" width="35.0" x="120.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1"><omgdc:Bounds height="40.0" width="40.0" x="230.0" y="197.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="signalintermediatethrowevent1" id="BPMNShape_signalintermediatethrowevent1"><omgdc:Bounds height="35.0" width="35.0" x="585.0" y="90.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="signalintermediatecatchevent1" id="BPMNShape_signalintermediatecatchevent1"><omgdc:Bounds height="35.0" width="35.0" x="410.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="signalintermediatecatchevent2" id="BPMNShape_signalintermediatecatchevent2"><omgdc:Bounds height="35.0" width="35.0" x="410.0" y="310.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1"><omgdc:Bounds height="55.0" width="105.0" x="550.0" y="190.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2"><omgdc:Bounds height="55.0" width="105.0" x="550.0" y="300.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"><omgdc:Bounds height="55.0" width="105.0" x="375.0" y="80.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="parallelgateway2" id="BPMNShape_parallelgateway2"><omgdc:Bounds height="40.0" width="40.0" x="770.0" y="197.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="messageintermediatecatchevent1" id="BPMNShape_messageintermediatecatchevent1"><omgdc:Bounds height="35.0" width="35.0" x="410.0" y="390.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3"><omgdc:Bounds height="55.0" width="105.0" x="550.0" y="380.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1" id="BPMNShape_timerintermediatecatchevent1"><omgdc:Bounds height="35.0" width="35.0" x="880.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask4" id="BPMNShape_servicetask4"><omgdc:Bounds height="55.0" width="105.0" x="960.0" y="190.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><omgdc:Bounds height="35.0" width="35.0" x="1140.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><omgdi:waypoint x="155.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="230.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><omgdi:waypoint x="270.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="410.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"><omgdi:waypoint x="250.0" y="237.0"></omgdi:waypoint><omgdi:waypoint x="250.0" y="327.0"></omgdi:waypoint><omgdi:waypoint x="410.0" y="327.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"><omgdi:waypoint x="445.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="550.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5"><omgdi:waypoint x="445.0" y="327.0"></omgdi:waypoint><omgdi:waypoint x="550.0" y="327.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"><omgdi:waypoint x="250.0" y="197.0"></omgdi:waypoint><omgdi:waypoint x="250.0" y="107.0"></omgdi:waypoint><omgdi:waypoint x="375.0" y="107.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"><omgdi:waypoint x="480.0" y="107.0"></omgdi:waypoint><omgdi:waypoint x="585.0" y="107.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"><omgdi:waypoint x="620.0" y="107.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="107.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="197.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9"><omgdi:waypoint x="655.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="770.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10"><omgdi:waypoint x="655.0" y="327.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="327.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="237.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12"><omgdi:waypoint x="250.0" y="237.0"></omgdi:waypoint><omgdi:waypoint x="250.0" y="407.0"></omgdi:waypoint><omgdi:waypoint x="410.0" y="407.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13"><omgdi:waypoint x="445.0" y="407.0"></omgdi:waypoint><omgdi:waypoint x="550.0" y="407.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14"><omgdi:waypoint x="655.0" y="407.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="407.0"></omgdi:waypoint><omgdi:waypoint x="790.0" y="237.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15"><omgdi:waypoint x="810.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="880.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16"><omgdi:waypoint x="915.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="960.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17"><omgdi:waypoint x="1065.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="1140.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>測試代碼
@Test public void Intermediate() throws InterruptedException{Deployment deployment = repositoryService.createDeployment().name("intermediate").addClasspathResource("bpmn/intermediate.bpmn").addClasspathResource("bpmn/intermediate.png").deploy();System.out.println("部署ID:"+deployment.getId());System.out.println("部署名稱:"+deployment.getName());ProcessInstance pi = runtimeService.startProcessInstanceByKey("intermediate");Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult();System.out.println("當前流程任務:" + task.getName());taskService.complete(task.getId());//發送message事件Execution ex = runtimeService.createExecutionQuery().processDefinitionId(pi.getProcessDefinitionId()).activityId("messageintermediatecatchevent1").singleResult();runtimeService.messageEventReceived("msgName", ex.getId());Thread.sleep(1000 *15); }Demo2【Compensation+None】
流程圖總覽
NoneThrowingEvent綁定
該事件通常用于指示流程中實現的某些狀態。一般用于做監聽。
ListenTest
public class ListenTest implements ExecutionListener {@Overridepublic void notify(DelegateExecution execution) {System.out.println("執行監聽");} }ServiceTask綁定
ServiceTask
public class ServiceTask implements JavaDelegate {@Overridepublic void execute(DelegateExecution execution) {System.out.println("ServiceTask");} }ServiceTask2
public class ServiceTask2 implements JavaDelegate {@Overridepublic void execute(DelegateExecution execution) {System.out.println("ServiceTask2");} }XML代碼
<?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"><process id="Middle" name="My process" isExecutable="true"><intermediateThrowEvent id="compensationintermediatethrowevent1" name="CompensationThrowingEvent"><compensateEventDefinition></compensateEventDefinition></intermediateThrowEvent><intermediateThrowEvent id="noneintermediatethrowevent1" name="NoneThrowEvent"><extensionElements><activiti:executionListener event="start" class="com.ptm.prdemo.servicetask.ListenTest"></activiti:executionListener></extensionElements></intermediateThrowEvent><startEvent id="startevent1" name="Start"></startEvent><serviceTask id="servicetask2" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.ServiceTask2"></serviceTask><serviceTask id="servicetask3" name="Service Task" activiti:class="com.ptm.prdemo.servicetask.ServiceTask"></serviceTask><sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask3"></sequenceFlow><sequenceFlow id="flow2" sourceRef="servicetask3" targetRef="servicetask2"></sequenceFlow><sequenceFlow id="flow3" sourceRef="servicetask2" targetRef="noneintermediatethrowevent1"></sequenceFlow><sequenceFlow id="flow4" sourceRef="noneintermediatethrowevent1" targetRef="compensationintermediatethrowevent1"></sequenceFlow><endEvent id="endevent1" name="End"></endEvent><sequenceFlow id="flow6" sourceRef="compensationintermediatethrowevent1" targetRef="endevent1"></sequenceFlow><serviceTask id="servicetask4" name="Service Task" isForCompensation="true" activiti:class="com.ptm.prdemo.servicetask.ServiceTask"></serviceTask><serviceTask id="servicetask5" name="Service Task" isForCompensation="true" activiti:class="com.ptm.prdemo.servicetask.ServiceTask2"></serviceTask><boundaryEvent id="boundarycompensation1" name="Compensate" attachedToRef="servicetask3" cancelActivity="true"><compensateEventDefinition></compensateEventDefinition></boundaryEvent><boundaryEvent id="boundarycompensation2" name="Compensate" attachedToRef="servicetask2" cancelActivity="true"><compensateEventDefinition></compensateEventDefinition></boundaryEvent><association id="association1" sourceRef="boundarycompensation1" targetRef="servicetask4"></association><association id="association2" sourceRef="boundarycompensation2" targetRef="servicetask5"></association></process><bpmndi:BPMNDiagram id="BPMNDiagram_Middle"><bpmndi:BPMNPlane bpmnElement="Middle" id="BPMNPlane_Middle"><bpmndi:BPMNShape bpmnElement="compensationintermediatethrowevent1" id="BPMNShape_compensationintermediatethrowevent1"><omgdc:Bounds height="35.0" width="35.0" x="530.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="noneintermediatethrowevent1" id="BPMNShape_noneintermediatethrowevent1"><omgdc:Bounds height="35.0" width="35.0" x="440.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"><omgdc:Bounds height="35.0" width="35.0" x="60.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2"><omgdc:Bounds height="55.0" width="105.0" x="280.0" y="190.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="boundarycompensation2" id="BPMNShape_boundarycompensation2"><omgdc:Bounds height="30.0" width="30.0" x="350.0" y="230.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3"><omgdc:Bounds height="55.0" width="105.0" x="130.0" y="190.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="boundarycompensation1" id="BPMNShape_boundarycompensation1"><omgdc:Bounds height="30.0" width="30.0" x="190.0" y="230.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"><omgdc:Bounds height="35.0" width="35.0" x="650.0" y="200.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask4" id="BPMNShape_servicetask4"><omgdc:Bounds height="55.0" width="105.0" x="200.0" y="290.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="servicetask5" id="BPMNShape_servicetask5"><omgdc:Bounds height="55.0" width="105.0" x="400.0" y="290.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"><omgdi:waypoint x="95.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="130.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"><omgdi:waypoint x="235.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="280.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"><omgdi:waypoint x="385.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="440.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"><omgdi:waypoint x="475.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="530.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"><omgdi:waypoint x="565.0" y="217.0"></omgdi:waypoint><omgdi:waypoint x="650.0" y="217.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="association1" id="BPMNEdge_association1"><omgdi:waypoint x="205.0" y="260.0"></omgdi:waypoint><omgdi:waypoint x="252.0" y="290.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="association2" id="BPMNEdge_association2"><omgdi:waypoint x="365.0" y="260.0"></omgdi:waypoint><omgdi:waypoint x="452.0" y="290.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>測試代碼
@Test public void Middle() throws InterruptedException{Deployment deployment = repositoryService.createDeployment().name("Middle").addClasspathResource("bpmn/Middle.bpmn").addClasspathResource("bpmn/Middle.png").deploy();System.out.println("部署ID:"+deployment.getId());System.out.println("部署名稱:"+deployment.getName());ProcessInstance pi = runtimeService.startProcessInstanceByKey("Middle"); }CompensationThrowingEvent注意事項【詳細可以參考官網】
CompensationThrowingEvent可用于觸發補償。
如果在包含子流程的范圍內拋出補償且子流程包含具有補償處理程序的活動,則補償僅在拋出補償時成功完成后才傳播到子流程。如果嵌套在子流程中的某些活動已完成并附加了補償處理程序,則如果尚未完成包含這些活動的子流程,則不會執行補償處理程序。
總結
以上是生活随笔為你收集整理的Activiti 6.x【11】IntermediateEvent的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Webhook与Jenkins自动构建(
- 下一篇: Slog64_项目上线之ArthurSl