You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
288 lines
16 KiB
XML
288 lines
16 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
|
<bpmn2:collaboration id="Collaboration_12geczp">
|
|
<bpmn2:participant id="Participant_08rb9rc" name="Smardigo Management Action" processRef="smardigo-management-action" />
|
|
</bpmn2:collaboration>
|
|
<bpmn2:process id="smardigo-management-action" name="smardigo-management-action" isExecutable="true">
|
|
<bpmn2:startEvent id="Event_02kqmmg" camunda:asyncAfter="true">
|
|
<bpmn2:outgoing>Flow_1ow8whd</bpmn2:outgoing>
|
|
</bpmn2:startEvent>
|
|
<bpmn2:scriptTask id="Activity_1olpao9" name="ansible-start.groovy" scriptFormat="groovy" camunda:resource="ansible-start.groovy">
|
|
<bpmn2:incoming>Flow_1ow8whd</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_0qfq760</bpmn2:outgoing>
|
|
</bpmn2:scriptTask>
|
|
<bpmn2:sequenceFlow id="Flow_1ow8whd" sourceRef="Event_02kqmmg" targetRef="Activity_1olpao9" />
|
|
<bpmn2:sequenceFlow id="Flow_0qfq760" sourceRef="Activity_1olpao9" targetRef="Gateway_0n3j4hy" />
|
|
<bpmn2:sequenceFlow id="Flow_1nqz9ya" sourceRef="Activity_1hwc1va" targetRef="Activity_0wn3csk" />
|
|
<bpmn2:sequenceFlow id="Flow_1kxc9t0" sourceRef="Activity_0wn3csk" targetRef="Activity_12p300g" />
|
|
<bpmn2:sequenceFlow id="Flow_0tmasvl" name="simulation active " sourceRef="Gateway_0n3j4hy" targetRef="Gateway_0p57e80">
|
|
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">${simulation}</bpmn2:conditionExpression>
|
|
</bpmn2:sequenceFlow>
|
|
<bpmn2:sequenceFlow id="Flow_1cnt5hf" sourceRef="Activity_0kftgey" targetRef="Gateway_11tein2" />
|
|
<bpmn2:sequenceFlow id="Flow_1nuku1o" sourceRef="Activity_12p300g" targetRef="Event_0tax83l" />
|
|
<bpmn2:sequenceFlow id="Flow_0gcsmj7" sourceRef="Event_0tax83l" targetRef="Gateway_0p57e80" />
|
|
<bpmn2:sequenceFlow id="Flow_1rngywr" name="default" sourceRef="Gateway_0n3j4hy" targetRef="Activity_1ewqrs7" />
|
|
<bpmn2:sequenceFlow id="Flow_0npv638" sourceRef="Gateway_0p57e80" targetRef="Activity_136brby" />
|
|
<bpmn2:sequenceFlow id="Flow_1ju13h8" sourceRef="Activity_136brby" targetRef="Event_0hla739" />
|
|
<bpmn2:exclusiveGateway id="Gateway_0n3j4hy" default="Flow_1rngywr">
|
|
<bpmn2:incoming>Flow_0qfq760</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_0tmasvl</bpmn2:outgoing>
|
|
<bpmn2:outgoing>Flow_1rngywr</bpmn2:outgoing>
|
|
</bpmn2:exclusiveGateway>
|
|
<bpmn2:callActivity id="Activity_1ewqrs7" name="Management Benachrichtigung senden" calledElement="smardigo-management-message">
|
|
<bpmn2:extensionElements>
|
|
<camunda:in businessKey="#{execution.processBusinessKey}" />
|
|
<camunda:in variables="all" />
|
|
<camunda:in sourceExpression="Neue Aufgabe" target="activityTitle" />
|
|
<camunda:in sourceExpression="${smardigoManagementAction}" target="activitySubtitle" />
|
|
<camunda:in source="simulation" target="simulation" />
|
|
</bpmn2:extensionElements>
|
|
<bpmn2:incoming>Flow_1rngywr</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1xdj53u</bpmn2:outgoing>
|
|
</bpmn2:callActivity>
|
|
<bpmn2:sequenceFlow id="Flow_1xdj53u" sourceRef="Activity_1ewqrs7" targetRef="Activity_0kftgey" />
|
|
<bpmn2:sequenceFlow id="Flow_065a4cq" name="job_template_id found" sourceRef="Gateway_11tein2" targetRef="Activity_1hwc1va">
|
|
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">${job_template_id != -1}</bpmn2:conditionExpression>
|
|
</bpmn2:sequenceFlow>
|
|
<bpmn2:exclusiveGateway id="Gateway_0p57e80">
|
|
<bpmn2:incoming>Flow_0gcsmj7</bpmn2:incoming>
|
|
<bpmn2:incoming>Flow_0tmasvl</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_0npv638</bpmn2:outgoing>
|
|
</bpmn2:exclusiveGateway>
|
|
<bpmn2:endEvent id="Event_0hla739">
|
|
<bpmn2:incoming>Flow_1ju13h8</bpmn2:incoming>
|
|
</bpmn2:endEvent>
|
|
<bpmn2:scriptTask id="Activity_136brby" name="ansible-end.groovy" scriptFormat="groovy" camunda:resource="ansible-end.groovy">
|
|
<bpmn2:incoming>Flow_0npv638</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1ju13h8</bpmn2:outgoing>
|
|
</bpmn2:scriptTask>
|
|
<bpmn2:intermediateCatchEvent id="Event_0tax83l" name="Ausführung der Aktion abwarten">
|
|
<bpmn2:incoming>Flow_1nuku1o</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_0gcsmj7</bpmn2:outgoing>
|
|
<bpmn2:messageEventDefinition id="MessageEventDefinition_193tmaa" messageRef="Message_13oyyv2" />
|
|
</bpmn2:intermediateCatchEvent>
|
|
<bpmn2:scriptTask id="Activity_12p300g" name="Aktuelle Job Id übernehmen" scriptFormat="groovy">
|
|
<bpmn2:incoming>Flow_1kxc9t0</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1nuku1o</bpmn2:outgoing>
|
|
<bpmn2:script>def process = processes.byId(contextScopeId, contextProcessId)
|
|
|
|
if(awxResponse != null && awxResponse.job != null) {
|
|
def jobs = process.getVariable('jobs')
|
|
jobs = !!jobs ? jobs : []
|
|
jobs.add(0, awxResponse.job)
|
|
|
|
process.setVariable('jobs', jobs)
|
|
process.setVariable('current_job_id', awxResponse.job)
|
|
process.createComment('current_job_id := ' + awxResponse.job)
|
|
} else {
|
|
process.createComment('current_job_error: response-code: ' + awxResponseCode + ' - response-body: ' + awxResponse)
|
|
}
|
|
</bpmn2:script>
|
|
</bpmn2:scriptTask>
|
|
<bpmn2:task id="Activity_1hwc1va" name="AWX REST-Parameter erzeugen">
|
|
<bpmn2:extensionElements>
|
|
<camunda:inputOutput>
|
|
<camunda:outputParameter name="awxPath">/api/v2/job_templates/${job_template_id}/launch/</camunda:outputParameter>
|
|
<camunda:outputParameter name="extra_vars">
|
|
<camunda:script scriptFormat="groovy" resource="create-awx-parameters.groovy" />
|
|
</camunda:outputParameter>
|
|
</camunda:inputOutput>
|
|
</bpmn2:extensionElements>
|
|
<bpmn2:incoming>Flow_065a4cq</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1nqz9ya</bpmn2:outgoing>
|
|
</bpmn2:task>
|
|
<bpmn2:serviceTask id="Activity_0wn3csk" name="AWX Provisionierung starten" camunda:delegateExpression="${rest.post('awx', awxPath).responseJSONObject('awxResponse').responseCode('awxResponseCode').bodyJSONMap(awxRequestBody)}">
|
|
<bpmn2:extensionElements>
|
|
<camunda:inputOutput>
|
|
<camunda:inputParameter name="awxRequestBody">
|
|
<camunda:map>
|
|
<camunda:entry key="extra_vars">${extra_vars}</camunda:entry>
|
|
</camunda:map>
|
|
</camunda:inputParameter>
|
|
</camunda:inputOutput>
|
|
</bpmn2:extensionElements>
|
|
<bpmn2:incoming>Flow_1nqz9ya</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1kxc9t0</bpmn2:outgoing>
|
|
</bpmn2:serviceTask>
|
|
<bpmn2:exclusiveGateway id="Gateway_11tein2">
|
|
<bpmn2:incoming>Flow_1cnt5hf</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_065a4cq</bpmn2:outgoing>
|
|
<bpmn2:outgoing>Flow_0mtnk56</bpmn2:outgoing>
|
|
</bpmn2:exclusiveGateway>
|
|
<bpmn2:sequenceFlow id="Flow_0mtnk56" name="job_template_id not found" sourceRef="Gateway_11tein2" targetRef="Event_1bfppnu">
|
|
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">${job_template_id == -1}</bpmn2:conditionExpression>
|
|
</bpmn2:sequenceFlow>
|
|
<bpmn2:endEvent id="Event_1bfppnu" name="job_template_id not found">
|
|
<bpmn2:incoming>Flow_0mtnk56</bpmn2:incoming>
|
|
<bpmn2:errorEventDefinition id="ErrorEventDefinition_1ww36kh" errorRef="Error_1m76bd5" />
|
|
</bpmn2:endEvent>
|
|
<bpmn2:scriptTask id="Activity_0kftgey" name="Aktuelle Job Id übernehmen" scriptFormat="groovy" camunda:resultVariable="job_template_id">
|
|
<bpmn2:incoming>Flow_1xdj53u</bpmn2:incoming>
|
|
<bpmn2:outgoing>Flow_1cnt5hf</bpmn2:outgoing>
|
|
<bpmn2:script>def templates = datasources.query('awx-job-templates').processScope(contextScopeId, contextProcessId).parameters([name:smardigoManagementAction]).list();
|
|
|
|
templates.size()==0 ? -1 : templates[0]['id'];</bpmn2:script>
|
|
</bpmn2:scriptTask>
|
|
<bpmn2:endEvent id="Event_1gny0cr" name="job_template_id not readable">
|
|
<bpmn2:incoming>Flow_0ny162r</bpmn2:incoming>
|
|
<bpmn2:errorEventDefinition id="ErrorEventDefinition_1t2wut9" errorRef="Error_1vjes4v" />
|
|
</bpmn2:endEvent>
|
|
<bpmn2:boundaryEvent id="Event_07ol7ch" attachedToRef="Activity_0kftgey">
|
|
<bpmn2:outgoing>Flow_0ny162r</bpmn2:outgoing>
|
|
<bpmn2:errorEventDefinition id="ErrorEventDefinition_0yv2don" />
|
|
</bpmn2:boundaryEvent>
|
|
<bpmn2:sequenceFlow id="Flow_0ny162r" sourceRef="Event_07ol7ch" targetRef="Event_1gny0cr" />
|
|
<bpmn2:textAnnotation id="TextAnnotation_0bt6e0d">
|
|
<bpmn2:text>Anmerkung
|
|
* teams-Benachrichtigung nur, wenn teams_channel_url exisitiert</bpmn2:text>
|
|
</bpmn2:textAnnotation>
|
|
</bpmn2:process>
|
|
<bpmn2:message id="Message_13oyyv2" name="action-executed-${execution.getVariable('smardigoManagementAction')}" />
|
|
<bpmn2:error id="Error_1m76bd5" name="job_template_id not found" errorCode="200" camunda:errorMessage="job_template_id not found" />
|
|
<bpmn2:error id="Error_1vjes4v" name="job_template_id not readable" errorCode="100" camunda:errorMessage="job_template_id not readable" />
|
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_12geczp">
|
|
<bpmndi:BPMNShape id="Participant_08rb9rc_di" bpmnElement="Participant_08rb9rc" isHorizontal="true">
|
|
<dc:Bounds x="350" y="150" width="1700" height="420" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_02kqmmg_di" bpmnElement="Event_02kqmmg">
|
|
<dc:Bounds x="402" y="392" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1olpao9_di" bpmnElement="Activity_1olpao9">
|
|
<dc:Bounds x="470" y="370" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0n3j4hy_di" bpmnElement="Gateway_0n3j4hy" isMarkerVisible="true">
|
|
<dc:Bounds x="605" y="385" width="50" height="50" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1ewqrs7_di" bpmnElement="Activity_1ewqrs7" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
|
|
<dc:Bounds x="720" y="370" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_0p57e80_di" bpmnElement="Gateway_0p57e80" isMarkerVisible="true">
|
|
<dc:Bounds x="1715" y="385" width="50" height="50" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0kni7xh_di" bpmnElement="Event_0hla739">
|
|
<dc:Bounds x="1952" y="392" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_136brby_di" bpmnElement="Activity_136brby">
|
|
<dc:Bounds x="1810" y="370" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0tax83l_di" bpmnElement="Event_0tax83l">
|
|
<dc:Bounds x="1622" y="392" width="36" height="36" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1604" y="436" width="79" height="27" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0bu6o2b_di" bpmnElement="Activity_12p300g">
|
|
<dc:Bounds x="1480" y="370" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_1hwc1va_di" bpmnElement="Activity_1hwc1va">
|
|
<dc:Bounds x="1200" y="370" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Activity_0wn3csk_di" bpmnElement="Activity_0wn3csk">
|
|
<dc:Bounds x="1340" y="370" width="100" height="80" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Gateway_11tein2_di" bpmnElement="Gateway_11tein2" isMarkerVisible="true">
|
|
<dc:Bounds x="1045" y="385" width="50" height="50" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_10n5few_di" bpmnElement="Event_1bfppnu">
|
|
<dc:Bounds x="1052" y="242" width="36" height="36" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1031" y="212" width="78" height="27" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="BPMNShape_1gjmvpo" bpmnElement="Activity_0kftgey">
|
|
<dc:Bounds x="880" y="370" width="100" height="80" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="BPMNShape_10hrh8w" bpmnElement="Event_1gny0cr">
|
|
<dc:Bounds x="932" y="242" width="36" height="36" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="911" y="212" width="78" height="27" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="TextAnnotation_0bt6e0d_di" bpmnElement="TextAnnotation_0bt6e0d">
|
|
<dc:Bounds x="390" y="240" width="355" height="58" />
|
|
<bpmndi:BPMNLabel />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNShape id="Event_0os3moe_di" bpmnElement="Event_07ol7ch">
|
|
<dc:Bounds x="932" y="352" width="36" height="36" />
|
|
</bpmndi:BPMNShape>
|
|
<bpmndi:BPMNEdge id="Flow_1ow8whd_di" bpmnElement="Flow_1ow8whd">
|
|
<di:waypoint x="438" y="410" />
|
|
<di:waypoint x="470" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0qfq760_di" bpmnElement="Flow_0qfq760">
|
|
<di:waypoint x="570" y="410" />
|
|
<di:waypoint x="605" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1nqz9ya_di" bpmnElement="Flow_1nqz9ya">
|
|
<di:waypoint x="1300" y="410" />
|
|
<di:waypoint x="1340" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1kxc9t0_di" bpmnElement="Flow_1kxc9t0">
|
|
<di:waypoint x="1440" y="410" />
|
|
<di:waypoint x="1480" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0tmasvl_di" bpmnElement="Flow_0tmasvl">
|
|
<di:waypoint x="630" y="435" />
|
|
<di:waypoint x="630" y="520" />
|
|
<di:waypoint x="1740" y="520" />
|
|
<di:waypoint x="1740" y="435" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="648" y="503" width="82" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1cnt5hf_di" bpmnElement="Flow_1cnt5hf">
|
|
<di:waypoint x="980" y="410" />
|
|
<di:waypoint x="1045" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1nuku1o_di" bpmnElement="Flow_1nuku1o">
|
|
<di:waypoint x="1580" y="410" />
|
|
<di:waypoint x="1622" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0gcsmj7_di" bpmnElement="Flow_0gcsmj7">
|
|
<di:waypoint x="1658" y="410" />
|
|
<di:waypoint x="1715" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1rngywr_di" bpmnElement="Flow_1rngywr">
|
|
<di:waypoint x="655" y="410" />
|
|
<di:waypoint x="720" y="410" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="666" y="413" width="34" height="14" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0npv638_di" bpmnElement="Flow_0npv638">
|
|
<di:waypoint x="1765" y="410" />
|
|
<di:waypoint x="1810" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1ju13h8_di" bpmnElement="Flow_1ju13h8">
|
|
<di:waypoint x="1910" y="410" />
|
|
<di:waypoint x="1952" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_1xdj53u_di" bpmnElement="Flow_1xdj53u">
|
|
<di:waypoint x="820" y="410" />
|
|
<di:waypoint x="880" y="410" />
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_065a4cq_di" bpmnElement="Flow_065a4cq">
|
|
<di:waypoint x="1095" y="410" />
|
|
<di:waypoint x="1200" y="410" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1101" y="426" width="78" height="27" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0mtnk56_di" bpmnElement="Flow_0mtnk56">
|
|
<di:waypoint x="1070" y="385" />
|
|
<di:waypoint x="1070" y="278" />
|
|
<bpmndi:BPMNLabel>
|
|
<dc:Bounds x="1081" y="296" width="78" height="27" />
|
|
</bpmndi:BPMNLabel>
|
|
</bpmndi:BPMNEdge>
|
|
<bpmndi:BPMNEdge id="Flow_0ny162r_di" bpmnElement="Flow_0ny162r">
|
|
<di:waypoint x="950" y="352" />
|
|
<di:waypoint x="950" y="278" />
|
|
</bpmndi:BPMNEdge>
|
|
</bpmndi:BPMNPlane>
|
|
</bpmndi:BPMNDiagram>
|
|
</bpmn2:definitions>
|