-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlogPostHandler.bpmn
131 lines (131 loc) · 6.87 KB
/
BlogPostHandler.bpmn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1py5dgp" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
<bpmn:process id="BlogPostHandler" name="BlogPostHandler" isExecutable="true">
<bpmn:startEvent id="consumeSignal" name="NewBlogPost (Zapier)">
<bpmn:outgoing>Flow_09v14a6</bpmn:outgoing>
<bpmn:signalEventDefinition id="SignalEventDefinition_0g4vpyr" signalRef="Signal_16wtb4z" />
</bpmn:startEvent>
<bpmn:intermediateThrowEvent id="emitSignal" name="NewBlogPostKey">
<bpmn:incoming>Flow_1i9dsem</bpmn:incoming>
<bpmn:signalEventDefinition id="SignalEventDefinition_12hfknd" signalRef="Signal_1l77c36">
<bpmn:extensionElements>
<camunda:in source="description" target="description" />
<camunda:in source="link" target="link" />
<camunda:in source="title" target="title" />
<camunda:in sourceExpression="${channel}" target="channel" />
<camunda:in businessKey="${path}" />
</bpmn:extensionElements>
</bpmn:signalEventDefinition>
</bpmn:intermediateThrowEvent>
<bpmn:sequenceFlow id="Flow_1i9dsem" sourceRef="decode" targetRef="emitSignal" />
<bpmn:scriptTask id="decode" name="decode url" scriptFormat="groovy">
<bpmn:incoming>Flow_0pe0xrs</bpmn:incoming>
<bpmn:incoming>Flow_0lpw26y</bpmn:incoming>
<bpmn:outgoing>Flow_1i9dsem</bpmn:outgoing>
<bpmn:script>url = new java.net.URL(execution.getVariable("link"));
execution.setVariable("path", url.getPath())
println("BlogPostHandler path: " + url.getPath())</bpmn:script>
</bpmn:scriptTask>
<bpmn:startEvent id="Event_1kupqmj">
<bpmn:outgoing>Flow_0gg4m1l</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0gg4m1l" sourceRef="Event_1kupqmj" targetRef="Activity_1in6x63" />
<bpmn:scriptTask id="Activity_1in6x63" name="test" scriptFormat="groovy">
<bpmn:incoming>Flow_0gg4m1l</bpmn:incoming>
<bpmn:outgoing>Flow_0lpw26y</bpmn:outgoing>
<bpmn:script>execution.setVariable("title",
"Business forecasting with Facebook Prophet"
)
execution.setVariable("link",
"https://www.futurice.com/blog/business-forecasting-with-facebook-prophet2"
)
execution.setVariable("description",
"In this article you are going to learn how to do solid time-series analysis and forecasts with the Facebook Prophet library."
)
execution.setVariable("channel",
"larktest2"
)</bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="Activity_0ty6hmd" name="prod" scriptFormat="groovy">
<bpmn:incoming>Flow_09v14a6</bpmn:incoming>
<bpmn:outgoing>Flow_0pe0xrs</bpmn:outgoing>
<bpmn:script>execution.setVariable("channel", "content-creators")</bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="Flow_0pe0xrs" sourceRef="Activity_0ty6hmd" targetRef="decode" />
<bpmn:sequenceFlow id="Flow_09v14a6" sourceRef="consumeSignal" targetRef="Activity_0ty6hmd" />
<bpmn:sequenceFlow id="Flow_0lpw26y" sourceRef="Activity_1in6x63" targetRef="decode" />
<bpmn:textAnnotation id="TextAnnotation_10ulimx">
<bpmn:text>url, link, description</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_13johmf" sourceRef="consumeSignal" targetRef="TextAnnotation_10ulimx" />
<bpmn:textAnnotation id="TextAnnotation_16psp0n">
<bpmn:text>title, link, description, channel
businessKey = path</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1ig4d68" sourceRef="emitSignal" targetRef="TextAnnotation_16psp0n" />
</bpmn:process>
<bpmn:signal id="Signal_16wtb4z" name="NewBlogPost" />
<bpmn:signal id="Signal_1l77c36" name="NewBlogPostKey" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="BlogPostHandler">
<bpmndi:BPMNShape id="Event_1kexrmr_di" bpmnElement="consumeSignal">
<dc:Bounds x="172" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="158" y="205" width="67" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_13s9zki_di" bpmnElement="emitSignal">
<dc:Bounds x="432" y="282" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="410" y="325" width="85" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1i9dsem_di" bpmnElement="Flow_1i9dsem">
<di:waypoint x="360" y="300" />
<di:waypoint x="432" y="300" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_1hzyz40_di" bpmnElement="decode">
<dc:Bounds x="260" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1kupqmj_di" bpmnElement="Event_1kupqmj">
<dc:Bounds x="172" y="412" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0gg4m1l_di" bpmnElement="Flow_0gg4m1l">
<di:waypoint x="208" y="430" />
<di:waypoint x="260" y="430" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_0frpke7_di" bpmnElement="Activity_1in6x63">
<dc:Bounds x="260" y="390" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0ty6hmd_di" bpmnElement="Activity_0ty6hmd">
<dc:Bounds x="260" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0pe0xrs_di" bpmnElement="Flow_0pe0xrs">
<di:waypoint x="310" y="220" />
<di:waypoint x="310" y="260" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_09v14a6_di" bpmnElement="Flow_09v14a6">
<di:waypoint x="208" y="180" />
<di:waypoint x="260" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0lpw26y_di" bpmnElement="Flow_0lpw26y">
<di:waypoint x="310" y="390" />
<di:waypoint x="310" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="TextAnnotation_10ulimx_di" bpmnElement="TextAnnotation_10ulimx">
<dc:Bounds x="210" y="80" width="100" height="40" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_13johmf_di" bpmnElement="Association_13johmf">
<di:waypoint x="202" y="167" />
<di:waypoint x="243" y="120" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="TextAnnotation_16psp0n_di" bpmnElement="TextAnnotation_16psp0n">
<dc:Bounds x="470" y="200" width="150" height="60" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_1ig4d68_di" bpmnElement="Association_1ig4d68">
<di:waypoint x="464" y="289" />
<di:waypoint x="505" y="260" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>