UNPKG

@5minds/node-red-contrib-processcube

Version:
257 lines (256 loc) • 6.21 kB
[ { "id": "fd3c725340de4f74", "type": "tab", "label": "UserTasks", "disabled": false, "info": "", "env": [] }, { "id": "887f3fb69ad1d1fb", "type": "group", "z": "fd3c725340de4f74", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "020d34cd4ab43900", "127bc6e092c5724e", "6ebfe52c79b7f0cd", "2760e94c2824a5a4", "8d17d660fce14104" ], "x": 34, "y": 59, "w": 572, "h": 222 }, { "id": "72d3db13edc2486b", "type": "group", "z": "fd3c725340de4f74", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "f7c7682e3a6adaaa", "a2fb6369b16c12fa", "8ef39e83173d41e3", "f524b8cc35d56849", "9fb4017c1d0ac7c9", "a1c3526b6fa21903" ], "x": 34, "y": 319, "w": 972, "h": 142 }, { "id": "020d34cd4ab43900", "type": "debug", "z": "fd3c725340de4f74", "g": "887f3fb69ad1d1fb", "name": "New User Task", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 420, "y": 160, "wires": [] }, { "id": "127bc6e092c5724e", "type": "comment", "z": "fd3c725340de4f74", "g": "887f3fb69ad1d1fb", "name": "User Task Events", "info": "", "x": 140, "y": 100, "wires": [] }, { "id": "6ebfe52c79b7f0cd", "type": "usertask-event-listener", "z": "fd3c725340de4f74", "g": "887f3fb69ad1d1fb", "name": "", "engine": "42e6796dddd9d4db", "usertask": "", "eventtype": "new", "query": "{}", "query_type": "json", "x": 160, "y": 160, "wires": [ [ "020d34cd4ab43900" ] ] }, { "id": "2760e94c2824a5a4", "type": "usertask-event-listener", "z": "fd3c725340de4f74", "g": "887f3fb69ad1d1fb", "name": "", "engine": "42e6796dddd9d4db", "usertask": "", "eventtype": "finished", "query": "{}", "query_type": "json", "x": 160, "y": 240, "wires": [ [ "8d17d660fce14104" ] ] }, { "id": "8d17d660fce14104", "type": "debug", "z": "fd3c725340de4f74", "g": "887f3fb69ad1d1fb", "name": "A User Task was finished", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 450, "y": 240, "wires": [] }, { "id": "f7c7682e3a6adaaa", "type": "usertask-input", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "", "engine": "42e6796dddd9d4db", "query": "payload", "query_type": "msg", "sendtype": "first", "x": 520, "y": 420, "wires": [ [ "8ef39e83173d41e3" ] ] }, { "id": "a2fb6369b16c12fa", "type": "function", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "query", "func": "msg.payload = {\n flowNodeInstanceId: msg.payload.flowNodeInstanceId,\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 350, "y": 420, "wires": [ [ "f7c7682e3a6adaaa" ] ] }, { "id": "8ef39e83173d41e3", "type": "function", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "build result", "func": "msg.payload.result = {\n \"field_01\": \"value 01\",\n \"field_02\": \"value 02\"\n}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 710, "y": 420, "wires": [ [ "f524b8cc35d56849" ] ] }, { "id": "f524b8cc35d56849", "type": "usertask-output", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "", "engine": "42e6796dddd9d4db", "result": "payload.result", "result_type": "msg", "x": 900, "y": 420, "wires": [ [] ] }, { "id": "9fb4017c1d0ac7c9", "type": "comment", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "Demo to listen on a new usertask and finish it", "info": "", "x": 230, "y": 360, "wires": [] }, { "id": "a1c3526b6fa21903", "type": "usertask-event-listener", "z": "fd3c725340de4f74", "g": "72d3db13edc2486b", "name": "", "engine": "42e6796dddd9d4db", "usertask": "", "eventtype": "new", "query": "{}", "query_type": "json", "x": 160, "y": 420, "wires": [ [ "a2fb6369b16c12fa" ] ] }, { "id": "42e6796dddd9d4db", "type": "processcube-engine-config", "url": "http://engine:8000" } ]