@5minds/node-red-contrib-processcube 0.3.5-feature-e28c82-lxj4lazd → 0.4.0-develop-0af97c-lxlkzmsr

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,9 +7,13 @@ module.exports = function(RED) {
7
7
  var eventEmitter = flowContext.get('emitter');
8
8
 
9
9
  node.on('input', function(msg) {
10
-
10
+
11
11
  const externalTaskId = msg.externalTaskId;
12
12
 
13
+ if (!externalTaskId) {
14
+ node.error('Error: The message did not contain the required external task id.', msg);
15
+ }
16
+
13
17
  eventEmitter.emit(`finish-${externalTaskId}`, msg.payload);
14
18
  });
15
19
  }
@@ -80,7 +80,8 @@
80
80
  "97afbbf01ec1cd88",
81
81
  "2b3f33b7a9dceb49",
82
82
  "a61cb4c20f79d872",
83
- "111c8606ea343c1f"
83
+ "111c8606ea343c1f",
84
+ "a4f0eee35f06b1ff"
84
85
  ],
85
86
  "x": 14,
86
87
  "y": 59,
@@ -111,7 +112,8 @@
111
112
  "915816cdb895af14",
112
113
  "51324058434239ba",
113
114
  "814ff7cf02987e14",
114
- "0add5e307323845e"
115
+ "0add5e307323845e",
116
+ "5399c05e8fea3679"
115
117
  ],
116
118
  "x": 14,
117
119
  "y": 419,
@@ -182,15 +184,16 @@
182
184
  "nodes": [
183
185
  "3ad37ecdb59b7314",
184
186
  "54a2572d4a48cf34",
185
- "4f4ff5d35037207a",
186
- "1a237533ba8a9376",
187
187
  "4813eab6c5a5faf9",
188
- "19184f75b76893d0"
188
+ "1a237533ba8a9376",
189
+ "4f4ff5d35037207a",
190
+ "19184f75b76893d0",
191
+ "df4a9e9bf8c4077e"
189
192
  ],
190
193
  "x": 14,
191
- "y": 639,
194
+ "y": 619,
192
195
  "w": 852,
193
- "h": 162
196
+ "h": 182
194
197
  },
195
198
  {
196
199
  "id": "02fef81e2129ea71",
@@ -218,6 +221,41 @@
218
221
  "w": 632,
219
222
  "h": 202
220
223
  },
224
+ {
225
+ "id": "17b562c4786348d6",
226
+ "type": "group",
227
+ "z": "b195bc3ca2e1a665",
228
+ "style": {
229
+ "stroke": "#999999",
230
+ "stroke-opacity": "1",
231
+ "fill": "none",
232
+ "fill-opacity": "1",
233
+ "label": true,
234
+ "label-position": "nw",
235
+ "color": "#a4a4a4"
236
+ },
237
+ "nodes": [
238
+ "7c994e7efb87d61f",
239
+ "879b5476deda73b0",
240
+ "a5074076a34de015",
241
+ "20f5318774b56550",
242
+ "eb1669dc281aacda",
243
+ "32d39cbbad223e48",
244
+ "85d11ea49087d7a8",
245
+ "0061d335785a97c5",
246
+ "298195cb7721ddce",
247
+ "bd166ce901b6bd37",
248
+ "807dd2529783550b",
249
+ "176a754c8b39063c",
250
+ "b185b133c9ab43f9",
251
+ "0aeaca52ca60cadc",
252
+ "605e432d57d4a7e6"
253
+ ],
254
+ "x": 14,
255
+ "y": 819,
256
+ "w": 1512,
257
+ "h": 282
258
+ },
221
259
  {
222
260
  "id": "d042a4c68f51d6ab",
223
261
  "type": "processcube-engine-config",
@@ -266,9 +304,9 @@
266
304
  {
267
305
  "id": "b4dcca3f3d895ff7",
268
306
  "type": "ui-page",
269
- "name": "Prozessliste",
307
+ "name": "Prozessinstanzliste",
270
308
  "ui": "26a45d43c064bdb6",
271
- "path": "/Prozessliste",
309
+ "path": "/Prozessinstanzliste",
272
310
  "icon": "home",
273
311
  "layout": "grid",
274
312
  "theme": "7175f012d8e51857",
@@ -314,6 +352,33 @@
314
352
  "type": "processcube-engine-config",
315
353
  "url": "http://engine:8000"
316
354
  },
355
+ {
356
+ "id": "1b45fbda916a0a2d",
357
+ "type": "ui-page",
358
+ "name": "Prozessliste",
359
+ "ui": "26a45d43c064bdb6",
360
+ "path": "/Prozessliste",
361
+ "icon": "home",
362
+ "layout": "grid",
363
+ "theme": "7175f012d8e51857",
364
+ "order": 3,
365
+ "className": "",
366
+ "visible": "true",
367
+ "disabled": "false"
368
+ },
369
+ {
370
+ "id": "8b1ddd3c46212b60",
371
+ "type": "ui-group",
372
+ "name": "Prozessliste",
373
+ "page": "1b45fbda916a0a2d",
374
+ "width": "12",
375
+ "height": "1",
376
+ "order": 1,
377
+ "showTitle": false,
378
+ "className": "",
379
+ "visible": "true",
380
+ "disabled": "false"
381
+ },
317
382
  {
318
383
  "id": "84f18cf9bf25b858",
319
384
  "type": "openApi-red",
@@ -1429,8 +1494,8 @@
1429
1494
  "name": "processInstanceId",
1430
1495
  "in": "query",
1431
1496
  "required": false,
1432
- "value": "",
1433
- "isActive": false,
1497
+ "value": "b833c528-bb95-4d09-a08f-f36724edf2db",
1498
+ "isActive": true,
1434
1499
  "type": "str",
1435
1500
  "allowedTypes": [
1436
1501
  "str",
@@ -2229,7 +2294,8 @@
2229
2294
  "y": 520,
2230
2295
  "wires": [
2231
2296
  [
2232
- "915816cdb895af14"
2297
+ "915816cdb895af14",
2298
+ "5399c05e8fea3679"
2233
2299
  ]
2234
2300
  ]
2235
2301
  },
@@ -2324,7 +2390,8 @@
2324
2390
  "y": 760,
2325
2391
  "wires": [
2326
2392
  [
2327
- "4813eab6c5a5faf9"
2393
+ "4813eab6c5a5faf9",
2394
+ "df4a9e9bf8c4077e"
2328
2395
  ]
2329
2396
  ]
2330
2397
  },
@@ -2402,8 +2469,8 @@
2402
2469
  "complete": "false",
2403
2470
  "statusVal": "",
2404
2471
  "statusType": "auto",
2405
- "x": 540,
2406
- "y": 700,
2472
+ "x": 560,
2473
+ "y": 660,
2407
2474
  "wires": []
2408
2475
  },
2409
2476
  {
@@ -2453,7 +2520,7 @@
2453
2520
  "z": "b195bc3ca2e1a665",
2454
2521
  "g": "ec36901abb138306",
2455
2522
  "name": "Seite Prozessliste",
2456
- "func": "msg.payload = {\n page: \"Prozessliste\"\n};\nreturn msg;\n",
2523
+ "func": "msg.payload = {\n page: \"Prozessinstanzliste\"\n};\nreturn msg;\n",
2457
2524
  "outputs": 1,
2458
2525
  "timeout": 0,
2459
2526
  "noerr": 0,
@@ -2481,5 +2548,377 @@
2481
2548
  "wires": [
2482
2549
  []
2483
2550
  ]
2551
+ },
2552
+ {
2553
+ "id": "5399c05e8fea3679",
2554
+ "type": "debug",
2555
+ "z": "b195bc3ca2e1a665",
2556
+ "g": "ec36901abb138306",
2557
+ "name": "debug 20",
2558
+ "active": true,
2559
+ "tosidebar": true,
2560
+ "console": false,
2561
+ "tostatus": false,
2562
+ "complete": "false",
2563
+ "statusVal": "",
2564
+ "statusType": "auto",
2565
+ "x": 1040,
2566
+ "y": 480,
2567
+ "wires": []
2568
+ },
2569
+ {
2570
+ "id": "7c994e7efb87d61f",
2571
+ "type": "comment",
2572
+ "z": "b195bc3ca2e1a665",
2573
+ "g": "17b562c4786348d6",
2574
+ "name": "Laden von Prozessen, die gestartet werden können",
2575
+ "info": "",
2576
+ "x": 250,
2577
+ "y": 860,
2578
+ "wires": []
2579
+ },
2580
+ {
2581
+ "id": "879b5476deda73b0",
2582
+ "type": "ui-event",
2583
+ "z": "b195bc3ca2e1a665",
2584
+ "g": "17b562c4786348d6",
2585
+ "ui": "26a45d43c064bdb6",
2586
+ "name": "",
2587
+ "x": 140,
2588
+ "y": 980,
2589
+ "wires": [
2590
+ [
2591
+ "20f5318774b56550"
2592
+ ]
2593
+ ]
2594
+ },
2595
+ {
2596
+ "id": "a5074076a34de015",
2597
+ "type": "switch",
2598
+ "z": "b195bc3ca2e1a665",
2599
+ "g": "17b562c4786348d6",
2600
+ "name": "Seite == \"Prozessliste\"",
2601
+ "property": "payload.page.name",
2602
+ "propertyType": "msg",
2603
+ "rules": [
2604
+ {
2605
+ "t": "eq",
2606
+ "v": "Prozessliste",
2607
+ "vt": "str"
2608
+ }
2609
+ ],
2610
+ "checkall": "true",
2611
+ "repair": false,
2612
+ "outputs": 1,
2613
+ "x": 380,
2614
+ "y": 1000,
2615
+ "wires": [
2616
+ [
2617
+ "eb1669dc281aacda"
2618
+ ]
2619
+ ]
2620
+ },
2621
+ {
2622
+ "id": "20f5318774b56550",
2623
+ "type": "switch",
2624
+ "z": "b195bc3ca2e1a665",
2625
+ "g": "17b562c4786348d6",
2626
+ "name": "Seite sichtbar",
2627
+ "property": "topic",
2628
+ "propertyType": "msg",
2629
+ "rules": [
2630
+ {
2631
+ "t": "eq",
2632
+ "v": "$pageview",
2633
+ "vt": "str"
2634
+ }
2635
+ ],
2636
+ "checkall": "true",
2637
+ "repair": false,
2638
+ "outputs": 1,
2639
+ "x": 400,
2640
+ "y": 940,
2641
+ "wires": [
2642
+ [
2643
+ "a5074076a34de015"
2644
+ ]
2645
+ ]
2646
+ },
2647
+ {
2648
+ "id": "eb1669dc281aacda",
2649
+ "type": "http request",
2650
+ "z": "b195bc3ca2e1a665",
2651
+ "g": "17b562c4786348d6",
2652
+ "name": "",
2653
+ "method": "GET",
2654
+ "ret": "obj",
2655
+ "paytoqs": "ignore",
2656
+ "url": "http://localhost:56000/atlas_engine/api/v1/process_models",
2657
+ "tls": "",
2658
+ "persist": false,
2659
+ "proxy": "",
2660
+ "insecureHTTPParser": false,
2661
+ "authType": "bearer",
2662
+ "senderr": false,
2663
+ "headers": [],
2664
+ "x": 410,
2665
+ "y": 1060,
2666
+ "wires": [
2667
+ [
2668
+ "85d11ea49087d7a8"
2669
+ ]
2670
+ ]
2671
+ },
2672
+ {
2673
+ "id": "32d39cbbad223e48",
2674
+ "type": "inject",
2675
+ "z": "b195bc3ca2e1a665",
2676
+ "g": "17b562c4786348d6",
2677
+ "name": "",
2678
+ "props": [
2679
+ {
2680
+ "p": "payload"
2681
+ }
2682
+ ],
2683
+ "repeat": "",
2684
+ "crontab": "",
2685
+ "once": false,
2686
+ "onceDelay": 0.1,
2687
+ "topic": "",
2688
+ "payload": "do",
2689
+ "payloadType": "str",
2690
+ "x": 150,
2691
+ "y": 1060,
2692
+ "wires": [
2693
+ [
2694
+ "eb1669dc281aacda"
2695
+ ]
2696
+ ]
2697
+ },
2698
+ {
2699
+ "id": "85d11ea49087d7a8",
2700
+ "type": "function",
2701
+ "z": "b195bc3ca2e1a665",
2702
+ "g": "17b562c4786348d6",
2703
+ "name": "Felder filtern",
2704
+ "func": "const table = [];\n\nmsg.payload.processModels.forEach(function(processModel) {\n processModel.startEvents.forEach(function(startEvent) {\n const row = {\n processModelName: processModel.processModelName,\n startEventName: startEvent.name,\n processModelId: processModel.processModelId,\n startEventId: startEvent.id\n };\n\n table.push(row); \n });\n});\n\nmsg.payload = table;\n\nreturn msg;",
2705
+ "outputs": 1,
2706
+ "timeout": 0,
2707
+ "noerr": 0,
2708
+ "initialize": "",
2709
+ "finalize": "",
2710
+ "libs": [],
2711
+ "x": 610,
2712
+ "y": 1060,
2713
+ "wires": [
2714
+ [
2715
+ "0061d335785a97c5",
2716
+ "298195cb7721ddce"
2717
+ ]
2718
+ ]
2719
+ },
2720
+ {
2721
+ "id": "0061d335785a97c5",
2722
+ "type": "debug",
2723
+ "z": "b195bc3ca2e1a665",
2724
+ "g": "17b562c4786348d6",
2725
+ "name": "debug 22",
2726
+ "active": true,
2727
+ "tosidebar": true,
2728
+ "console": false,
2729
+ "tostatus": false,
2730
+ "complete": "false",
2731
+ "statusVal": "",
2732
+ "statusType": "auto",
2733
+ "x": 800,
2734
+ "y": 1060,
2735
+ "wires": []
2736
+ },
2737
+ {
2738
+ "id": "298195cb7721ddce",
2739
+ "type": "ui-table",
2740
+ "z": "b195bc3ca2e1a665",
2741
+ "g": "17b562c4786348d6",
2742
+ "group": "8b1ddd3c46212b60",
2743
+ "name": "Prozessliste",
2744
+ "label": "text",
2745
+ "order": 1,
2746
+ "width": 0,
2747
+ "height": 0,
2748
+ "maxrows": 0,
2749
+ "passthru": false,
2750
+ "autocols": true,
2751
+ "showSearch": true,
2752
+ "selectionType": "click",
2753
+ "columns": [],
2754
+ "x": 810,
2755
+ "y": 1000,
2756
+ "wires": [
2757
+ [
2758
+ "807dd2529783550b",
2759
+ "b185b133c9ab43f9"
2760
+ ]
2761
+ ]
2762
+ },
2763
+ {
2764
+ "id": "bd166ce901b6bd37",
2765
+ "type": "ui-button",
2766
+ "z": "b195bc3ca2e1a665",
2767
+ "g": "17b562c4786348d6",
2768
+ "group": "8b1ddd3c46212b60",
2769
+ "name": "",
2770
+ "label": "Prozesse laden",
2771
+ "order": 2,
2772
+ "width": 0,
2773
+ "height": 0,
2774
+ "emulateClick": false,
2775
+ "tooltip": "",
2776
+ "color": "",
2777
+ "bgcolor": "",
2778
+ "className": "",
2779
+ "icon": "",
2780
+ "iconPosition": "left",
2781
+ "payload": "",
2782
+ "payloadType": "str",
2783
+ "topic": "topic",
2784
+ "topicType": "msg",
2785
+ "x": 120,
2786
+ "y": 940,
2787
+ "wires": [
2788
+ [
2789
+ "20f5318774b56550"
2790
+ ]
2791
+ ]
2792
+ },
2793
+ {
2794
+ "id": "807dd2529783550b",
2795
+ "type": "debug",
2796
+ "z": "b195bc3ca2e1a665",
2797
+ "g": "17b562c4786348d6",
2798
+ "name": "debug 23",
2799
+ "active": true,
2800
+ "tosidebar": true,
2801
+ "console": false,
2802
+ "tostatus": false,
2803
+ "complete": "false",
2804
+ "statusVal": "",
2805
+ "statusType": "auto",
2806
+ "x": 1000,
2807
+ "y": 1060,
2808
+ "wires": []
2809
+ },
2810
+ {
2811
+ "id": "176a754c8b39063c",
2812
+ "type": "process-start",
2813
+ "z": "b195bc3ca2e1a665",
2814
+ "g": "17b562c4786348d6",
2815
+ "name": "",
2816
+ "engine": "d042a4c68f51d6ab",
2817
+ "processmodel": "",
2818
+ "startevent": "",
2819
+ "x": 1250,
2820
+ "y": 1000,
2821
+ "wires": [
2822
+ [
2823
+ "605e432d57d4a7e6"
2824
+ ]
2825
+ ]
2826
+ },
2827
+ {
2828
+ "id": "b185b133c9ab43f9",
2829
+ "type": "function",
2830
+ "z": "b195bc3ca2e1a665",
2831
+ "g": "17b562c4786348d6",
2832
+ "name": "pre startparameter",
2833
+ "func": "const a = {\n \"processModelName\": \"Sample_UserTask\",\n \"startEventName\": \"Start\",\n \"processModelId\": \"Sample_UserTask_Process\",\n \"startEventId\": \"StartEvent_1\"\n};\n\nmsg.processModelId = msg.payload.processModelId;\nmsg.startEventId = msg.payload.startEventId;\n\nmsg.payload = {};\n\nreturn msg;",
2834
+ "outputs": 1,
2835
+ "timeout": 0,
2836
+ "noerr": 0,
2837
+ "initialize": "",
2838
+ "finalize": "",
2839
+ "libs": [],
2840
+ "x": 1030,
2841
+ "y": 1000,
2842
+ "wires": [
2843
+ [
2844
+ "176a754c8b39063c"
2845
+ ]
2846
+ ]
2847
+ },
2848
+ {
2849
+ "id": "0aeaca52ca60cadc",
2850
+ "type": "inject",
2851
+ "z": "b195bc3ca2e1a665",
2852
+ "g": "17b562c4786348d6",
2853
+ "name": "",
2854
+ "props": [
2855
+ {
2856
+ "p": "payload"
2857
+ }
2858
+ ],
2859
+ "repeat": "",
2860
+ "crontab": "",
2861
+ "once": false,
2862
+ "onceDelay": 0.1,
2863
+ "topic": "",
2864
+ "payload": "{\"processModelName\":\"Sample_UserTask\",\"startEventName\":\"Start\",\"processModelId\":\"Sample_UserTask_Process\",\"startEventId\":\"StartEvent_1\"}",
2865
+ "payloadType": "json",
2866
+ "x": 830,
2867
+ "y": 940,
2868
+ "wires": [
2869
+ [
2870
+ "b185b133c9ab43f9"
2871
+ ]
2872
+ ]
2873
+ },
2874
+ {
2875
+ "id": "a4f0eee35f06b1ff",
2876
+ "type": "link in",
2877
+ "z": "b195bc3ca2e1a665",
2878
+ "g": "09cdc14cfb8ad687",
2879
+ "name": "link in 2",
2880
+ "links": [
2881
+ "8db572babccdc189",
2882
+ "df4a9e9bf8c4077e",
2883
+ "8d44394092e39d99"
2884
+ ],
2885
+ "x": 105,
2886
+ "y": 300,
2887
+ "wires": [
2888
+ [
2889
+ "dbec84a2543dbe7e"
2890
+ ]
2891
+ ]
2892
+ },
2893
+ {
2894
+ "id": "df4a9e9bf8c4077e",
2895
+ "type": "link out",
2896
+ "z": "b195bc3ca2e1a665",
2897
+ "g": "bd2bef99e757d7bf",
2898
+ "name": "link out 2",
2899
+ "mode": "link",
2900
+ "links": [
2901
+ "a4f0eee35f06b1ff"
2902
+ ],
2903
+ "x": 295,
2904
+ "y": 720,
2905
+ "wires": []
2906
+ },
2907
+ {
2908
+ "id": "605e432d57d4a7e6",
2909
+ "type": "debug",
2910
+ "z": "b195bc3ca2e1a665",
2911
+ "g": "17b562c4786348d6",
2912
+ "name": "debug 24",
2913
+ "active": true,
2914
+ "tosidebar": true,
2915
+ "console": false,
2916
+ "tostatus": false,
2917
+ "complete": "false",
2918
+ "statusVal": "",
2919
+ "statusType": "auto",
2920
+ "x": 1420,
2921
+ "y": 1000,
2922
+ "wires": []
2484
2923
  }
2485
2924
  ]
@@ -80,7 +80,8 @@
80
80
  "97afbbf01ec1cd88",
81
81
  "2b3f33b7a9dceb49",
82
82
  "a61cb4c20f79d872",
83
- "111c8606ea343c1f"
83
+ "111c8606ea343c1f",
84
+ "a4f0eee35f06b1ff"
84
85
  ],
85
86
  "x": 14,
86
87
  "y": 59,
@@ -111,7 +112,8 @@
111
112
  "915816cdb895af14",
112
113
  "51324058434239ba",
113
114
  "814ff7cf02987e14",
114
- "0add5e307323845e"
115
+ "0add5e307323845e",
116
+ "5399c05e8fea3679"
115
117
  ],
116
118
  "x": 14,
117
119
  "y": 419,
@@ -182,15 +184,16 @@
182
184
  "nodes": [
183
185
  "3ad37ecdb59b7314",
184
186
  "54a2572d4a48cf34",
185
- "4f4ff5d35037207a",
186
- "1a237533ba8a9376",
187
187
  "4813eab6c5a5faf9",
188
- "19184f75b76893d0"
188
+ "1a237533ba8a9376",
189
+ "4f4ff5d35037207a",
190
+ "19184f75b76893d0",
191
+ "df4a9e9bf8c4077e"
189
192
  ],
190
193
  "x": 14,
191
- "y": 639,
194
+ "y": 619,
192
195
  "w": 852,
193
- "h": 162
196
+ "h": 182
194
197
  },
195
198
  {
196
199
  "id": "02fef81e2129ea71",
@@ -218,6 +221,41 @@
218
221
  "w": 632,
219
222
  "h": 202
220
223
  },
224
+ {
225
+ "id": "17b562c4786348d6",
226
+ "type": "group",
227
+ "z": "b195bc3ca2e1a665",
228
+ "style": {
229
+ "stroke": "#999999",
230
+ "stroke-opacity": "1",
231
+ "fill": "none",
232
+ "fill-opacity": "1",
233
+ "label": true,
234
+ "label-position": "nw",
235
+ "color": "#a4a4a4"
236
+ },
237
+ "nodes": [
238
+ "7c994e7efb87d61f",
239
+ "879b5476deda73b0",
240
+ "a5074076a34de015",
241
+ "20f5318774b56550",
242
+ "eb1669dc281aacda",
243
+ "32d39cbbad223e48",
244
+ "85d11ea49087d7a8",
245
+ "0061d335785a97c5",
246
+ "298195cb7721ddce",
247
+ "bd166ce901b6bd37",
248
+ "807dd2529783550b",
249
+ "176a754c8b39063c",
250
+ "b185b133c9ab43f9",
251
+ "0aeaca52ca60cadc",
252
+ "605e432d57d4a7e6"
253
+ ],
254
+ "x": 14,
255
+ "y": 819,
256
+ "w": 1512,
257
+ "h": 282
258
+ },
221
259
  {
222
260
  "id": "d042a4c68f51d6ab",
223
261
  "type": "processcube-engine-config",
@@ -266,9 +304,9 @@
266
304
  {
267
305
  "id": "b4dcca3f3d895ff7",
268
306
  "type": "ui-page",
269
- "name": "Prozessliste",
307
+ "name": "Prozessinstanzliste",
270
308
  "ui": "26a45d43c064bdb6",
271
- "path": "/Prozessliste",
309
+ "path": "/Prozessinstanzliste",
272
310
  "icon": "home",
273
311
  "layout": "grid",
274
312
  "theme": "7175f012d8e51857",
@@ -314,6 +352,33 @@
314
352
  "type": "processcube-engine-config",
315
353
  "url": "http://engine:8000"
316
354
  },
355
+ {
356
+ "id": "1b45fbda916a0a2d",
357
+ "type": "ui-page",
358
+ "name": "Prozessliste",
359
+ "ui": "26a45d43c064bdb6",
360
+ "path": "/Prozessliste",
361
+ "icon": "home",
362
+ "layout": "grid",
363
+ "theme": "7175f012d8e51857",
364
+ "order": 3,
365
+ "className": "",
366
+ "visible": "true",
367
+ "disabled": "false"
368
+ },
369
+ {
370
+ "id": "8b1ddd3c46212b60",
371
+ "type": "ui-group",
372
+ "name": "Prozessliste",
373
+ "page": "1b45fbda916a0a2d",
374
+ "width": "12",
375
+ "height": "1",
376
+ "order": 1,
377
+ "showTitle": false,
378
+ "className": "",
379
+ "visible": "true",
380
+ "disabled": "false"
381
+ },
317
382
  {
318
383
  "id": "84f18cf9bf25b858",
319
384
  "type": "openApi-red",
@@ -2229,7 +2294,8 @@
2229
2294
  "y": 520,
2230
2295
  "wires": [
2231
2296
  [
2232
- "915816cdb895af14"
2297
+ "915816cdb895af14",
2298
+ "5399c05e8fea3679"
2233
2299
  ]
2234
2300
  ]
2235
2301
  },
@@ -2324,7 +2390,8 @@
2324
2390
  "y": 760,
2325
2391
  "wires": [
2326
2392
  [
2327
- "4813eab6c5a5faf9"
2393
+ "4813eab6c5a5faf9",
2394
+ "df4a9e9bf8c4077e"
2328
2395
  ]
2329
2396
  ]
2330
2397
  },
@@ -2402,8 +2469,8 @@
2402
2469
  "complete": "false",
2403
2470
  "statusVal": "",
2404
2471
  "statusType": "auto",
2405
- "x": 540,
2406
- "y": 700,
2472
+ "x": 560,
2473
+ "y": 660,
2407
2474
  "wires": []
2408
2475
  },
2409
2476
  {
@@ -2453,7 +2520,7 @@
2453
2520
  "z": "b195bc3ca2e1a665",
2454
2521
  "g": "ec36901abb138306",
2455
2522
  "name": "Seite Prozessliste",
2456
- "func": "msg.payload = {\n page: \"Prozessliste\"\n};\nreturn msg;\n",
2523
+ "func": "msg.payload = {\n page: \"Prozessinstanzliste\"\n};\nreturn msg;\n",
2457
2524
  "outputs": 1,
2458
2525
  "timeout": 0,
2459
2526
  "noerr": 0,
@@ -2481,5 +2548,377 @@
2481
2548
  "wires": [
2482
2549
  []
2483
2550
  ]
2551
+ },
2552
+ {
2553
+ "id": "5399c05e8fea3679",
2554
+ "type": "debug",
2555
+ "z": "b195bc3ca2e1a665",
2556
+ "g": "ec36901abb138306",
2557
+ "name": "debug 20",
2558
+ "active": true,
2559
+ "tosidebar": true,
2560
+ "console": false,
2561
+ "tostatus": false,
2562
+ "complete": "false",
2563
+ "statusVal": "",
2564
+ "statusType": "auto",
2565
+ "x": 1040,
2566
+ "y": 480,
2567
+ "wires": []
2568
+ },
2569
+ {
2570
+ "id": "7c994e7efb87d61f",
2571
+ "type": "comment",
2572
+ "z": "b195bc3ca2e1a665",
2573
+ "g": "17b562c4786348d6",
2574
+ "name": "Laden von Prozessen, die gestartet werden können",
2575
+ "info": "",
2576
+ "x": 250,
2577
+ "y": 860,
2578
+ "wires": []
2579
+ },
2580
+ {
2581
+ "id": "879b5476deda73b0",
2582
+ "type": "ui-event",
2583
+ "z": "b195bc3ca2e1a665",
2584
+ "g": "17b562c4786348d6",
2585
+ "ui": "26a45d43c064bdb6",
2586
+ "name": "",
2587
+ "x": 140,
2588
+ "y": 980,
2589
+ "wires": [
2590
+ [
2591
+ "20f5318774b56550"
2592
+ ]
2593
+ ]
2594
+ },
2595
+ {
2596
+ "id": "a5074076a34de015",
2597
+ "type": "switch",
2598
+ "z": "b195bc3ca2e1a665",
2599
+ "g": "17b562c4786348d6",
2600
+ "name": "Seite == \"Prozessliste\"",
2601
+ "property": "payload.page.name",
2602
+ "propertyType": "msg",
2603
+ "rules": [
2604
+ {
2605
+ "t": "eq",
2606
+ "v": "Prozessliste",
2607
+ "vt": "str"
2608
+ }
2609
+ ],
2610
+ "checkall": "true",
2611
+ "repair": false,
2612
+ "outputs": 1,
2613
+ "x": 380,
2614
+ "y": 1000,
2615
+ "wires": [
2616
+ [
2617
+ "eb1669dc281aacda"
2618
+ ]
2619
+ ]
2620
+ },
2621
+ {
2622
+ "id": "20f5318774b56550",
2623
+ "type": "switch",
2624
+ "z": "b195bc3ca2e1a665",
2625
+ "g": "17b562c4786348d6",
2626
+ "name": "Seite sichtbar",
2627
+ "property": "topic",
2628
+ "propertyType": "msg",
2629
+ "rules": [
2630
+ {
2631
+ "t": "eq",
2632
+ "v": "$pageview",
2633
+ "vt": "str"
2634
+ }
2635
+ ],
2636
+ "checkall": "true",
2637
+ "repair": false,
2638
+ "outputs": 1,
2639
+ "x": 400,
2640
+ "y": 940,
2641
+ "wires": [
2642
+ [
2643
+ "a5074076a34de015"
2644
+ ]
2645
+ ]
2646
+ },
2647
+ {
2648
+ "id": "eb1669dc281aacda",
2649
+ "type": "http request",
2650
+ "z": "b195bc3ca2e1a665",
2651
+ "g": "17b562c4786348d6",
2652
+ "name": "",
2653
+ "method": "GET",
2654
+ "ret": "obj",
2655
+ "paytoqs": "ignore",
2656
+ "url": "http://localhost:56000/atlas_engine/api/v1/process_models",
2657
+ "tls": "",
2658
+ "persist": false,
2659
+ "proxy": "",
2660
+ "insecureHTTPParser": false,
2661
+ "authType": "bearer",
2662
+ "senderr": false,
2663
+ "headers": [],
2664
+ "x": 410,
2665
+ "y": 1060,
2666
+ "wires": [
2667
+ [
2668
+ "85d11ea49087d7a8"
2669
+ ]
2670
+ ]
2671
+ },
2672
+ {
2673
+ "id": "32d39cbbad223e48",
2674
+ "type": "inject",
2675
+ "z": "b195bc3ca2e1a665",
2676
+ "g": "17b562c4786348d6",
2677
+ "name": "",
2678
+ "props": [
2679
+ {
2680
+ "p": "payload"
2681
+ }
2682
+ ],
2683
+ "repeat": "",
2684
+ "crontab": "",
2685
+ "once": false,
2686
+ "onceDelay": 0.1,
2687
+ "topic": "",
2688
+ "payload": "do",
2689
+ "payloadType": "str",
2690
+ "x": 150,
2691
+ "y": 1060,
2692
+ "wires": [
2693
+ [
2694
+ "eb1669dc281aacda"
2695
+ ]
2696
+ ]
2697
+ },
2698
+ {
2699
+ "id": "85d11ea49087d7a8",
2700
+ "type": "function",
2701
+ "z": "b195bc3ca2e1a665",
2702
+ "g": "17b562c4786348d6",
2703
+ "name": "Felder filtern",
2704
+ "func": "const table = [];\n\nmsg.payload.processModels.forEach(function(processModel) {\n processModel.startEvents.forEach(function(startEvent) {\n const row = {\n processModelName: processModel.processModelName,\n startEventName: startEvent.name,\n processModelId: processModel.processModelId,\n startEventId: startEvent.id\n };\n\n table.push(row); \n });\n});\n\nmsg.payload = table;\n\nreturn msg;",
2705
+ "outputs": 1,
2706
+ "timeout": 0,
2707
+ "noerr": 0,
2708
+ "initialize": "",
2709
+ "finalize": "",
2710
+ "libs": [],
2711
+ "x": 610,
2712
+ "y": 1060,
2713
+ "wires": [
2714
+ [
2715
+ "0061d335785a97c5",
2716
+ "298195cb7721ddce"
2717
+ ]
2718
+ ]
2719
+ },
2720
+ {
2721
+ "id": "0061d335785a97c5",
2722
+ "type": "debug",
2723
+ "z": "b195bc3ca2e1a665",
2724
+ "g": "17b562c4786348d6",
2725
+ "name": "debug 22",
2726
+ "active": true,
2727
+ "tosidebar": true,
2728
+ "console": false,
2729
+ "tostatus": false,
2730
+ "complete": "false",
2731
+ "statusVal": "",
2732
+ "statusType": "auto",
2733
+ "x": 800,
2734
+ "y": 1060,
2735
+ "wires": []
2736
+ },
2737
+ {
2738
+ "id": "298195cb7721ddce",
2739
+ "type": "ui-table",
2740
+ "z": "b195bc3ca2e1a665",
2741
+ "g": "17b562c4786348d6",
2742
+ "group": "8b1ddd3c46212b60",
2743
+ "name": "Prozessliste",
2744
+ "label": "text",
2745
+ "order": 1,
2746
+ "width": 0,
2747
+ "height": 0,
2748
+ "maxrows": 0,
2749
+ "passthru": false,
2750
+ "autocols": true,
2751
+ "showSearch": true,
2752
+ "selectionType": "click",
2753
+ "columns": [],
2754
+ "x": 810,
2755
+ "y": 1000,
2756
+ "wires": [
2757
+ [
2758
+ "807dd2529783550b",
2759
+ "b185b133c9ab43f9"
2760
+ ]
2761
+ ]
2762
+ },
2763
+ {
2764
+ "id": "bd166ce901b6bd37",
2765
+ "type": "ui-button",
2766
+ "z": "b195bc3ca2e1a665",
2767
+ "g": "17b562c4786348d6",
2768
+ "group": "8b1ddd3c46212b60",
2769
+ "name": "",
2770
+ "label": "Prozesse laden",
2771
+ "order": 2,
2772
+ "width": 0,
2773
+ "height": 0,
2774
+ "emulateClick": false,
2775
+ "tooltip": "",
2776
+ "color": "",
2777
+ "bgcolor": "",
2778
+ "className": "",
2779
+ "icon": "",
2780
+ "iconPosition": "left",
2781
+ "payload": "",
2782
+ "payloadType": "str",
2783
+ "topic": "topic",
2784
+ "topicType": "msg",
2785
+ "x": 120,
2786
+ "y": 1020,
2787
+ "wires": [
2788
+ [
2789
+ "eb1669dc281aacda"
2790
+ ]
2791
+ ]
2792
+ },
2793
+ {
2794
+ "id": "807dd2529783550b",
2795
+ "type": "debug",
2796
+ "z": "b195bc3ca2e1a665",
2797
+ "g": "17b562c4786348d6",
2798
+ "name": "debug 23",
2799
+ "active": true,
2800
+ "tosidebar": true,
2801
+ "console": false,
2802
+ "tostatus": false,
2803
+ "complete": "false",
2804
+ "statusVal": "",
2805
+ "statusType": "auto",
2806
+ "x": 1000,
2807
+ "y": 1060,
2808
+ "wires": []
2809
+ },
2810
+ {
2811
+ "id": "176a754c8b39063c",
2812
+ "type": "process-start",
2813
+ "z": "b195bc3ca2e1a665",
2814
+ "g": "17b562c4786348d6",
2815
+ "name": "",
2816
+ "engine": "d042a4c68f51d6ab",
2817
+ "processmodel": "",
2818
+ "startevent": "",
2819
+ "x": 1250,
2820
+ "y": 1000,
2821
+ "wires": [
2822
+ [
2823
+ "605e432d57d4a7e6"
2824
+ ]
2825
+ ]
2826
+ },
2827
+ {
2828
+ "id": "b185b133c9ab43f9",
2829
+ "type": "function",
2830
+ "z": "b195bc3ca2e1a665",
2831
+ "g": "17b562c4786348d6",
2832
+ "name": "pre startparameter",
2833
+ "func": "const a = {\n \"processModelName\": \"Sample_UserTask\",\n \"startEventName\": \"Start\",\n \"processModelId\": \"Sample_UserTask_Process\",\n \"startEventId\": \"StartEvent_1\"\n};\n\nmsg.processModelId = msg.payload.processModelId;\nmsg.startEventId = msg.payload.startEventId;\n\nmsg.payload = {};\n\nreturn msg;",
2834
+ "outputs": 1,
2835
+ "timeout": 0,
2836
+ "noerr": 0,
2837
+ "initialize": "",
2838
+ "finalize": "",
2839
+ "libs": [],
2840
+ "x": 1030,
2841
+ "y": 1000,
2842
+ "wires": [
2843
+ [
2844
+ "176a754c8b39063c"
2845
+ ]
2846
+ ]
2847
+ },
2848
+ {
2849
+ "id": "0aeaca52ca60cadc",
2850
+ "type": "inject",
2851
+ "z": "b195bc3ca2e1a665",
2852
+ "g": "17b562c4786348d6",
2853
+ "name": "",
2854
+ "props": [
2855
+ {
2856
+ "p": "payload"
2857
+ }
2858
+ ],
2859
+ "repeat": "",
2860
+ "crontab": "",
2861
+ "once": false,
2862
+ "onceDelay": 0.1,
2863
+ "topic": "",
2864
+ "payload": "{\"processModelName\":\"Sample_UserTask\",\"startEventName\":\"Start\",\"processModelId\":\"Sample_UserTask_Process\",\"startEventId\":\"StartEvent_1\"}",
2865
+ "payloadType": "json",
2866
+ "x": 830,
2867
+ "y": 940,
2868
+ "wires": [
2869
+ [
2870
+ "b185b133c9ab43f9"
2871
+ ]
2872
+ ]
2873
+ },
2874
+ {
2875
+ "id": "a4f0eee35f06b1ff",
2876
+ "type": "link in",
2877
+ "z": "b195bc3ca2e1a665",
2878
+ "g": "09cdc14cfb8ad687",
2879
+ "name": "link in 2",
2880
+ "links": [
2881
+ "8db572babccdc189",
2882
+ "df4a9e9bf8c4077e",
2883
+ "8d44394092e39d99"
2884
+ ],
2885
+ "x": 105,
2886
+ "y": 300,
2887
+ "wires": [
2888
+ [
2889
+ "dbec84a2543dbe7e"
2890
+ ]
2891
+ ]
2892
+ },
2893
+ {
2894
+ "id": "df4a9e9bf8c4077e",
2895
+ "type": "link out",
2896
+ "z": "b195bc3ca2e1a665",
2897
+ "g": "bd2bef99e757d7bf",
2898
+ "name": "link out 2",
2899
+ "mode": "link",
2900
+ "links": [
2901
+ "a4f0eee35f06b1ff"
2902
+ ],
2903
+ "x": 295,
2904
+ "y": 720,
2905
+ "wires": []
2906
+ },
2907
+ {
2908
+ "id": "605e432d57d4a7e6",
2909
+ "type": "debug",
2910
+ "z": "b195bc3ca2e1a665",
2911
+ "g": "17b562c4786348d6",
2912
+ "name": "debug 24",
2913
+ "active": true,
2914
+ "tosidebar": true,
2915
+ "console": false,
2916
+ "tostatus": false,
2917
+ "complete": "false",
2918
+ "statusVal": "",
2919
+ "statusType": "auto",
2920
+ "x": 1420,
2921
+ "y": 1000,
2922
+ "wires": []
2484
2923
  }
2485
2924
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.3.5-feature-e28c82-lxj4lazd",
3
+ "version": "0.4.0-develop-0af97c-lxlkzmsr",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "authors": [
@@ -5,8 +5,8 @@
5
5
  defaults: {
6
6
  name: {value: ""},
7
7
  engine: {value: "", type: "processcube-engine-config"},
8
- processmodel: {value: "", required: true},
9
- startevent: {value: ""}
8
+ processmodel: {value: "", required: false},
9
+ startevent: {value: "", required: false}
10
10
  },
11
11
  inputs: 1,
12
12
  outputs: 1,
@@ -37,5 +37,20 @@
37
37
  </script>
38
38
 
39
39
  <script type="text/html" data-help-name="process-start">
40
- <p>A node which that starts a process of https://processcube.io</p>
40
+ <h2>Start a Processmodel in the ProcessCube</h2>
41
+ <p>
42
+ If the <code>msg.payload</code> is set, it will be used as the input for the process.
43
+ </p>
44
+ <p>
45
+ If a <code>msg.processModelId</code> is set, it will be used as the process model and
46
+ override the configured <b>Processmodel</b>.
47
+ </p>
48
+ <p>
49
+ If a <code>msg.startEventId</code> is set, it will be used as the start event and
50
+ override the configured <b>Startevent</b>.
51
+ </p>
52
+ <h3>More documentation</h3>
53
+ <p>
54
+ The Dokumenation can be found on <a href="https://processcube.io">ProcessCube Developer Network</a>.
55
+ </p>
41
56
  </script>
package/process-start.js CHANGED
@@ -1,10 +1,6 @@
1
1
  const process = require('process');
2
2
  const engine_client = require('@5minds/processcube_engine_client');
3
3
 
4
- const engineUrl = process.env.ENGINE_URL || 'http://engine:8000';
5
-
6
- const client = new engine_client.EngineClient(engineUrl);
7
-
8
4
  module.exports = function(RED) {
9
5
  function ProcessStart(config) {
10
6
  RED.nodes.createNode(this,config);
@@ -25,13 +21,13 @@ module.exports = function(RED) {
25
21
 
26
22
  node.on('input', function(msg) {
27
23
 
28
- client.processDefinitions.startProcessInstance({
29
-
30
- processModelId: config.processmodel,
31
- startEventId: config.startevent,
24
+ const startParameters = {
25
+ processModelId: msg.processModelId || config.processmodel,
26
+ startEventId: msg.startEventId || config.startevent,
32
27
  initialToken: msg.payload
33
-
34
- }).then((result) => {
28
+ };
29
+
30
+ client.processDefinitions.startProcessInstance(startParameters).then((result) => {
35
31
 
36
32
  msg.payload = result;
37
33
 
@@ -32,7 +32,7 @@
32
32
  <camunda:value id="value_02" name="Value 02" />
33
33
  </camunda:formField>
34
34
  <camunda:formField id="boolean_id" label="Boolean Label" type="boolean" />
35
- <camunda:formField id="customer_01" label="Custom_01" type="string" />
35
+ <camunda:formField id="customer_01" label="Custom_01" type="v-text-field" />
36
36
  </camunda:formData>
37
37
  </bpmn:extensionElements>
38
38
  <bpmn:incoming>Flow_1h0giih</bpmn:incoming>
@@ -41,6 +41,8 @@ module.exports = function(RED) {
41
41
  console.log(`UserTask with id ${flowNodeInstanceId} finished.`);
42
42
 
43
43
  node.send(msg);
44
+ }).catch(error => {
45
+ node.error(error);
44
46
  });
45
47
  } else {
46
48
  console.log(`No UserTask found in message: ${JSON.stringify(msg.payload)}`);