@5minds/node-red-contrib-processcube 0.15.0-fix-error-in-process-instance-query-8fa811-lz054xqa → 1.0.0-develop-243715-lz1qpiwj

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/Dockerfile +2 -0
  2. package/endevent-finished-listener.html +50 -0
  3. package/endevent-finished-listener.js +52 -0
  4. package/examples/Definition-Query-Sample.json +215 -0
  5. package/examples/External-Task-Sample.json +142 -1
  6. package/examples/Instance-Query-Sample.json +110 -0
  7. package/examples/User-Task-Sample.json +231 -0
  8. package/externaltask-error.html +8 -8
  9. package/externaltask-error.js +2 -2
  10. package/externaltask-input.html +7 -7
  11. package/externaltask-input.js +112 -98
  12. package/externaltask-output.html +3 -3
  13. package/externaltask-output.js +4 -5
  14. package/message-event-trigger.html +14 -2
  15. package/message-event-trigger.js +10 -5
  16. package/nodered/node-red-contrib-processcube-flows.json +364 -20
  17. package/nodered/settings.js +2 -1
  18. package/nodered/static/ProcessCube_Logo.svg +53 -0
  19. package/package.json +3 -5
  20. package/process-start.html +16 -13
  21. package/process-start.js +18 -6
  22. package/processcube-engine-config.html +16 -0
  23. package/processcube-engine-config.js +11 -14
  24. package/processdefinition-query.html +16 -2
  25. package/processdefinition-query.js +10 -19
  26. package/processes/User-Task-Sample.bpmn +57 -0
  27. package/processinstance-query.html +13 -2
  28. package/processinstance-query.js +9 -21
  29. package/signal-event-trigger.html +14 -2
  30. package/signal-event-trigger.js +14 -7
  31. package/usertask-finished-listener.html +15 -14
  32. package/usertask-finished-listener.js +26 -37
  33. package/usertask-input.html +15 -2
  34. package/usertask-input.js +20 -25
  35. package/usertask-new-listener.html +15 -14
  36. package/usertask-new-listener.js +18 -21
  37. package/usertask-output.html +13 -2
  38. package/usertask-output.js +11 -19
  39. package/processes/GetProcessModels.bpmn +0 -58
  40. package/processes/HelloWorld.bpmn +0 -124
@@ -18,7 +18,7 @@
18
18
  {
19
19
  "id": "fd3c725340de4f74",
20
20
  "type": "tab",
21
- "label": "UserTasks",
21
+ "label": "User Task Sample",
22
22
  "disabled": false,
23
23
  "info": "",
24
24
  "env": []
@@ -26,7 +26,7 @@
26
26
  {
27
27
  "id": "5d27ab4d14b947e9",
28
28
  "type": "tab",
29
- "label": "Process Instances",
29
+ "label": "Instances Query Sample",
30
30
  "disabled": false,
31
31
  "info": "",
32
32
  "env": []
@@ -34,7 +34,7 @@
34
34
  {
35
35
  "id": "f28ae6aa3a05069e",
36
36
  "type": "tab",
37
- "label": "Process Definitions",
37
+ "label": "Definition Query Sample",
38
38
  "disabled": false,
39
39
  "info": "",
40
40
  "env": []
@@ -162,6 +162,106 @@
162
162
  "w": 712,
163
163
  "h": 202
164
164
  },
165
+ {
166
+ "id": "390ad4a596a3c002",
167
+ "type": "group",
168
+ "z": "a23d2e782beb66f4",
169
+ "style": {
170
+ "stroke": "#999999",
171
+ "stroke-opacity": "1",
172
+ "fill": "none",
173
+ "fill-opacity": "1",
174
+ "label": true,
175
+ "label-position": "nw",
176
+ "color": "#a4a4a4"
177
+ },
178
+ "nodes": [
179
+ "529b24c862f7039d",
180
+ "f4011d6a57c6e13f",
181
+ "fba605329413c78d",
182
+ "5e5394e458d1de7c",
183
+ "18e9e15ef645a908",
184
+ "eb96f3128ece1be8"
185
+ ],
186
+ "x": 34,
187
+ "y": 499,
188
+ "w": 832,
189
+ "h": 202
190
+ },
191
+ {
192
+ "id": "887f3fb69ad1d1fb",
193
+ "type": "group",
194
+ "z": "fd3c725340de4f74",
195
+ "style": {
196
+ "stroke": "#999999",
197
+ "stroke-opacity": "1",
198
+ "fill": "none",
199
+ "fill-opacity": "1",
200
+ "label": true,
201
+ "label-position": "nw",
202
+ "color": "#a4a4a4"
203
+ },
204
+ "nodes": [
205
+ "f7a9604a17188737",
206
+ "020d34cd4ab43900",
207
+ "1db0ae57c1b8486b",
208
+ "127bc6e092c5724e"
209
+ ],
210
+ "x": 34,
211
+ "y": 19,
212
+ "w": 452,
213
+ "h": 202
214
+ },
215
+ {
216
+ "id": "72d3db13edc2486b",
217
+ "type": "group",
218
+ "z": "fd3c725340de4f74",
219
+ "style": {
220
+ "stroke": "#999999",
221
+ "stroke-opacity": "1",
222
+ "fill": "none",
223
+ "fill-opacity": "1",
224
+ "label": true,
225
+ "label-position": "nw",
226
+ "color": "#a4a4a4"
227
+ },
228
+ "nodes": [
229
+ "ae0583e83c762956",
230
+ "f7c7682e3a6adaaa",
231
+ "a2fb6369b16c12fa",
232
+ "8ef39e83173d41e3",
233
+ "f524b8cc35d56849",
234
+ "9fb4017c1d0ac7c9"
235
+ ],
236
+ "x": 34,
237
+ "y": 259,
238
+ "w": 652,
239
+ "h": 262
240
+ },
241
+ {
242
+ "id": "a71a168415778e2c",
243
+ "type": "group",
244
+ "z": "5d27ab4d14b947e9",
245
+ "style": {
246
+ "stroke": "#999999",
247
+ "stroke-opacity": "1",
248
+ "fill": "none",
249
+ "fill-opacity": "1",
250
+ "label": true,
251
+ "label-position": "nw",
252
+ "color": "#a4a4a4"
253
+ },
254
+ "nodes": [
255
+ "baa5d814f2e1f1d8",
256
+ "2af2c5031c617e3d",
257
+ "81af643792f131f0",
258
+ "2166b0f822b3e71d"
259
+ ],
260
+ "x": 34,
261
+ "y": 39,
262
+ "w": 652,
263
+ "h": 142
264
+ },
165
265
  {
166
266
  "id": "42e6796dddd9d4db",
167
267
  "type": "processcube-engine-config",
@@ -430,15 +530,132 @@
430
530
  "y": 40,
431
531
  "wires": []
432
532
  },
533
+ {
534
+ "id": "529b24c862f7039d",
535
+ "type": "endevent-finished-listener",
536
+ "z": "a23d2e782beb66f4",
537
+ "d": true,
538
+ "g": "390ad4a596a3c002",
539
+ "name": "",
540
+ "engine": "42e6796dddd9d4db",
541
+ "x": 170,
542
+ "y": 600,
543
+ "wires": [
544
+ [
545
+ "f4011d6a57c6e13f"
546
+ ]
547
+ ]
548
+ },
549
+ {
550
+ "id": "f4011d6a57c6e13f",
551
+ "type": "delay",
552
+ "z": "a23d2e782beb66f4",
553
+ "g": "390ad4a596a3c002",
554
+ "name": "",
555
+ "pauseType": "delay",
556
+ "timeout": "5",
557
+ "timeoutUnits": "seconds",
558
+ "rate": "1",
559
+ "nbRateUnits": "1",
560
+ "rateUnits": "second",
561
+ "randomFirst": "1",
562
+ "randomLast": "5",
563
+ "randomUnits": "seconds",
564
+ "drop": false,
565
+ "allowrate": false,
566
+ "outputs": 1,
567
+ "x": 400,
568
+ "y": 600,
569
+ "wires": [
570
+ [
571
+ "18e9e15ef645a908"
572
+ ]
573
+ ]
574
+ },
575
+ {
576
+ "id": "fba605329413c78d",
577
+ "type": "process-start",
578
+ "z": "a23d2e782beb66f4",
579
+ "g": "390ad4a596a3c002",
580
+ "name": "",
581
+ "engine": "42e6796dddd9d4db",
582
+ "processmodel": "External-Task-Sample_Process",
583
+ "startevent": "StartEvent_1",
584
+ "x": 770,
585
+ "y": 600,
586
+ "wires": [
587
+ []
588
+ ]
589
+ },
590
+ {
591
+ "id": "5e5394e458d1de7c",
592
+ "type": "inject",
593
+ "z": "a23d2e782beb66f4",
594
+ "g": "390ad4a596a3c002",
595
+ "name": "",
596
+ "props": [
597
+ {
598
+ "p": "payload"
599
+ }
600
+ ],
601
+ "repeat": "",
602
+ "crontab": "",
603
+ "once": false,
604
+ "onceDelay": 0.1,
605
+ "topic": "",
606
+ "payload": "start",
607
+ "payloadType": "str",
608
+ "x": 430,
609
+ "y": 660,
610
+ "wires": [
611
+ [
612
+ "18e9e15ef645a908"
613
+ ]
614
+ ]
615
+ },
616
+ {
617
+ "id": "18e9e15ef645a908",
618
+ "type": "function",
619
+ "z": "a23d2e782beb66f4",
620
+ "g": "390ad4a596a3c002",
621
+ "name": "pre payload",
622
+ "func": "msg.payload = {\n \"hello\": \"world\"\n};\n\nreturn msg;",
623
+ "outputs": 1,
624
+ "timeout": 0,
625
+ "noerr": 0,
626
+ "initialize": "",
627
+ "finalize": "",
628
+ "libs": [],
629
+ "x": 590,
630
+ "y": 600,
631
+ "wires": [
632
+ [
633
+ "fba605329413c78d"
634
+ ]
635
+ ]
636
+ },
637
+ {
638
+ "id": "eb96f3128ece1be8",
639
+ "type": "comment",
640
+ "z": "a23d2e782beb66f4",
641
+ "g": "390ad4a596a3c002",
642
+ "name": "Start of Process and restart if it is finished",
643
+ "info": "",
644
+ "x": 220,
645
+ "y": 540,
646
+ "wires": []
647
+ },
433
648
  {
434
649
  "id": "f7a9604a17188737",
435
650
  "type": "usertask-new-listener",
436
651
  "z": "fd3c725340de4f74",
652
+ "d": true,
653
+ "g": "887f3fb69ad1d1fb",
437
654
  "name": "New User Task",
438
655
  "engine": "42e6796dddd9d4db",
439
656
  "multisend": false,
440
- "x": 120,
441
- "y": 100,
657
+ "x": 160,
658
+ "y": 120,
442
659
  "wires": [
443
660
  [
444
661
  "020d34cd4ab43900"
@@ -449,6 +666,7 @@
449
666
  "id": "020d34cd4ab43900",
450
667
  "type": "debug",
451
668
  "z": "fd3c725340de4f74",
669
+ "g": "887f3fb69ad1d1fb",
452
670
  "name": "Show User Task",
453
671
  "active": true,
454
672
  "tosidebar": true,
@@ -458,18 +676,19 @@
458
676
  "targetType": "msg",
459
677
  "statusVal": "",
460
678
  "statusType": "auto",
461
- "x": 530,
462
- "y": 100,
679
+ "x": 360,
680
+ "y": 120,
463
681
  "wires": []
464
682
  },
465
683
  {
466
684
  "id": "1db0ae57c1b8486b",
467
685
  "type": "usertask-finished-listener",
468
686
  "z": "fd3c725340de4f74",
687
+ "g": "887f3fb69ad1d1fb",
469
688
  "name": "Finished User Task",
470
689
  "engine": "42e6796dddd9d4db",
471
690
  "multisend": false,
472
- "x": 130,
691
+ "x": 150,
473
692
  "y": 180,
474
693
  "wires": [
475
694
  [
@@ -477,16 +696,132 @@
477
696
  ]
478
697
  ]
479
698
  },
699
+ {
700
+ "id": "127bc6e092c5724e",
701
+ "type": "comment",
702
+ "z": "fd3c725340de4f74",
703
+ "g": "887f3fb69ad1d1fb",
704
+ "name": "User Task Events",
705
+ "info": "",
706
+ "x": 140,
707
+ "y": 60,
708
+ "wires": []
709
+ },
710
+ {
711
+ "id": "ae0583e83c762956",
712
+ "type": "usertask-new-listener",
713
+ "z": "fd3c725340de4f74",
714
+ "d": true,
715
+ "g": "72d3db13edc2486b",
716
+ "name": "",
717
+ "engine": "42e6796dddd9d4db",
718
+ "multisend": true,
719
+ "x": 160,
720
+ "y": 360,
721
+ "wires": [
722
+ [
723
+ "a2fb6369b16c12fa"
724
+ ]
725
+ ]
726
+ },
727
+ {
728
+ "id": "f7c7682e3a6adaaa",
729
+ "type": "usertask-input",
730
+ "z": "fd3c725340de4f74",
731
+ "g": "72d3db13edc2486b",
732
+ "name": "",
733
+ "engine": "42e6796dddd9d4db",
734
+ "query": "payload",
735
+ "query_type": "msg",
736
+ "force_send_array": false,
737
+ "multisend": false,
738
+ "x": 380,
739
+ "y": 420,
740
+ "wires": [
741
+ [
742
+ "8ef39e83173d41e3"
743
+ ]
744
+ ]
745
+ },
746
+ {
747
+ "id": "a2fb6369b16c12fa",
748
+ "type": "function",
749
+ "z": "fd3c725340de4f74",
750
+ "g": "72d3db13edc2486b",
751
+ "name": "query",
752
+ "func": "msg.payload = {\n flowNodeInstanceId: msg.payload.flowNodeInstanceId,\n flowNodeId: \"user_task\"\n};\n\nreturn msg;",
753
+ "outputs": 1,
754
+ "timeout": 0,
755
+ "noerr": 0,
756
+ "initialize": "",
757
+ "finalize": "",
758
+ "libs": [],
759
+ "x": 210,
760
+ "y": 420,
761
+ "wires": [
762
+ [
763
+ "f7c7682e3a6adaaa"
764
+ ]
765
+ ]
766
+ },
767
+ {
768
+ "id": "8ef39e83173d41e3",
769
+ "type": "function",
770
+ "z": "fd3c725340de4f74",
771
+ "g": "72d3db13edc2486b",
772
+ "name": "build result",
773
+ "func": "msg.payload.result = {\n \"field_01\": \"value 01\",\n \"field_02\": \"value 02\"\n}\nreturn msg;",
774
+ "outputs": 1,
775
+ "timeout": 0,
776
+ "noerr": 0,
777
+ "initialize": "",
778
+ "finalize": "",
779
+ "libs": [],
780
+ "x": 390,
781
+ "y": 480,
782
+ "wires": [
783
+ [
784
+ "f524b8cc35d56849"
785
+ ]
786
+ ]
787
+ },
788
+ {
789
+ "id": "f524b8cc35d56849",
790
+ "type": "usertask-output",
791
+ "z": "fd3c725340de4f74",
792
+ "g": "72d3db13edc2486b",
793
+ "name": "",
794
+ "engine": "42e6796dddd9d4db",
795
+ "result": "payload.result",
796
+ "result_type": "msg",
797
+ "x": 580,
798
+ "y": 480,
799
+ "wires": [
800
+ []
801
+ ]
802
+ },
803
+ {
804
+ "id": "9fb4017c1d0ac7c9",
805
+ "type": "comment",
806
+ "z": "fd3c725340de4f74",
807
+ "g": "72d3db13edc2486b",
808
+ "name": "Demo to listen on a new usertask an finish them",
809
+ "info": "",
810
+ "x": 240,
811
+ "y": 300,
812
+ "wires": []
813
+ },
480
814
  {
481
815
  "id": "baa5d814f2e1f1d8",
482
816
  "type": "processinstance-query",
483
817
  "z": "5d27ab4d14b947e9",
818
+ "g": "a71a168415778e2c",
484
819
  "name": "",
485
820
  "engine": "42e6796dddd9d4db",
486
821
  "query": "{\"includeXml\":false}",
487
822
  "query_type": "json",
488
- "x": 360,
489
- "y": 120,
823
+ "x": 320,
824
+ "y": 140,
490
825
  "wires": [
491
826
  [
492
827
  "2af2c5031c617e3d"
@@ -497,6 +832,7 @@
497
832
  "id": "2af2c5031c617e3d",
498
833
  "type": "debug",
499
834
  "z": "5d27ab4d14b947e9",
835
+ "g": "a71a168415778e2c",
500
836
  "name": "debug 25",
501
837
  "active": true,
502
838
  "tosidebar": true,
@@ -505,22 +841,19 @@
505
841
  "complete": "false",
506
842
  "statusVal": "",
507
843
  "statusType": "auto",
508
- "x": 600,
509
- "y": 120,
844
+ "x": 520,
845
+ "y": 140,
510
846
  "wires": []
511
847
  },
512
848
  {
513
849
  "id": "81af643792f131f0",
514
850
  "type": "inject",
515
851
  "z": "5d27ab4d14b947e9",
852
+ "g": "a71a168415778e2c",
516
853
  "name": "",
517
854
  "props": [
518
855
  {
519
856
  "p": "payload"
520
- },
521
- {
522
- "p": "topic",
523
- "vt": "str"
524
857
  }
525
858
  ],
526
859
  "repeat": "",
@@ -528,16 +861,27 @@
528
861
  "once": false,
529
862
  "onceDelay": 0.1,
530
863
  "topic": "",
531
- "payload": "",
532
- "payloadType": "date",
533
- "x": 100,
534
- "y": 120,
864
+ "payload": "go",
865
+ "payloadType": "str",
866
+ "x": 130,
867
+ "y": 140,
535
868
  "wires": [
536
869
  [
537
870
  "baa5d814f2e1f1d8"
538
871
  ]
539
872
  ]
540
873
  },
874
+ {
875
+ "id": "2166b0f822b3e71d",
876
+ "type": "comment",
877
+ "z": "5d27ab4d14b947e9",
878
+ "g": "a71a168415778e2c",
879
+ "name": "Query all processinstances from the engine, see the config of `processinstance-query`",
880
+ "info": "",
881
+ "x": 360,
882
+ "y": 80,
883
+ "wires": []
884
+ },
541
885
  {
542
886
  "id": "d97caca0ec54a633",
543
887
  "type": "processdefinition-query",
@@ -382,7 +382,8 @@ module.exports = {
382
382
  //tours: false,
383
383
 
384
384
  header: {
385
- title: 'Node-RED powered by ProcessCube ©',
385
+ title: ' powers by Node-RED',
386
+ image: "/data/static/ProcessCube_Logo.svg",
386
387
  url: 'https://processcube.io', // optional url to make the header text/image a link to this url
387
388
  },
388
389
  palette: {
@@ -0,0 +1,53 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 27.8.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="15"
4
+ viewBox="0 0 533.7 52.7" style="enable-background:new 0 0 533.7 52.7;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#F7A823;}
7
+ .st1{fill:none;}
8
+ .st2{enable-background:new ;}
9
+ @media (prefers-color-scheme: dark) {
10
+ path { fill: white; }
11
+ }
12
+ </style>
13
+ <g>
14
+ <path class="st0" d="M37.9,11H8.7v12.3h14.9c6.5,0,9.6,0.6,12.1,2.6c3.1,2.4,4.9,6.4,4.9,11.1c0,5.5-2.4,9.8-6.7,12.2
15
+ c-2.8,1.6-6.1,2.1-13.1,2.1H0v-7.1h21c3.2,0,5.5-0.4,7-1.1c1.9-0.9,3.1-3.2,3.1-6c0-2.6-1.2-4.8-3.1-5.8c-1.4-0.7-3.2-1-6.9-1H0
16
+ V3.9h37.9V11z"/>
17
+ </g>
18
+ <rect x="46.3" y="1.1" class="st1" width="487.4" height="60.1"/>
19
+ <g class="st2">
20
+ <path d="M92.3,20.8c0,10.4-7.7,16.8-20.1,16.8H61.5v13.7h-8.8V4h19.5C84.6,4,92.3,10.3,92.3,20.8z M83.4,20.8c0-5.9-4-9.4-11.7-9.4
21
+ H61.5v18.8h10.3C79.4,30.2,83.4,26.8,83.4,20.8z"/>
22
+ <path d="M120.8,14.8v8c-0.7-0.1-1.4-0.2-2-0.2c-6.4,0-10.5,3.8-10.5,11.2v17.5h-8.4V15.2h8v5.3C110.4,16.7,114.8,14.8,120.8,14.8z"
23
+ />
24
+ <path d="M124.7,33.3c0-10.8,8.1-18.5,19.2-18.5c11.2,0,19.3,7.6,19.3,18.5s-8,18.5-19.3,18.5C132.8,51.8,124.7,44.1,124.7,33.3z
25
+ M154.6,33.3c0-6.9-4.6-11.3-10.7-11.3c-6.1,0-10.7,4.4-10.7,11.3c0,6.9,4.6,11.3,10.7,11.3C150,44.5,154.6,40.2,154.6,33.3z"/>
26
+ <path d="M168.3,33.3c0-10.8,8.1-18.5,19.5-18.5c7,0,12.6,2.9,15.4,8.4l-6.5,3.8c-2.2-3.4-5.4-5-9-5c-6.2,0-11,4.3-11,11.3
27
+ c0,7,4.7,11.3,11,11.3c3.6,0,6.8-1.6,9-5l6.5,3.8c-2.8,5.4-8.4,8.5-15.4,8.5C176.4,51.8,168.3,44.1,168.3,33.3z"/>
28
+ <path d="M243.8,36h-28.3c1,5.3,5.4,8.7,11.7,8.7c4.1,0,7.2-1.3,9.8-3.9l4.5,5.2c-3.2,3.9-8.3,5.9-14.5,5.9
29
+ c-12.1,0-19.9-7.8-19.9-18.5c0-10.7,7.9-18.5,18.7-18.5c10.5,0,18.3,7.4,18.3,18.7C243.9,34.1,243.8,35.2,243.8,36z M215.4,30.4
30
+ h20.5c-0.7-5.2-4.7-8.8-10.2-8.8C220.2,21.6,216.2,25.1,215.4,30.4z"/>
31
+ <path d="M247.9,47.7l3.2-6.4c3.2,2.1,8,3.6,12.6,3.6c5.3,0,7.6-1.5,7.6-4c0-6.9-22.3-0.4-22.3-14.8c0-6.8,6.2-11.3,15.9-11.3
32
+ c4.8,0,10.3,1.1,13.5,3.1l-3.2,6.4c-3.4-2-6.9-2.7-10.3-2.7c-5.1,0-7.6,1.7-7.6,4.1c0,7.3,22.3,0.8,22.3,14.9
33
+ c0,6.8-6.2,11.2-16.4,11.2C257.2,51.8,251.1,50,247.9,47.7z"/>
34
+ <path d="M282.7,47.7l3.2-6.4c3.2,2.1,8,3.6,12.6,3.6c5.3,0,7.6-1.5,7.6-4c0-6.9-22.3-0.4-22.3-14.8c0-6.8,6.2-11.3,15.9-11.3
35
+ c4.8,0,10.3,1.1,13.5,3.1l-3.2,6.4c-3.4-2-6.9-2.7-10.3-2.7c-5.1,0-7.6,1.7-7.6,4.1c0,7.3,22.3,0.8,22.3,14.9
36
+ c0,6.8-6.2,11.2-16.4,11.2C292,51.8,286,50,282.7,47.7z"/>
37
+ <path d="M319.1,27.6c0-14.1,10.8-24.3,25.3-24.3c7.7,0,14.3,2.8,18.7,7.9l-5.7,5.3c-3.4-3.7-7.7-5.5-12.6-5.5
38
+ c-9.8,0-16.9,6.9-16.9,16.6c0,9.7,7.1,16.6,16.9,16.6c4.9,0,9.2-1.8,12.6-5.6l5.7,5.4c-4.4,5.1-11,7.9-18.8,7.9
39
+ C329.9,52,319.1,41.8,319.1,27.6z"/>
40
+ <path d="M404.7,15.2v36.1h-8v-4.6c-2.7,3.3-7,5.1-11.6,5.1c-9.3,0-15.5-5.1-15.5-16V15.2h8.4v19.5c0,6.6,3.1,9.7,8.5,9.7
41
+ c5.9,0,9.9-3.6,9.9-10.9V15.2H404.7z"/>
42
+ <path d="M454.1,33.3c0,11.2-7.8,18.5-18.3,18.5c-4.9,0-9.1-1.7-12-5.1v4.7h-8V1.1h8.5v18.5c2.9-3.2,7-4.8,11.6-4.8
43
+ C446.4,14.8,454.1,22,454.1,33.3z M445.6,33.3c0-6.9-4.6-11.3-10.7-11.3s-10.7,4.4-10.7,11.3c0,6.9,4.7,11.3,10.7,11.3
44
+ S445.6,40.2,445.6,33.3z"/>
45
+ <path d="M496,36h-28.3c1,5.3,5.4,8.7,11.7,8.7c4.1,0,7.2-1.3,9.8-3.9l4.5,5.2c-3.2,3.9-8.3,5.9-14.5,5.9
46
+ c-12.1,0-19.9-7.8-19.9-18.5c0-10.7,7.9-18.5,18.7-18.5c10.5,0,18.3,7.4,18.3,18.7C496.1,34.1,496.1,35.2,496,36z M467.6,30.4h20.5
47
+ c-0.7-5.2-4.7-8.8-10.2-8.8C472.4,21.6,468.4,25.1,467.6,30.4z"/>
48
+ <path d="M528.3,14.9c0,7.8-6.1,14-14,14c-7.8,0-13.9-6.1-13.9-13.9s6-13.9,14-13.9S528.3,7.1,528.3,14.9z M526,14.9
49
+ c0-6.6-4.9-11.7-11.6-11.7c-6.7,0-11.7,5.2-11.7,11.7s5,11.7,11.6,11.7C520.9,26.7,526,21.5,526,14.9z M518.4,17.4l3.5,5.3h-3.4
50
+ l-3.1-4.7H515h-3.1v4.7h-3.4V7.2h6.5c4.1,0,6.5,2.1,6.5,5.4C521.5,15,520.4,16.6,518.4,17.4z M514.8,15.4c2.2,0,3.5-1,3.5-2.8
51
+ c0-1.7-1.3-2.7-3.5-2.7h-2.9v5.5H514.8z"/>
52
+ </g>
53
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.15.0-fix-error-in-process-instance-query-8fa811-lz054xqa",
3
+ "version": "1.0.0-develop-243715-lz1qpiwj",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -35,6 +35,7 @@
35
35
  "node-red": {
36
36
  "version": ">=3.1.9",
37
37
  "nodes": {
38
+ "EndEventFinishedListener": "endevent-finished-listener.js",
38
39
  "externaltaskInput": "externaltask-input.js",
39
40
  "externaltaskOutput": "externaltask-output.js",
40
41
  "externaltaskError": "externaltask-error.js",
@@ -61,8 +62,5 @@
61
62
  "workflow",
62
63
  "bpmn",
63
64
  "low-code"
64
- ],
65
- "devDependencies": {
66
- "prettier": "^3.3.3"
67
- }
65
+ ]
68
66
  }
@@ -36,17 +36,20 @@
36
36
  </div>
37
37
  </script>
38
38
 
39
- <script type="text/html" data-help-name="process-start">
40
- <h2>Start a Processmodel in the ProcessCube</h2>
41
- <p>If the <code>msg.payload</code> is set, it will be used as the input for the process.</p>
42
- <p>
43
- If a <code>msg.processModelId</code> is set, it will be used as the process model and override the configured
44
- <b>Processmodel</b>.
45
- </p>
46
- <p>
47
- If a <code>msg.startEventId</code> is set, it will be used as the start event and override the configured
48
- <b>Startevent</b>.
49
- </p>
50
- <h3>More documentation</h3>
51
- <p>The Dokumenation can be found on <a href="https://processcube.io">ProcessCube Developer Network</a>.</p>
39
+ <script type="text/markdown" data-help-name="process-start">
40
+ Start a new instance of a process model in the ProcessCube.
41
+
42
+ The `processModelId` and `startEventId` can be set in the message object to override the configured values.
43
+
44
+ ## Inputs
45
+
46
+ : payload (Object) : Will be used as the input for the process.
47
+ : processModelId (String) : Will be used as the process model and override the configured `Processmodel`.
48
+ : startEventId (String) : Will be used as the start event and override the configured `Startevent`.
49
+
50
+ ### References
51
+
52
+ - [The ProcessCube Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
53
+ - [Node-RED Integration in ProcessCube&copy;](https://processcube.io/docs/node-red) - Node-RED integration in ProcessCube&copy;
54
+
52
55
  </script>
package/process-start.js CHANGED
@@ -3,29 +3,41 @@ module.exports = function (RED) {
3
3
  RED.nodes.createNode(this, config);
4
4
  var node = this;
5
5
 
6
- this.engine = this.server = RED.nodes.getNode(config.engine);
6
+ node.on('input', function (msg) {
7
7
 
8
- const client = this.engine.getEngineClient();
8
+ const initialToken = RED.util.encodeObject(msg.payload);
9
9
 
10
- node.on('input', function (msg) {
11
10
  const startParameters = {
12
11
  processModelId: msg.processModelId || config.processmodel,
13
12
  startEventId: msg.startEventId || config.startevent,
14
- initialToken: msg.payload,
13
+ initialToken: initialToken,
15
14
  };
16
15
 
16
+ const engine = RED.nodes.getNode(config.engine);
17
+ const client = engine.engineClient;
18
+
19
+ if (!client) {
20
+ node.error('No engine configured.');
21
+ return;
22
+ }
23
+
17
24
  client.processDefinitions
18
- .startProcessInstance(startParameters, node.engine.identity)
25
+ .startProcessInstance(startParameters, engine.identity)
19
26
  .then((result) => {
20
27
  msg.payload = result;
21
28
 
22
29
  node.send(msg);
23
- node.status({ fill: 'blue', shape: 'dot', text: `started ${result.processInstanceId}` });
30
+ node.status({
31
+ fill: 'blue',
32
+ shape: 'dot',
33
+ text: `started ${result.processInstanceId}`,
34
+ });
24
35
  })
25
36
  .catch((error) => {
26
37
  node.error(error);
27
38
  });
28
39
  });
29
40
  }
41
+
30
42
  RED.nodes.registerType('process-start', ProcessStart);
31
43
  };