Skip to content

Commit

Permalink
Migrate to last version of API
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-yves-monnet committed Dec 6, 2024
1 parent a217c3b commit 83869cc
Show file tree
Hide file tree
Showing 31 changed files with 1,281 additions and 932 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ The docker image is build using the Dockerfile present on the root level.
Push the image to
````
docker build -t pierre-yves-monnet/process-execution-automator:1.8.0 .
docker build pycamunda/camunda-community-hub/process-execution-automator:1.8.0
docker build -t pierre-yves-monnet/process-execution-automator:1.8.1 .
````
Expand All @@ -468,8 +467,12 @@ Push the image to the Camunda hub (you must be login first to the docker registr
docker tag pierre-yves-monnet/process-execution-automator:1.8.0 ghcr.io/camunda-community-hub/process-execution-automator:1.8.0
docker push ghcr.io/camunda-community-hub/process-execution-automator:1.8.0
````
docker tag pierre-yves-monnet/process-execution-automator:1.8.0 pycamunda/camunda-hub:process-execution-automator-1.8.0
docker push pycamunda/camunda-hub:process-execution-automator-1.8.0
Temporary:
docker build -t pierre-yves-monnet/process-execution-automator:1.8.3 .
docker tag pierre-yves-monnet/process-execution-automator:1.8.3 pycamunda/camunda-hub:process-execution-automator-1.8.3
docker push pycamunda/camunda-hub:process-execution-automator-1.8.3
Expand Down
82 changes: 41 additions & 41 deletions doc/scenarioreference/C8CrawlUrl.bpmn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1de8grd" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.29.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.2.0">
<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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1de8grd" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.29.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.2.0">
<bpmn:collaboration id="CrawlUrlProcessAutomator-4553">
<bpmn:extensionElements>
<zeebe:properties>
Expand Down Expand Up @@ -429,7 +429,7 @@
<di:waypoint x="208" y="263" />
<di:waypoint x="258" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_1tdai6p_di" bpmnElement="Participant_1vqtszi" isHorizontal="true">
<bpmndi:BPMNShape id="Participant_1tdai6p_di" bpmnElement="Participant_1vqtszi" isHorizontal="true" bioc:stroke="#0d4372" bioc:fill="#bbdefb" color:background-color="#bbdefb" color:border-color="#0d4372">
<dc:Bounds x="129" y="790" width="1720" height="250" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0c0eu5q_di" bpmnElement="Activity_0c0eu5q">
Expand Down Expand Up @@ -470,6 +470,45 @@
<dc:Bounds x="868" y="1002" width="44" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="DataOutputAssociation_16252ue_di" bpmnElement="DataOutputAssociation_16252ue">
<di:waypoint x="240" y="900" />
<di:waypoint x="260" y="975" />
<di:waypoint x="872" y="975" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1x6wk7g_di" bpmnElement="DataOutputAssociation_1x6wk7g">
<di:waypoint x="355" y="900" />
<di:waypoint x="370" y="940" />
<di:waypoint x="872" y="974" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_0domor3_di" bpmnElement="DataOutputAssociation_0domor3">
<di:waypoint x="645" y="900" />
<di:waypoint x="660" y="940" />
<di:waypoint x="872" y="967" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_17clz1o_di" bpmnElement="DataOutputAssociation_17clz1o">
<di:waypoint x="791" y="900" />
<di:waypoint x="800" y="930" />
<di:waypoint x="872" y="957" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1jb2g71_di" bpmnElement="DataOutputAssociation_1jb2g71">
<di:waypoint x="903" y="900" />
<di:waypoint x="895" y="945" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_02rmp5j_di" bpmnElement="DataOutputAssociation_02rmp5j">
<di:waypoint x="1039" y="900" />
<di:waypoint x="1030" y="930" />
<di:waypoint x="908" y="961" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1i1hr24_di" bpmnElement="DataOutputAssociation_1i1hr24">
<di:waypoint x="1285" y="900" />
<di:waypoint x="1270" y="940" />
<di:waypoint x="908" y="969" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1r8w49n_di" bpmnElement="DataOutputAssociation_1r8w49n">
<di:waypoint x="1464" y="900" />
<di:waypoint x="1410" y="960" />
<di:waypoint x="908" y="974" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0dr7tpp_di" bpmnElement="Flow_0dr7tpp">
<di:waypoint x="197" y="820" />
<di:waypoint x="197" y="295" />
Expand Down Expand Up @@ -526,45 +565,6 @@
<dc:Bounds x="891" y="747" width="77" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_16252ue_di" bpmnElement="DataOutputAssociation_16252ue">
<di:waypoint x="240" y="900" />
<di:waypoint x="260" y="975" />
<di:waypoint x="872" y="975" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1x6wk7g_di" bpmnElement="DataOutputAssociation_1x6wk7g">
<di:waypoint x="355" y="900" />
<di:waypoint x="370" y="940" />
<di:waypoint x="872" y="974" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_0domor3_di" bpmnElement="DataOutputAssociation_0domor3">
<di:waypoint x="645" y="900" />
<di:waypoint x="660" y="940" />
<di:waypoint x="872" y="967" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_17clz1o_di" bpmnElement="DataOutputAssociation_17clz1o">
<di:waypoint x="791" y="900" />
<di:waypoint x="800" y="930" />
<di:waypoint x="872" y="957" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1jb2g71_di" bpmnElement="DataOutputAssociation_1jb2g71">
<di:waypoint x="903" y="900" />
<di:waypoint x="895" y="945" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_02rmp5j_di" bpmnElement="DataOutputAssociation_02rmp5j">
<di:waypoint x="1039" y="900" />
<di:waypoint x="1030" y="930" />
<di:waypoint x="908" y="961" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1i1hr24_di" bpmnElement="DataOutputAssociation_1i1hr24">
<di:waypoint x="1285" y="900" />
<di:waypoint x="1270" y="940" />
<di:waypoint x="908" y="969" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DataOutputAssociation_1r8w49n_di" bpmnElement="DataOutputAssociation_1r8w49n">
<di:waypoint x="1464" y="900" />
<di:waypoint x="1410" y="960" />
<di:waypoint x="908" y="974" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
33 changes: 24 additions & 9 deletions doc/unittestscenario/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,35 @@ Check the scenario:

## execute

1. First, upload the scenario file in a config map

1. Deploy the scenario on the cluster, via the Modeler

2. Create the pod process-execution-automator

```
kubectl create configmap scoreacceptancescn --from-file=doc/unittestscenario/resources/scoreacceptancescn.json -n camunda
kubectl create -f doc/unittestscenario/resources/UnittestAutomator.yaml -n camunda
```

2. Deploy the scenario on the cluster, via the Modeler

3. Create the pod process-execution-automator
3. Port forward

```
kubectl create -f doc/unittestscenario/resources/UnittestAutomator.yaml -n camunda
kubectl port-forward svc/process-execution-automator 8381:8381 -n camunda
```
This configuration will upload the scenario

4. Upload the scenario

4. Port forward

```
kubectl port-forward svc/process-execution-automator 8381:8381 -n camunda
curl -X POST http://localhost:8381/api/files/upload \
-H "Content-Type: multipart/form-data" \
-F "file=@doc/unittestscenario/resources/ScoreAcceptanceScn.json"
curl -X GET "http://localhost:8381/api/content/list" -H "Content-Type: application/json"
```



6. Check the scenario is uploaded

```
Expand All @@ -94,3 +101,11 @@ curl -X POST -F "file=@/path/to/your/file.txt" http://localhost:8080/api/files/u
curl -X GET "http://localhost:8381/api/unittest/get?id=1732767184446" -H "Content-Type: application/json"
```

Option: give the scenario via the configMap

a. create the configMap
````
kubectl create configmap scoreacceptancescn --from-file=doc/unittestscenario/resources/scoreacceptancescn.json -n camunda
````

b. Chheck the configuration
5 changes: 2 additions & 3 deletions doc/unittestscenario/SendUnitTestCommand.rest
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ Content-Type: application/json

### Upload file
POST http://localhost:8381/api/content/add
Content-Type: multipart/form-data
Content-Type: multipart/form-data; boundary=boundary

--boundary
Content-Disposition: form-data; name="File"; filename="file1.txt"
Content-Type: text/plain
Content-Disposition: form-data; name="FileToUpload"; filename="ScoreAcceptanceScn.json"

< ./resources/ScoreAcceptanceScn.json

Expand Down
127 changes: 127 additions & 0 deletions doc/unittestscenario/resources/ScoreAcceptance.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1v4ppib" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.29.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.6.0">
<bpmn:process id="ScoreAcceptance" isExecutable="true">
<bpmn:startEvent id="StartScoreApplication" name="score application">
<bpmn:outgoing>Flow_1wuzgpt</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1wuzgpt" sourceRef="StartScoreApplication" targetRef="ActGetScore" />
<bpmn:scriptTask id="ActGetScore" name="getScore">
<bpmn:extensionElements>
<zeebe:script expression="=score&#62;100" resultVariable="accepted" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_1wuzgpt</bpmn:incoming>
<bpmn:outgoing>Flow_0gi4xk6</bpmn:outgoing>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="Gateway_01ox9rs" name="Accepted?" default="Flow_0a4sjzy">
<bpmn:incoming>Flow_0gi4xk6</bpmn:incoming>
<bpmn:outgoing>Flow_16hd1bd</bpmn:outgoing>
<bpmn:outgoing>Flow_0a4sjzy</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0gi4xk6" sourceRef="ActGetScore" targetRef="Gateway_01ox9rs" />
<bpmn:task id="ActSendAcceptation" name="Send acception">
<bpmn:incoming>Flow_16hd1bd</bpmn:incoming>
<bpmn:outgoing>Flow_09z898p</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_16hd1bd" name="yes" sourceRef="Gateway_01ox9rs" targetRef="ActSendAcceptation">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=accepted</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="EndAccepted" name="accepted">
<bpmn:incoming>Flow_09z898p</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_09z898p" sourceRef="ActSendAcceptation" targetRef="EndAccepted" />
<bpmn:task id="ActSendRejection" name="Send rejection">
<bpmn:incoming>Flow_0wya675</bpmn:incoming>
<bpmn:outgoing>Flow_1pxztl2</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_0a4sjzy" name="Rejected" sourceRef="Gateway_01ox9rs" targetRef="CallApplicant" />
<bpmn:endEvent id="EndRejected" name="rejected">
<bpmn:incoming>Flow_1pxztl2</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1pxztl2" sourceRef="ActSendRejection" targetRef="EndRejected" />
<bpmn:sequenceFlow id="Flow_0wya675" sourceRef="CallApplicant" targetRef="ActSendRejection" />
<bpmn:userTask id="CallApplicant" name="Call Applicant">
<bpmn:extensionElements />
<bpmn:incoming>Flow_0a4sjzy</bpmn:incoming>
<bpmn:outgoing>Flow_0wya675</bpmn:outgoing>
</bpmn:userTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ScoreAcceptance">
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartScoreApplication">
<dc:Bounds x="192" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="169" y="205" width="83" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1fm9qgv_di" bpmnElement="ActGetScore">
<dc:Bounds x="280" y="140" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_01ox9rs_di" bpmnElement="Gateway_01ox9rs" isMarkerVisible="true">
<dc:Bounds x="435" y="155" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="434" y="125" width="52" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1eppdvp_di" bpmnElement="ActSendAcceptation">
<dc:Bounds x="540" y="140" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1961r03_di" bpmnElement="EndAccepted">
<dc:Bounds x="702" y="162" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="699" y="205" width="45" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1lfkf11_di" bpmnElement="EndRejected">
<dc:Bounds x="872" y="272" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="870" y="315" width="40" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1dmaofg_di" bpmnElement="ActSendRejection">
<dc:Bounds x="710" y="250" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1kkk9hs_di" bpmnElement="CallApplicant">
<dc:Bounds x="530" y="250" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1wuzgpt_di" bpmnElement="Flow_1wuzgpt">
<di:waypoint x="228" y="180" />
<di:waypoint x="280" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0gi4xk6_di" bpmnElement="Flow_0gi4xk6">
<di:waypoint x="380" y="180" />
<di:waypoint x="435" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_16hd1bd_di" bpmnElement="Flow_16hd1bd">
<di:waypoint x="485" y="180" />
<di:waypoint x="540" y="180" />
<bpmndi:BPMNLabel>
<dc:Bounds x="504" y="162" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_09z898p_di" bpmnElement="Flow_09z898p">
<di:waypoint x="640" y="180" />
<di:waypoint x="702" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0a4sjzy_di" bpmnElement="Flow_0a4sjzy">
<di:waypoint x="460" y="205" />
<di:waypoint x="460" y="290" />
<di:waypoint x="530" y="290" />
<bpmndi:BPMNLabel>
<dc:Bounds x="468" y="273" width="44" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1pxztl2_di" bpmnElement="Flow_1pxztl2">
<di:waypoint x="810" y="290" />
<di:waypoint x="872" y="290" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wya675_di" bpmnElement="Flow_0wya675">
<di:waypoint x="630" y="290" />
<di:waypoint x="710" y="290" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions doc/unittestscenario/resources/ScoreAcceptanceScn.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
"variables": {
"score": 67
}
},
{
"type": "USERTASK",
"taskId": "CallApplicant",
"processId": "ScoreAcceptance",
"variables": {
"phoneNumber": "(+1) 542 778 2352"
}
}
],
"verifications": {
Expand Down
Loading

0 comments on commit 83869cc

Please sign in to comment.