Action¶
The following describes the common metadata properties applicable for all action types.
Note: Failed actions are events that execute with errors. Invalid actions are events that doesn't get executed at all due to validation errors.
Action Properties¶
Property | Type | Required | Default |
---|---|---|---|
ActionResult | ActionResult | No | |
ActivityIndicatorText | string |
No | "LOADING" |
OnFailure | ActionOrRule | No | |
OnFailureLog | OnActionLog | No | |
OnInvalid | ActionOrRule | No | |
OnInvalidLog | OnActionLog | No | |
OnSuccess | ActionOrRule | No | |
OnSuccessLog | OnActionLog | No | |
ShowActivityIndicator | boolean |
No | |
ValidationRule | Rule | No | |
_Type | string |
Yes |
ActionResult¶
Refer to the MDK Guide to understand what an action result is.
Contains a name that can be used to look up an action result via target path or rule. Action results are only available
for subsequent actions, given that the preceding action result is stored via OnSuccess
or OnFailure
actions.
- type: ActionResult
ActivityIndicatorText¶
Text that appears on the progress bar.
- type:
string
- default:
"LOADING"
OnFailure¶
Action or rule that is executed when an action fails. PLT formatter is supported.
- type: ActionOrRule
- Formatter and Binding are not supported
OnFailure Example¶
"$(PLT,'/MDKDevApp/Actions/PLTActions/FailureIOS.action', '/MDKDevApp/Actions/PLTActions/FailureAndroid.action')"
OnFailureLog¶
Messages are logged when an action fails.
- type: OnActionLog
OnInvalid¶
Action or rule that is executed when a validation fails. PLT formatter is supported.
- type: ActionOrRule
- Formatter and Binding are not supported
OnInvalid Example¶
"$(PLT,'/MDKDevApp/Actions/PLTActions/InvalidIOS.action', '/MDKDevApp/Actions/PLTActions/InvalidAndroid.action')"
OnInvalidLog¶
Messages are logged when a validation fails.
- type: OnActionLog
OnSuccess¶
Action or rule that is executed when an action is successful. PLT formatter is supported.
- type: ActionOrRule
- Formatter and Binding are not supported
OnSuccess Example¶
"$(PLT,'/MDKDevApp/Actions/PLTActions/SuccessIOS.action', '/MDKDevApp/Actions/PLTActions/SuccessAndroid.action')"
OnSuccessLog¶
Messages are logged when an action gets executed successful.
- type: OnActionLog
ShowActivityIndicator¶
If set to True, every time an activity or action gets executed, a progress bar appears with the execution status, and it’ll automatically disappear once done.
- type:
boolean
ValidationRule¶
Rule that validates the current action
- type: Rule
_Type¶
- type:
string