Step (JSON)#
Each step has an atomic functionality that will perform the desired action. It may store the result in the answers object that is shared across the execution of the scenario.
| Name | Description | Mandatory | Type | Possible Values | Default Value |
|---|---|---|---|---|---|
| name | Name (unique within the entire BusinessScenario) that identify the step | Y | String | ||
| type | Type of step that will be performedMessage - Simple message to display to the user. No interaction is necessaryQuestion - Question to ask the user and expect for a valid answer to be providedDebug - Debug the current state of the scenario Script - Script to execute to calculate some values that may be necessary for a next stepCallScenario - Call another BusinessScenario before moving to the next stepCondition - Define the conditions to move to another step Foreach - Iterate a list of items and execute a list of steps to process them | Y | Enum | MessageQuestionDebugScriptCallScenarioConditionForeach | |
| settings | Specific settings depending on the type: Message Question Debug Script CallScenario Condition Foreach | Y | Object | ||
| next | Next step to be executed after this one ends | N | String | ||
| resultKey | Key name to use to store the result of this step Leave this field as empty or null to ignore | N | String |
Example snippets#
Message#
In this example snippet, the scenario will show the defined message to the user:
{
"name": "MessageEnd",
"type": "Message",
"settings": {
"message": "If the tab has not reloaded, please reload the Automation Controller tab, to see the changes."
},
"next": ""
}
Question#
This example creates a question:
{
"name": "ConditionOfMapping",
"type": "Question",
"resultKey": "iotPropCondition",
"settings": {
"message": "Please write a condition to map the property to the chosen State Model State.\nThe $prop will map to the previously chosen property.\nFor example, '$prop == 0'. This will imply that when the property equals to 0 it will change the state to the chosen state.",
"dataType": "String"
},
"next": "PushConditionScript"
}