@5minds/node-red-contrib-processcube 1.6.6 → 1.7.0-develop-0341ad-m65hjby2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nodered/flows.json
CHANGED
@@ -103,6 +103,14 @@
|
|
103
103
|
"info": "",
|
104
104
|
"env": []
|
105
105
|
},
|
106
|
+
{
|
107
|
+
"id": "ecd7ca447e4d1f47",
|
108
|
+
"type": "tab",
|
109
|
+
"label": "Deploy process model",
|
110
|
+
"disabled": false,
|
111
|
+
"info": "",
|
112
|
+
"env": []
|
113
|
+
},
|
106
114
|
{
|
107
115
|
"id": "4c59118134081e05",
|
108
116
|
"type": "group",
|
@@ -2905,5 +2913,101 @@
|
|
2905
2913
|
"8c8d9afd13c5c796"
|
2906
2914
|
]
|
2907
2915
|
]
|
2916
|
+
},
|
2917
|
+
{
|
2918
|
+
"id": "f380d237ed2a51a4",
|
2919
|
+
"type": "processdefinition-query",
|
2920
|
+
"z": "ecd7ca447e4d1f47",
|
2921
|
+
"name": "",
|
2922
|
+
"engine": "42e6796dddd9d4db",
|
2923
|
+
"query": "{}",
|
2924
|
+
"query_type": "json",
|
2925
|
+
"models_only": false,
|
2926
|
+
"x": 390,
|
2927
|
+
"y": 120,
|
2928
|
+
"wires": [
|
2929
|
+
[
|
2930
|
+
"0dca34052917987a"
|
2931
|
+
]
|
2932
|
+
]
|
2933
|
+
},
|
2934
|
+
{
|
2935
|
+
"id": "89e4082b2afa6ed4",
|
2936
|
+
"type": "inject",
|
2937
|
+
"z": "ecd7ca447e4d1f47",
|
2938
|
+
"name": "",
|
2939
|
+
"props": [
|
2940
|
+
{
|
2941
|
+
"p": "payload"
|
2942
|
+
},
|
2943
|
+
{
|
2944
|
+
"p": "topic",
|
2945
|
+
"vt": "str"
|
2946
|
+
}
|
2947
|
+
],
|
2948
|
+
"repeat": "",
|
2949
|
+
"crontab": "",
|
2950
|
+
"once": false,
|
2951
|
+
"onceDelay": 0.1,
|
2952
|
+
"topic": "",
|
2953
|
+
"payload": "",
|
2954
|
+
"payloadType": "date",
|
2955
|
+
"x": 190,
|
2956
|
+
"y": 120,
|
2957
|
+
"wires": [
|
2958
|
+
[
|
2959
|
+
"f380d237ed2a51a4"
|
2960
|
+
]
|
2961
|
+
]
|
2962
|
+
},
|
2963
|
+
{
|
2964
|
+
"id": "af52431420fa7e15",
|
2965
|
+
"type": "debug",
|
2966
|
+
"z": "ecd7ca447e4d1f47",
|
2967
|
+
"name": "debug 2",
|
2968
|
+
"active": true,
|
2969
|
+
"tosidebar": true,
|
2970
|
+
"console": false,
|
2971
|
+
"tostatus": false,
|
2972
|
+
"complete": "false",
|
2973
|
+
"statusVal": "",
|
2974
|
+
"statusType": "auto",
|
2975
|
+
"x": 1060,
|
2976
|
+
"y": 120,
|
2977
|
+
"wires": []
|
2978
|
+
},
|
2979
|
+
{
|
2980
|
+
"id": "0dca34052917987a",
|
2981
|
+
"type": "function",
|
2982
|
+
"z": "ecd7ca447e4d1f47",
|
2983
|
+
"name": "get process to deploy",
|
2984
|
+
"func": "const processDefinitionToDeploy = msg.payload.processDefinitions.find(def => def.processDefinitionId === 'ProcessModelToDeploy_Definition');\n\nmsg.payload = processDefinitionToDeploy.xml;\n\nreturn msg;",
|
2985
|
+
"outputs": 1,
|
2986
|
+
"timeout": 0,
|
2987
|
+
"noerr": 0,
|
2988
|
+
"initialize": "",
|
2989
|
+
"finalize": "",
|
2990
|
+
"libs": [],
|
2991
|
+
"x": 640,
|
2992
|
+
"y": 120,
|
2993
|
+
"wires": [
|
2994
|
+
[
|
2995
|
+
"86888146d3f4b2a6"
|
2996
|
+
]
|
2997
|
+
]
|
2998
|
+
},
|
2999
|
+
{
|
3000
|
+
"id": "86888146d3f4b2a6",
|
3001
|
+
"type": "processdefinition-deploy",
|
3002
|
+
"z": "ecd7ca447e4d1f47",
|
3003
|
+
"name": "Deploy Process",
|
3004
|
+
"engine": "42e6796dddd9d4db",
|
3005
|
+
"x": 860,
|
3006
|
+
"y": 120,
|
3007
|
+
"wires": [
|
3008
|
+
[
|
3009
|
+
"af52431420fa7e15"
|
3010
|
+
]
|
3011
|
+
]
|
2908
3012
|
}
|
2909
3013
|
]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@5minds/node-red-contrib-processcube",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.0-develop-0341ad-m65hjby2",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Node-RED nodes for ProcessCube",
|
6
6
|
"scripts": {
|
@@ -46,6 +46,7 @@
|
|
46
46
|
"processcubeEngineConfig": "processcube-engine-config.js",
|
47
47
|
"ProcessinstanceQuery": "processinstance-query.js",
|
48
48
|
"ProcessinstanceDelete": "processinstance-delete.js",
|
49
|
+
"ProcessdefinitionDeploy": "processdefinition-deploy.js",
|
49
50
|
"ProcessdefinitionQuery": "processdefinition-query.js",
|
50
51
|
"messageEventTrigger": "message-event-trigger.js",
|
51
52
|
"signalEventTrigger": "signal-event-trigger.js",
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
RED.nodes.registerType('processdefinition-deploy', {
|
3
|
+
category: 'ProcessCube',
|
4
|
+
color: '#02AFD6',
|
5
|
+
defaults: {
|
6
|
+
name: { value: '' },
|
7
|
+
engine: { value: '', type: 'processcube-engine-config' },
|
8
|
+
},
|
9
|
+
inputs: 1,
|
10
|
+
outputs: 1,
|
11
|
+
icon: 'processdefinition_deploy.svg',
|
12
|
+
label: function () {
|
13
|
+
return this.name || 'processdefinition-deploy';
|
14
|
+
}
|
15
|
+
});
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<script type="text/html" data-template-name="processdefinition-deploy">
|
19
|
+
<div class="form-row">
|
20
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
21
|
+
<input type="text" id="node-input-name" placeholder="Name" />
|
22
|
+
</div>
|
23
|
+
<div class="form-row">
|
24
|
+
<label for="node-input-engine"><i class="fa fa-tag"></i> Engine-URL</label>
|
25
|
+
<input type="text" id="node-input-engine" placeholder="http://engine:8000" />
|
26
|
+
</div>
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<script type="text/markdown" data-help-name="processdefinition-deploy">
|
30
|
+
A node to deploy process definition to the ProcessCube Engine.
|
31
|
+
|
32
|
+
## Inputs
|
33
|
+
|
34
|
+
: payload (String) : XML of the bpmn file
|
35
|
+
|
36
|
+
## Outputs
|
37
|
+
|
38
|
+
: payload (String) : XML of the bpmn file
|
39
|
+
|
40
|
+
### References
|
41
|
+
|
42
|
+
- [The ProcessCube© Developer Network](https://processcube.io) - All documentation for the ProcessCube© platform
|
43
|
+
- [ProcessCube© LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube©
|
44
|
+
</script>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module.exports = function (RED) {
|
2
|
+
function ProcessdefinitionDeploy(config) {
|
3
|
+
RED.nodes.createNode(this, config);
|
4
|
+
var node = this;
|
5
|
+
|
6
|
+
node.on('input', function (msg) {
|
7
|
+
node.engine = RED.nodes.getNode(config.engine);
|
8
|
+
const client = node.engine.engineClient;
|
9
|
+
|
10
|
+
if (!client) {
|
11
|
+
node.error('No engine configured.');
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
|
15
|
+
client.processDefinitions
|
16
|
+
.persistProcessDefinitions(msg.payload, { overwriteExisting: true })
|
17
|
+
.then(() => {
|
18
|
+
node.send(msg);
|
19
|
+
})
|
20
|
+
.catch((error) => {
|
21
|
+
node.error(error, {});
|
22
|
+
});
|
23
|
+
});
|
24
|
+
}
|
25
|
+
RED.nodes.registerType('processdefinition-deploy', ProcessdefinitionDeploy);
|
26
|
+
};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="ProcessModelToDeploy_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
|
3
|
+
<bpmn:collaboration id="Collaboration_1cidyxu" name="">
|
4
|
+
<bpmn:participant id="Participant_0px403d" name="ProcessModelToDeploy" processRef="ProcessModelToDeploy_Process" />
|
5
|
+
</bpmn:collaboration>
|
6
|
+
<bpmn:process id="ProcessModelToDeploy_Process" name="ProcessModelToDeploy" isExecutable="true">
|
7
|
+
<bpmn:laneSet>
|
8
|
+
<bpmn:lane id="Lane_1xzf0d3">
|
9
|
+
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
|
10
|
+
<bpmn:flowNodeRef>Activity_0p9qhgo</bpmn:flowNodeRef>
|
11
|
+
<bpmn:flowNodeRef>Event_151g9al</bpmn:flowNodeRef>
|
12
|
+
</bpmn:lane>
|
13
|
+
</bpmn:laneSet>
|
14
|
+
<bpmn:startEvent id="StartEvent_1" name="Start">
|
15
|
+
<bpmn:outgoing>Flow_0hm7pnt</bpmn:outgoing>
|
16
|
+
</bpmn:startEvent>
|
17
|
+
<bpmn:task id="Activity_0p9qhgo" name="Test">
|
18
|
+
<bpmn:incoming>Flow_0hm7pnt</bpmn:incoming>
|
19
|
+
<bpmn:outgoing>Flow_0xmw470</bpmn:outgoing>
|
20
|
+
</bpmn:task>
|
21
|
+
<bpmn:sequenceFlow id="Flow_0hm7pnt" sourceRef="StartEvent_1" targetRef="Activity_0p9qhgo" />
|
22
|
+
<bpmn:endEvent id="Event_151g9al">
|
23
|
+
<bpmn:incoming>Flow_0xmw470</bpmn:incoming>
|
24
|
+
</bpmn:endEvent>
|
25
|
+
<bpmn:sequenceFlow id="Flow_0xmw470" sourceRef="Activity_0p9qhgo" targetRef="Event_151g9al" />
|
26
|
+
</bpmn:process>
|
27
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
28
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
29
|
+
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
30
|
+
<dc:Bounds x="5" y="4" width="885" height="346" />
|
31
|
+
</bpmndi:BPMNShape>
|
32
|
+
<bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
|
33
|
+
<dc:Bounds x="35" y="4" width="855" height="346" />
|
34
|
+
</bpmndi:BPMNShape>
|
35
|
+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
36
|
+
<dc:Bounds x="92" y="152" width="36" height="36" />
|
37
|
+
<bpmndi:BPMNLabel>
|
38
|
+
<dc:Bounds x="98" y="195" width="24" height="14" />
|
39
|
+
</bpmndi:BPMNLabel>
|
40
|
+
</bpmndi:BPMNShape>
|
41
|
+
<bpmndi:BPMNShape id="Activity_0p9qhgo_di" bpmnElement="Activity_0p9qhgo">
|
42
|
+
<dc:Bounds x="180" y="130" width="100" height="80" />
|
43
|
+
<bpmndi:BPMNLabel />
|
44
|
+
</bpmndi:BPMNShape>
|
45
|
+
<bpmndi:BPMNShape id="Event_151g9al_di" bpmnElement="Event_151g9al">
|
46
|
+
<dc:Bounds x="332" y="152" width="36" height="36" />
|
47
|
+
</bpmndi:BPMNShape>
|
48
|
+
<bpmndi:BPMNEdge id="Flow_0hm7pnt_di" bpmnElement="Flow_0hm7pnt">
|
49
|
+
<di:waypoint x="128" y="170" />
|
50
|
+
<di:waypoint x="180" y="170" />
|
51
|
+
</bpmndi:BPMNEdge>
|
52
|
+
<bpmndi:BPMNEdge id="Flow_0xmw470_di" bpmnElement="Flow_0xmw470">
|
53
|
+
<di:waypoint x="280" y="170" />
|
54
|
+
<di:waypoint x="332" y="170" />
|
55
|
+
</bpmndi:BPMNEdge>
|
56
|
+
</bpmndi:BPMNPlane>
|
57
|
+
</bpmndi:BPMNDiagram>
|
58
|
+
</bpmn:definitions>
|