The most important and only required option is the
handler function, which does all the work. Handlers are designed to be stateless. They take some input information, do some work and send back some output information. They are executed sequentially, in the order of declaration. They may themselves call other actions to achieve their purpose. Thus, despite being executed sequentially, actions are organized as hierarchical trees.
The handler receives all the properties of an action as an argument. We call those properties options. They can define default values when declaring the action and the user may overwrite any of the properties. Thus, options are used to contextualize the handler.
The handler may be completed with a
callback function which will be called once the handler has been executed. The callback is used to be notified when an action has complete or has failed. It also provides information such as an error object if one occurred, the status of the action or any additional information sent by the handler.
nikita.file action indicating the path where the content is written.
Properties used to contextualise the handler function.
Define the function that an action implements to get things done.
Callbacks provides a solution to catch error, retrieve status information and extract data.
Properties shared by all the actions and used to alter the execution flow.
Propagates an option and its value to every child actions.