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. (Note: The maximum length of a rendered message is 256 characters. If the message is longer than 256 characters, it will be trimmed to the first 256 characters and that result will be provided in the resource job’s completion report.)

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.

Accumulator

For Resource Jobs that run iterations serially, you have the option of defining an Accumulator that will pass to the next iteration of your Resource Job. An accumulator can be set as a payload path, a string template, or a JSON template. Upon completion of an execution, the value of the accumulator at each iteration will be available in the CSV that is generated and the final accumulator value can be seen in the execution log.

Note: The maximum length of an accumulator value is 256 characters. Attempting to pass an accumulator value that is more than 256 characters will cause the Job: Acknowledge Node to error.

The Accumulator will be ignored and not passed on to following iterations on any Resource Jobs that are configured to run iterations in parallel.

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 WEGnology Forums or submit your question there.