111 lines
5.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:process id="Process_error_events_e0p7cw9" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_17db3yp</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_17db3yp" sourceRef="StartEvent_1" targetRef="Activity_0qpzdpu" />
<bpmn:scriptTask id="Activity_0qpzdpu">
<bpmn:extensionElements>
<spiffworkflow:instructionsForEndUser>This is an example **Manual Task**. A **Manual Task** is designed to allow someone to complete a task outside of the system and then report back that it is complete. You can click the *Continue* button to proceed. When you are done running this process, you can edit the **Process Model** to include a:
* **Script Task** - write a short snippet of python code to update some data
* **User Task** - generate a form that collects information from a user
* **Service Task** - communicate with an external API to fetch or update some data.
You can also change the text you are reading here by updating the *Instructions* on this example manual task.</spiffworkflow:instructionsForEndUser>
</bpmn:extensionElements>
<bpmn:incoming>Flow_17db3yp</bpmn:incoming>
<bpmn:outgoing>Flow_12n5xe2</bpmn:outgoing>
<bpmn:script>from org.camunda.bpm.engine.delegate import BpmnError
try:
# Your script logic here
# For example, attempting to open a non-existent file
with open('non_existent_file.txt', 'r') as file:
data = file.read()
except Exception as e:
# Constructing error message
error_message = str(e)
# Throwing BPMN error with a specific error code and message
# "1001" is the error code, and error_message contains the exception details
raise BpmnError("1001", error_message)
</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_12n5xe2" sourceRef="Activity_0qpzdpu" targetRef="Activity_18bra6e" />
<bpmn:userTask id="Activity_18bra6e">
<bpmn:incoming>Flow_12n5xe2</bpmn:incoming>
<bpmn:outgoing>Flow_012hzon</bpmn:outgoing>
</bpmn:userTask>
<bpmn:endEvent id="Event_1dnvysa">
<bpmn:incoming>Flow_012hzon</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_012hzon" sourceRef="Activity_18bra6e" targetRef="Event_1dnvysa" />
<bpmn:subProcess id="Activity_020odjx" triggeredByEvent="true">
<bpmn:startEvent id="Event_0l2jt2r">
<bpmn:outgoing>Flow_1jvtnqw</bpmn:outgoing>
<bpmn:errorEventDefinition id="ErrorEventDefinition_1l4obyg" errorRef="Error_1sn2d0c" />
</bpmn:startEvent>
<bpmn:task id="Activity_1twc0ke">
<bpmn:incoming>Flow_1jvtnqw</bpmn:incoming>
<bpmn:outgoing>Flow_03t85p8</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_1jvtnqw" sourceRef="Event_0l2jt2r" targetRef="Activity_1twc0ke" />
<bpmn:endEvent id="Event_06ptq7h">
<bpmn:incoming>Flow_03t85p8</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_03t85p8" sourceRef="Activity_1twc0ke" targetRef="Event_06ptq7h" />
</bpmn:subProcess>
</bpmn:process>
<bpmn:error id="Error_1sn2d0c" name="Error_1sn2d0c" errorCode="1001" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_error_events_e0p7cw9">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1uyho6y_di" bpmnElement="Activity_0qpzdpu">
<dc:Bounds x="270" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0eiwtzl_di" bpmnElement="Activity_18bra6e">
<dc:Bounds x="430" y="137" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1dnvysa_di" bpmnElement="Event_1dnvysa">
<dc:Bounds x="592" y="159" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0738v3z_di" bpmnElement="Activity_020odjx" isExpanded="true">
<dc:Bounds x="170" y="270" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ef8tmt_di" bpmnElement="Event_0l2jt2r">
<dc:Bounds x="210" y="352" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1twc0ke_di" bpmnElement="Activity_1twc0ke">
<dc:Bounds x="300" y="330" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_06ptq7h_di" bpmnElement="Event_06ptq7h">
<dc:Bounds x="462" y="352" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1jvtnqw_di" bpmnElement="Flow_1jvtnqw">
<di:waypoint x="246" y="370" />
<di:waypoint x="300" y="370" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_03t85p8_di" bpmnElement="Flow_03t85p8">
<di:waypoint x="400" y="370" />
<di:waypoint x="462" y="370" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_17db3yp_di" bpmnElement="Flow_17db3yp">
<di:waypoint x="215" y="177" />
<di:waypoint x="270" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_12n5xe2_di" bpmnElement="Flow_12n5xe2">
<di:waypoint x="370" y="177" />
<di:waypoint x="430" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_012hzon_di" bpmnElement="Flow_012hzon">
<di:waypoint x="530" y="177" />
<di:waypoint x="592" y="177" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>