Action Block Structure
|blockOptions||JsonObject||+||Action block options|
|blockOptions.method.args||JsonObject||+||Action description arguments that should be read from attribute|
|blockOptions.method.name||string||+||Name of action|
|fields||JsonArray||+||Array of fields that must be extracted by the names|
|fields.name||string||+||Name of the field block corresponding of the declaration in|
|fields.type||string||–||Represents the Item Value Type|
|fields.value||string||+||Value should be corresponded to the|
|delay||JsonObject||–||Delay to action after event arises. If this field is absent or is empty then delay is absent.|
|blockMeta||JsonObject||–||Block metadata information. Intended to save data needed for user interfaces.|
|delay.seconds||int||–||Seconds number of delay|
|delay.minutes||int||–||Minutes number of delay|
|delay.hours||int||–||Hours number of delay|
|delay.days||int||–||Days number of delay|
|control||JsonObject||–||Control flow of execution of this action|
|control.exception||JsonObject||–||Exceptions for execution of the action|
|exec_policy||string||–||It is execution policy of block. The block policy have higher priority then policy of scene ( see description of hub.scenes.create ). If block policy is absent then block inherits policy of scene. The block policy can have next states: – result of execution each block should checked and scene should be failed in case if block is failed; – result of execution each block should be ignored and checked only in the end of scene execution. If any action was failed than partially_finished status. If all blocks have this status and all of them are failed than failed status.|
- – the result of execution of each block is checked and the scene marked failed in case if any block has failed.
- – the result of execution of each block is ignored and checked only at the end of scene execution.
- – is a mix of and . Scenes with the exec_policy should execute their actions one by one, i.e. start the next action after the previous one has finished. Execution continues even if the previous action fails.
For scenes with and policies: if any action has failed, then the scene will have partially_finished status; if all actions have failed – failed.