Application: Sync Trigger
The Application: Sync Trigger fires a workflow whenever the Gateway Edge Agent receives updated peripherals, global values, or changes to its Edge Compute device configuration.
Node Properties
The Application: Sync Trigger has one set of configuration options to choose from. Specify whether to fire this trigger on receipt of updates to the Edge Compute device, to its peripheral devices, and/or to application globals.
- Trigger on Edge Compute device updates – Fires when an update is made to the edge device’s name, tags, or attributes. The updated values are automatically on the initial payload under the
device
anddeviceTags
properties, and the value ofdata.syncType
will be “device” to indicate that the trigger fired due to a change to the edge device. Updates to the description will not fire off the trigger. - Trigger on peripheral / floating device updates – Fires when an update is made to any peripheral device associated with the edge device, including those that can connect to any gateway (“floating”). The value of
data.syncType
will be “peripheral” to indicate that the trigger fired due to a change to the peripheral device. However, the updates must be fetched using the Peripheral: Get Node. - Trigger on application globals and name updates – Fires when an update is made to application globals, but only if the updated global(s) are configured to also send to edge devices. This will also fire on updates to the application name. The updated values are automatically on the initial payload under the
applicationName
andglobals
properties, and the value ofdata.syncType
will be “application” to indicate that the trigger fired due to a change to the application.
Payload
The payload will include the triggering sync type in the data
field. In the general case, an Application: Sync workflow payload will look like the following:
{
"agentEnvironment": {
"EXAMPLE": "Environment Variable"
},
"agentVersion": "1.39.0",
"applicationId": "555555555555eeeeeeeeeeee",
"applicationName": "My Great Application",
"data": {
"syncType": "application|device|peripheral"
},
"device": {
"applicationId": "555555555555eeeeeeeeeeee",
"attributes": {
"exampleNumber": {
"attributeTags": {
"attrTagKey": "tagValue1"
},
"dataType": "number",
"name": "exampleNumber"
},
"exampleString": {
"attributeTags": {
"attrTagKey": "tagValue2"
},
"dataType": "string",
"name": "exampleString"
}
},
"creationDate": "2018-03-16T18:19:03.376Z",
"deviceClass": "edgeCompute",
"deviceId": "222222222222bbbbbbbbbbbb",
"id": "222222222222bbbbbbbbbbbb",
"name": "My Great Device",
"tags": {
"aTagKey": [
"exampleTagValue"
],
"tagWithMultipleValues": [
"tagValue",
"anotherTagValue"
]
}
},
"deviceId": "222222222222bbbbbbbbbbbb",
"deviceName": "My Great Device",
"deviceTags": {
"aTagKey": [
"exampleTagValue"
],
"tagWithMultipleValues": [
"tagValue",
"anotherTagValue"
]
},
"flowId": "333333333333cccccccccccc",
"flowName": "My Great Workflow",
"flowVersion": "myFlowVersion",
"globals": {
"aJsonGlobal": {
"key": "value"
},
"aNumberGlobal": 42,
"aStringGlobal": "My value"
},
"isConnectedToWnology": true,
"time": Fri Feb 19 2016 17:26:00 GMT-0500 (EST),
"triggerId": "<{deviceId}-{randomAlphanumericString}>",
"triggerType": "onSync"
}
Related Nodes
Was this page helpful?
Still looking for help? You can also search the WEGnology Forums or submit your question there.