Cloud Trigger Actions
Cloud Trigger actions are the sequence of actions to execute when an event is triggered in Device Cloud.
Device Cloud is an event-driven architecture that enables applications to notify each other of changes in state as they occur and trigger corresponding actions.
You need to add a trigger before adding the corresponding actions. For more information on adding a trigger, see Adding a New Trigger.
Parameters for actions vary by the type of action. For all trigger actions, a Suggestions field appears and lists all trigger variables available to the action by the event and by the preceding trigger actions. The contents of this list vary depending on the event and trigger actions selected.
You can copy and paste a set of trigger actions while defining a trigger.
Global Variables
The following global variables can be used in any trigger action:
Variable |
Description |
Route |
---|---|---|
$(trigger.exec_time) |
This shows the time the trigger executed. |
Success and Failure |
$(trigger.lastErrorMsg) |
This shows the last failed trigger action error message and is overwritten by the next failed action. |
Failure |
$(trigger.lastErrorCode) |
This shows the last failed trigger action error code and is overwritten by the next failed action. |
Failure |
Additional Trigger Actions
An comment action is a note that can be placed on the canvas. It takes no inputs and has no outputs. It is used to display a comment to future viewers of the trigger. For more information, see Comment.
The success and failure actions are used to indicate whether the trigger terminated successfully or unsuccessfully. Failure actions are optional. There must be at least one success action. Any branch that does not terminate at a success action is considered a failure. For more information, see Success and Failure.