Job: Execute Node

The Job: Execute Node requests an execution of one of your application’s Resource Jobs.

Job: Execute Node

Node Properties

The Job: Execute Node has one piece of required configuration: a Resource Job Template. Choose which of your existing Resource Jobs should be executed by this node. This will list all of the Resource Jobs in your current application, but you can also use a string template that resolves to a Resource Job ID to dynamically control which Resource Job to execute.

Next, choose the Context Type to apply to this execution request. This object is available in the initial payload for all related workflow triggers, and your resource query can also reference values from this context object through the use of templates (i.e. {{ctx.<prop>}}). You may choose to utilize the Resource Job’s default context object, or you may pass a custom object as a JSON template, a payload path, or the full workflow payload.

The last piece of optional configuration is the Result Path. Here, a payload path can be defined for where to store the result of the execution 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 jobExecutionResult, a successful execution request might look like:

{
   "jobExecutionResult": {
      "executionId": "12ab34cd56e12ab34cd56ef",
      "success": true
   }
}

Node Errors

Given a Result Path of jobExecutionResult, a failed execution request might look like:

{
   "jobExecutionResult": {
      "error": {
         "message": "Resource Job already has an execution in progress",
         "type": "Validation"
      }
   }
}

Was this page helpful?


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