From 6fe9c360675e4d584f12d6a471c0db0329003510 Mon Sep 17 00:00:00 2001 From: David Kaufmann <david.kaufmann@student.tuwien.ac.at> Date: Thu, 17 Jan 2019 02:44:30 +0100 Subject: [PATCH] make camunda.py terminate immediately and run process in background --- camunda-overlay/sentiment-analysis.bpmn | 86 +++++++++++++++++-------- 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/camunda-overlay/sentiment-analysis.bpmn b/camunda-overlay/sentiment-analysis.bpmn index ddf0053..62e29de 100644 --- a/camunda-overlay/sentiment-analysis.bpmn +++ b/camunda-overlay/sentiment-analysis.bpmn @@ -5,9 +5,9 @@ </bpmn:collaboration> <bpmn:process id="sentiment-analysis" name="Sentiment Analysis" isExecutable="true" camunda:versionTag="0.0.1"> <bpmn:laneSet id="LaneSet_1u08y0e" /> - <bpmn:sequenceFlow id="SequenceFlow_14nqu0e" sourceRef="service-report" targetRef="Task_1e7059p" /> + <bpmn:sequenceFlow id="SequenceFlow_14nqu0e" sourceRef="service-report" targetRef="IntermediateThrowEvent_0sns4tf" /> <bpmn:sequenceFlow id="SequenceFlow_0jebdb9" sourceRef="Task_1e7059p" targetRef="EndEvent_0bmuv13" /> - <bpmn:sequenceFlow id="SequenceFlow_15dip2q" sourceRef="StartEvent_1t6nxib" targetRef="terms_loop" /> + <bpmn:sequenceFlow id="SequenceFlow_15dip2q" sourceRef="StartEvent_1t6nxib" targetRef="IntermediateThrowEvent_193oik9" /> <bpmn:sequenceFlow id="SequenceFlow_1j2y6tv" sourceRef="terms_loop" targetRef="service-report" /> <bpmn:startEvent id="StartEvent_1t6nxib" camunda:formKey="embedded:deployment:input-terms.html"> <bpmn:extensionElements> @@ -18,6 +18,21 @@ execution.setVariable("results", S('[]'))</camunda:script> </bpmn:extensionElements> <bpmn:outgoing>SequenceFlow_15dip2q</bpmn:outgoing> </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0bmuv13"> + <bpmn:incoming>SequenceFlow_0jebdb9</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0o77usd" sourceRef="IntermediateThrowEvent_193oik9" targetRef="terms_loop" /> + <bpmn:userTask id="Task_1e7059p" name="download pdf" camunda:formKey="embedded:deployment:download-pdf.html"> + <bpmn:incoming>SequenceFlow_1mnqqvo</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0jebdb9</bpmn:outgoing> + </bpmn:userTask> + <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_193oik9"> + <bpmn:incoming>SequenceFlow_15dip2q</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0o77usd</bpmn:outgoing> + <bpmn:timerEventDefinition> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT0S</bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:intermediateCatchEvent> <bpmn:subProcess id="terms_loop"> <bpmn:extensionElements> <camunda:executionListener event="start"> @@ -42,7 +57,7 @@ results.append(item); execution.setVariable("results", S(results))</camunda:script> </camunda:executionListener> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_15dip2q</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0o77usd</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1j2y6tv</bpmn:outgoing> <bpmn:multiInstanceLoopCharacteristics camunda:collection="${terms.elements()}" camunda:elementVariable="term" /> <bpmn:serviceTask id="service-analysis" name="Analysis Service"> @@ -101,9 +116,6 @@ S(response);</camunda:script> <bpmn:incoming>SequenceFlow_1bz7zx2</bpmn:incoming> </bpmn:endEvent> </bpmn:subProcess> - <bpmn:endEvent id="EndEvent_0bmuv13"> - <bpmn:incoming>SequenceFlow_0jebdb9</bpmn:incoming> - </bpmn:endEvent> <bpmn:serviceTask id="service-report" name="Report Service"> <bpmn:extensionElements> <camunda:connector> @@ -216,10 +228,14 @@ file</camunda:script> <bpmn:incoming>SequenceFlow_1j2y6tv</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14nqu0e</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:userTask id="Task_1e7059p" name="download pdf" camunda:formKey="embedded:deployment:download-pdf.html"> + <bpmn:sequenceFlow id="SequenceFlow_1mnqqvo" sourceRef="IntermediateThrowEvent_0sns4tf" targetRef="Task_1e7059p" /> + <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_0sns4tf"> <bpmn:incoming>SequenceFlow_14nqu0e</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0jebdb9</bpmn:outgoing> - </bpmn:userTask> + <bpmn:outgoing>SequenceFlow_1mnqqvo</bpmn:outgoing> + <bpmn:timerEventDefinition> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT0S</bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:intermediateCatchEvent> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration"> @@ -227,59 +243,73 @@ file</camunda:script> <dc:Bounds x="0" y="0" width="1084" height="202" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="SubProcess_1skl2rb_di" bpmnElement="terms_loop" isExpanded="true"> - <dc:Bounds x="135" y="19" width="443" height="163" /> + <dc:Bounds x="188" y="19" width="443" height="163" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_01bq7a6_di" bpmnElement="service-analysis"> - <dc:Bounds x="381" y="60" width="100" height="80" /> + <dc:Bounds x="434" y="60" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1o2usc9_di" bpmnElement="service-twitter"> - <dc:Bounds x="230" y="60" width="100" height="80" /> + <dc:Bounds x="283" y="60" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_1nx6b6f_di" bpmnElement="StartEvent_parsing_term"> - <dc:Bounds x="156" y="82" width="36" height="36" /> + <dc:Bounds x="209" y="82" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0f6v4j4_di" bpmnElement="SequenceFlow_0f6v4j4"> - <di:waypoint x="192" y="100" /> - <di:waypoint x="230" y="100" /> + <di:waypoint x="245" y="100" /> + <di:waypoint x="283" y="100" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0g6bfz6_di" bpmnElement="SequenceFlow_0g6bfz6"> - <di:waypoint x="330" y="100" /> - <di:waypoint x="381" y="100" /> + <di:waypoint x="383" y="100" /> + <di:waypoint x="434" y="100" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1bz7zx2_di" bpmnElement="SequenceFlow_1bz7zx2"> - <di:waypoint x="481" y="100" /> - <di:waypoint x="516" y="100" /> + <di:waypoint x="534" y="100" /> + <di:waypoint x="569" y="100" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="StartEvent_1t6nxib_di" bpmnElement="StartEvent_1t6nxib"> <dc:Bounds x="56" y="83" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1gaqtzh_di" bpmnElement="service-report"> - <dc:Bounds x="619" y="61" width="100" height="80" /> + <dc:Bounds x="664" y="61" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="UserTask_0iooc2g_di" bpmnElement="Task_1e7059p"> - <dc:Bounds x="766" y="61" width="100" height="80" /> + <dc:Bounds x="889" y="61" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0bmuv13_di" bpmnElement="EndEvent_0bmuv13"> <dc:Bounds x="1024" y="83" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14nqu0e_di" bpmnElement="SequenceFlow_14nqu0e"> - <di:waypoint x="719" y="101" /> - <di:waypoint x="766" y="101" /> + <di:waypoint x="764" y="101" /> + <di:waypoint x="803" y="101" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0jebdb9_di" bpmnElement="SequenceFlow_0jebdb9"> - <di:waypoint x="866" y="101" /> + <di:waypoint x="989" y="101" /> <di:waypoint x="1024" y="101" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_15dip2q_di" bpmnElement="SequenceFlow_15dip2q"> <di:waypoint x="92" y="101" /> - <di:waypoint x="135" y="101" /> + <di:waypoint x="122" y="101" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1j2y6tv_di" bpmnElement="SequenceFlow_1j2y6tv"> - <di:waypoint x="578" y="101" /> - <di:waypoint x="619" y="101" /> + <di:waypoint x="631" y="101" /> + <di:waypoint x="664" y="101" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_07g109m_di" bpmnElement="EndEvent_parsing_term"> - <dc:Bounds x="516" y="82" width="36" height="36" /> + <dc:Bounds x="569" y="82" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0o77usd_di" bpmnElement="SequenceFlow_0o77usd"> + <di:waypoint x="158" y="101" /> + <di:waypoint x="188" y="101" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_1248i6u_di" bpmnElement="IntermediateThrowEvent_193oik9"> + <dc:Bounds x="122" y="83" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1mnqqvo_di" bpmnElement="SequenceFlow_1mnqqvo"> + <di:waypoint x="839" y="101" /> + <di:waypoint x="889" y="101" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_065fcij_di" bpmnElement="IntermediateThrowEvent_0sns4tf"> + <dc:Bounds x="803" y="83" width="36" height="36" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -- 2.43.0