Action object
The Action object describes an action that was defined, and the run that was performed for that action.
As such, the Action object only comes into play with tasks that subscribe to mechanic/actions/perform, analyzing the results of action runs, for the purpose of performing follow-up work. Learn more about this technique: Responding to action results.
How to access it
Use
{{ action }}in tasks responding to mechanic/actions/perform
What it contains
typeβ a lowercase string, defining the action typeoptionsβ the options with which the action was configuredrunβ an object containing the following attributes, describing the run that was generated by the action's performanceidβ a string containing the UUID for this actionokβ a boolean, true for a successful action run, and false for a failureerrorβ either null, or a string containing the error message returned for a failed actionresultβ the data returned from the action; format varies by action typeresult_metaβ an object containing useful performance-related dataattemptsβ an integer, indicating the number of times the action was attempted before final success or failureenqueued_atβ the time at which this action was sent to our queue for executionstarted_atβ the time at which the action startedstopped_atβ the time at which the action stoppedelapsed_time_msβ the number of milliseconds this action required, from start to stop
Last updated
Was this helpful?