ApplicationExperienceEdge 1.13.0

Workflow Error Trigger Node

The Workflow Error Trigger will execute whenever a halting error occurs anywhere else within the same workflow. You can then perform any necessary actions that are required to handle that error. The trigger places useful information on the payload, including the ID and type of the node that caused the error and the original payload at the time the error occurred.

Workflow Error Trigger

Our workflow engine has two types of errors: halting errors and non-halting errors. Halting errors immediately stop the workflow and prevent it from continuing. Non-halting errors place an error message on a node’s result and the workflow will continue executing.

Non-halting errors can easily be checked and handled by your workflow. After a node executes that can potentially result in an error, we recommend adding a Conditional Node to make sure the node’s operation was successful. Halting errors, however, can be easily handled with the Workflow Error Trigger.

Node Properties

There are no configuration options for this trigger. The Workflow Error Trigger will fire whenever another node causes an error that halts the flow. These errors are displayed in the Debug menu with a red message like so:

Workflow Error Trigger

Payload

The payload created by the trigger will include:

  • Information about the error
  • The node that triggered the error
  • The payload at the time of the error

In the general case, a Workflow Error payload will look like the following:

{
  "globals": <object of workflow globals>,
  "applicationName": <name of the current application>,
  "flowName": <name of the current workflow>,
  "flowId": <id of the current workflow>,
  "flowVersion": <version of the triggered workflow>,
  "triggerType": "flowError",
  "triggerId": <id of the workflow trigger>,
  "applicationId": <id of the current application>,
  "data": {
    "errorInfo" : {
      "nodeId": <id of the node that caused the error>,
      "nodeType": <type of the node that caused the error>,
      "error": <the type and message of the error that was thrown>
    },
    "erroredPayload": <copy of the payload at the time of error>
  },
  "time": <time of the error>,

}

For the example workflow above, a specific payload for a triggered workflow might look like this:

{
  "globals": {},
  "applicationName": "Retention",
  "flowName": "Big Data",
  "flowId": "5d56e856005f990006c855bf",
  "flowVersion": "develop",
  "relayType": "flow",
  "relayId": "5d56e856005f990006c855bf",
  "triggerType": "flowError",
  "triggerId": "5d56e856005f990006c855bf-flowError",
  "applicationId": "5c365aee856a620008b8f0cd",
  "data": {
    "errorInfo": {
      "error": {
        "message": "Invalid topic name: ",
        "name": "ValidationError"
      },
      "nodeId": "s3p0lvab77",
      "nodeType": "MqttMessageNode"
    },
    "erroredPayload": {
      "globals": {},
      "applicationName": "Retention",
      "flowName": "Big Data",
      "flowId": "5d56e856005f990006c855bf",
      "relayType": "user",
      "relayId": "5a67c0e0b5548300060f6a0f",
      "flowVersion": "develop",
      "triggerType": "virtualButton",
      "triggerId": "5d56e856005f990006c855bf-nXAHZHl1gz",
      "applicationId": "5c365aee856a620008b8f0cd",
      "data": { "topic": "" },
      "time": "2019-11-04T14:48:03.524Z"
    }
  },
  "time": "2019-11-04T14:48:03.543Z"
}

Considerations

  • The Workflow Error Trigger will not fire from workflows that were kicked off by a Workflow Error Trigger.