Job: Acknowledge Node

The Job: Acknowledge Node marks an iteration of a Resource Job as a success or failure.

Job: Acknowledge Node

Node Properties

The Job: Acknowledge Node has one piece of required configuration: an Acknowledgment Expression. This is an expression that evaluates to true or false, determining the success of this iteration.

Following the Acknowledgment Expression is an optional Message Template field. This is where you may define a message to be logged for each iteration as a template.

An Iteration ID Path can also be optionally defined. This is a unique identifier for each iteration defined as a payload path. If none is defined, by default, the iteration ID pulls from the path data.iterationId, which is where the Job: Iteration Trigger places the ID.

One last piece of optional configuration is the Result Path. Here, a payload path can be defined for where to store the result of the acknowledgment request. The value will be an object with a success property or, if applicable, an error object with type and message properties.

Node Example

Given a Result Path of acknowledgment, a successful acknowledgment might look like:

{
   "acknowledgment": {
      "completedAt": Tue Nov 22, 2022 17:42:11.111 GMT-05:00,
      "message": "A helpful message that is logged for this iteration.",
      "success": true
   }
}

Given a Result Path of acknowledgment, a payload where your Acknowledgment Expression returned false might look like:

{
   "acknowledgment": {
      "completedAt": Tue Nov 22, 2022 17:42:11.111 GMT-05:00,
      "message": "A helpful message that is logged for this iteration.",
      "success": false
   }
}

Node Errors

In the case of an error, the resulting object will contain an error key.

In the example below, the Iteration ID Path configured on the node resolves to an invalid Iteration ID.

{
   "acknowledgment": {
      "error": {
         "message": "Invalid Iteration ID",
         "type": "ResourceJobAcknowledge"
      }
   }
}

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.