Job: Iteration Trigger

The Job: Iteration Trigger fires a workflow whenever an iteration of a Resource Job begins.

Job: Iteration Trigger

Node Properties

The Job: Iteration Trigger has one piece of configuration: the Resource Job, which will fire this trigger when a new iteration begins.

Payload

The payload will include the triggering event in the data field. In the general case, a Job Iteration workflow payload will look like the following:

{
  "applicationId": "555555555555eeeeeeeeeeee",
  "applicationName": "My Great Application",
  "data": {
    "accumulator": "{\"example\":900001}",
    "device": {
      "_etag": "\"567-SY26IHrVRzUBMUwxnY59Fn6vOvo\"",
      "applicationId": "555555555555eeeeeeeeeeee",
      "attributes": {
        "exampleNumber": {
          "attributeTags": {
            "attrTagKey": "tagValue1"
          },
          "dataType": "number",
          "description": "",
          "name": "exampleNumber"
        },
        "exampleString": {
          "attributeTags": {
            "attrTagKey": "tagValue2"
          },
          "dataType": "string",
          "description": "",
          "name": "exampleString"
        }
      },
      "creationDate": "2018-03-16T18:19:03.376Z",
      "description": "",
      "deviceClass": "standalone",
      "deviceId": "222222222222bbbbbbbbbbbb",
      "id": "222222222222bbbbbbbbbbbb",
      "lastUpdated": "2020-08-26T13:09:11.814Z",
      "name": "My Great Device",
      "tags": {
        "aTagKey": [
          "exampleTagValue"
        ],
        "tagWithMultipleValues": [
          "tagValue",
          "anotherTagValue"
        ]
      }
    },
    "execution": {
      "applicationId": "555555555555eeeeeeeeeeee",
      "context": {},
      "id": "444444444444dddddddddddd",
      "iterationDelay": 0,
      "iterationTimeout": 900000,
      "maxIterationConcurrency": 10,
      "maxIterationRetries": 1,
      "query": {
        "$or": []
      },
      "resourceJobExecutionId": "444444444444dddddddddddd",
      "resourceJobId": "6377e89a6bf4da30eb564c66",
      "resourceType": "device",
      "retryDelay": 50,
      "retryOnFailure": true,
      "retryOnTimeout": true,
      "runStartedAt": "2022-11-17T21:59:36.163Z",
      "sourceId": "555555555555eeeeeeeeeeee",
      "sourceType": "user",
      "status": "inProgress"
    },
    "iterationId": "444444444444dddddddddddd-111111111111aaaaaaaaaaaa",
    "willRetryOnFailure": true,
    "willRetryOnTimeout": true
  },
  "flowId": "333333333333cccccccccccc",
  "flowName": "My Great Workflow",
  "flowVersion": "myFlowVersion",
  "globals": {
    "aJsonGlobal": {
      "key": "value"
    },
    "aNumberGlobal": 42,
    "aStringGlobal": "My value"
  },
  "relayId": "<ID of the job>",
  "relayType": "resourceJob",
  "time": Fri Feb 19 2016 17:26:00 GMT-0500 (EST),
  "triggerId": "<ID of the job>",
  "triggerType": "resourceJobIteration"
}

Was this page helpful?


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