12-28-2022 02:16 PM
We are using activiti workflow for poc but after intermediate time catch event our service task is not working fine. need some support here. below is my workflow please suggest modifications
<?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="Examples"> <process id="java-delegate-service-task-process" name="Activiti Service Task using Java Delegates" isExecutable="true"> <startEvent id="startevent1" name="Start"></startEvent> <serviceTask id="javadeletegateservicetask" name="Java Delegate Service Task" activiti:class="com.demo.taskprocessservice.JavaDelegateService"></serviceTask> <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="javadeletegateservicetask"></sequenceFlow> <endEvent id="endevent1" name="End"></endEvent> <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway> <sequenceFlow id="flow3" sourceRef="javadeletegateservicetask" targetRef="exclusivegateway1"></sequenceFlow> <subProcess id="subprocess1" name="Sub Process"> <multiInstanceLoopCharacteristics isSequential="true" activiti:collection="searchResults"></multiInstanceLoopCharacteristics> <startEvent id="startevent2" name="Start"></startEvent> <serviceTask id="servicetask1" name="sub-processTask" activiti:class="com.demo.taskprocessservice.subprocessjavadelegateservice"></serviceTask> <endEvent id="endevent2" name="End"></endEvent> <sequenceFlow id="flow4" sourceRef="startevent2" targetRef="servicetask1"></sequenceFlow> <sequenceFlow id="flow5" sourceRef="servicetask1" targetRef="endevent2"></sequenceFlow> </subProcess> <sequenceFlow id="flow6" sourceRef="subprocess1" targetRef="timerintermediatecatchevent1"></sequenceFlow> <sequenceFlow id="flow7" sourceRef="exclusivegateway1" targetRef="subprocess1"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input == 1}]]></conditionExpression> </sequenceFlow> <serviceTask id="servicetask2" name="print message" activiti:class="com.demo.taskprocessservice.javadelegatemessageservice"></serviceTask> <sequenceFlow id="flow8" sourceRef="exclusivegateway1" targetRef="servicetask2"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input == 1}]]></conditionExpression> </sequenceFlow> <endEvent id="endevent3" name="End"></endEvent> <sequenceFlow id="flow9" sourceRef="servicetask2" targetRef="endevent3"></sequenceFlow> <endEvent id="endevent4" name="End"></endEvent> <boundaryEvent id="boundaryerror1" name="Error" attachedToRef="subprocess1"> <errorEventDefinition errorRef="SAXException"></errorEventDefinition> </boundaryEvent> <sequenceFlow id="flow13" sourceRef="boundaryerror1" targetRef="servicetask4"></sequenceFlow> <serviceTask id="servicetask3" name="Pause Service Task" activiti:async="true" activiti:class="com.demo.taskprocessservice.publisherrormessage"></serviceTask> <serviceTask id="servicetask4" name="Error Service Task" activiti:class="com.demo.taskprocessservice.publisherrormessage"></serviceTask> <sequenceFlow id="flow14" sourceRef="servicetask4" targetRef="endevent4"></sequenceFlow> <sequenceFlow id="flow16" sourceRef="servicetask3" targetRef="endevent1"></sequenceFlow> <sequenceFlow id="flow17" sourceRef="timerintermediatecatchevent1" targetRef="servicetask3"></sequenceFlow> <intermediateCatchEvent id="timerintermediatecatchevent1" name="wait"> <timerEventDefinition> <timeDuration>PT5S</timeDuration> </timerEventDefinition> </intermediateCatchEvent> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_java-delegate-service-task-process"> <bpmndi:BPMNPlane bpmnElement="java-delegate-service-task-process" id="BPMNPlane_java-delegate-service-task-process"> <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> <omgdc:Bounds height="35.0" width="35.0" x="0.0" y="302.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="javadeletegateservicetask" id="BPMNShape_javadeletegateservicetask"> <omgdc:Bounds height="82.0" width="111.0" x="80.0" y="279.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> <omgdc:Bounds height="35.0" width="35.0" x="670.0" y="113.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1"> <omgdc:Bounds height="40.0" width="40.0" x="250.0" y="299.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"> <omgdc:Bounds height="161.0" width="358.0" x="33.0" y="50.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2"> <omgdc:Bounds height="35.0" width="35.0" x="43.0" y="120.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1"> <omgdc:Bounds height="55.0" width="105.0" x="140.0" y="110.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2"> <omgdc:Bounds height="35.0" width="35.0" x="310.0" y="120.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="boundaryerror1" id="BPMNShape_boundaryerror1"> <omgdc:Bounds height="30.0" width="30.0" x="378.0" y="50.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2"> <omgdc:Bounds height="55.0" width="105.0" x="360.0" y="292.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3"> <omgdc:Bounds height="35.0" width="35.0" x="660.0" y="302.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4"> <omgdc:Bounds height="35.0" width="35.0" x="600.0" y="47.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3"> <omgdc:Bounds height="55.0" width="105.0" x="530.0" y="103.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask4" id="BPMNShape_servicetask4"> <omgdc:Bounds height="55.0" width="105.0" x="464.0" y="37.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1" id="BPMNShape_timerintermediatecatchevent1"> <omgdc:Bounds height="35.0" width="35.0" x="464.0" y="113.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="35.0" y="319.0"></omgdi:waypoint> <omgdi:waypoint x="80.0" y="320.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> <omgdi:waypoint x="191.0" y="320.0"></omgdi:waypoint> <omgdi:waypoint x="250.0" y="319.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"> <omgdi:waypoint x="78.0" y="137.0"></omgdi:waypoint> <omgdi:waypoint x="140.0" y="137.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5"> <omgdi:waypoint x="245.0" y="137.0"></omgdi:waypoint> <omgdi:waypoint x="310.0" y="137.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"> <omgdi:waypoint x="391.0" y="130.0"></omgdi:waypoint> <omgdi:waypoint x="464.0" y="130.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="270.0" y="299.0"></omgdi:waypoint> <omgdi:waypoint x="212.0" y="211.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> <omgdi:waypoint x="290.0" y="319.0"></omgdi:waypoint> <omgdi:waypoint x="360.0" y="319.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9"> <omgdi:waypoint x="465.0" y="319.0"></omgdi:waypoint> <omgdi:waypoint x="660.0" y="319.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13"> <omgdi:waypoint x="408.0" y="65.0"></omgdi:waypoint> <omgdi:waypoint x="464.0" y="64.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14"> <omgdi:waypoint x="569.0" y="64.0"></omgdi:waypoint> <omgdi:waypoint x="600.0" y="64.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16"> <omgdi:waypoint x="635.0" y="130.0"></omgdi:waypoint> <omgdi:waypoint x="670.0" y="130.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17"> <omgdi:waypoint x="499.0" y="130.0"></omgdi:waypoint> <omgdi:waypoint x="530.0" y="130.0"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
Explore our Alfresco products with the links below. Use labels to filter content by product module.