Questions about the EXEC node

I have this exec block that executes when I press the inject button

image

There this process ID that pops up. Is there a way to pull that off and put it onto a payload so I can do stuff with it?

Another question:
Same exec block, how do I know it's done executing?

I have 3 debugger blocks at the end of the exec.

They give me messages that look like this:


Is there a way to get a pass/fail to execute from the exec block?

Any help would be appreciated.

[
    {
        "id": "1017b92c740fd65f",
        "type": "tab",
        "label": "Flow 4",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "fa121ac2571e947c",
        "type": "exec",
        "z": "1017b92c740fd65f",
        "command": "C:\\ti\\ccs1220\\ccs\\ccs_base\\scripting\\bin\\dss -f c:\\ztemp\\loadgreen.js",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "10",
        "winHide": false,
        "oldrc": false,
        "name": "",
        "x": 480,
        "y": 180,
        "wires": [
            [
                "65ee604f18e7a518"
            ],
            [
                "5a548955f5dccb7f"
            ],
            [
                "aca287bf06caf545"
            ]
        ]
    },
    {
        "id": "65ee604f18e7a518",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 120,
        "wires": []
    },
    {
        "id": "5a548955f5dccb7f",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 180,
        "wires": []
    },
    {
        "id": "aca287bf06caf545",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 240,
        "wires": []
    },
    {
        "id": "fb918985f29ac37d",
        "type": "inject",
        "z": "1017b92c740fd65f",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 140,
        "y": 220,
        "wires": [
            [
                "fa121ac2571e947c"
            ]
        ]
    },
    {
        "id": "908f075511940f3e",
        "type": "exec",
        "z": "1017b92c740fd65f",
        "command": "C:\\ti\\ccs1220\\ccs\\ccs_base\\scripting\\bin\\dss -f c:\\ztemp\\loadred.js",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "10",
        "winHide": false,
        "oldrc": false,
        "name": "",
        "x": 480,
        "y": 360,
        "wires": [
            [
                "8285f3bc0e0ba7a1"
            ],
            [
                "28e237ff7f069e6b"
            ],
            [
                "60cd2dd0685708c4"
            ]
        ]
    },
    {
        "id": "8285f3bc0e0ba7a1",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 300,
        "wires": []
    },
    {
        "id": "28e237ff7f069e6b",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 360,
        "wires": []
    },
    {
        "id": "60cd2dd0685708c4",
        "type": "debug",
        "z": "1017b92c740fd65f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 420,
        "wires": []
    },
    {
        "id": "ddf76a28ac7af090",
        "type": "inject",
        "z": "1017b92c740fd65f",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 120,
        "y": 420,
        "wires": [
            [
                "908f075511940f3e"
            ]
        ]
    },
    {
        "id": "ddcaab3fd066fd0c",
        "type": "ui_button",
        "z": "1017b92c740fd65f",
        "name": "",
        "group": "88145eb0.23895",
        "order": 7,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "GREEN",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "date",
        "topic": "topic",
        "topicType": "msg",
        "x": 140,
        "y": 160,
        "wires": [
            [
                "fa121ac2571e947c"
            ]
        ]
    },
    {
        "id": "8888de70d06a91cf",
        "type": "ui_button",
        "z": "1017b92c740fd65f",
        "name": "",
        "group": "88145eb0.23895",
        "order": 7,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "RED",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "date",
        "topic": "topic",
        "topicType": "msg",
        "x": 130,
        "y": 360,
        "wires": [
            [
                "908f075511940f3e"
            ]
        ]
    },
    {
        "id": "88145eb0.23895",
        "type": "ui_group",
        "name": "PLC_Read",
        "tab": "a9e24f558660ab0d",
        "order": 1,
        "disp": true,
        "width": "8",
        "collapse": false,
        "className": ""
    },
    {
        "id": "a9e24f558660ab0d",
        "type": "ui_tab",
        "name": "MAIN",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

use a status node pointed at the exec node. Use a debug set to show full message to see everything the status message contains.

Read the built in help. Return code is the result of completed execution.

you mean like this?
image

I configured the status nodes to look at the exec blocks. It tells me my payload is undefined.
image

Set the debug to show the complete message object, there you will find msg.status.

full message

I don't think you did the full message bit, or if you did you did not look at the output carefully enough. In addition perhaps you have not looked at the help text for the status node.