Overview
What is an action?
An action is the smallest unit of instruction in a workflow.
A set of actions is included with the NSP. Actions can also be installed using Artifacts; see How do I install an artifact bundle?.
System actions are included with Mistral or downloaded to the NSP, and ad-hoc actions are customized by the user. For example, file.write is a system action: it dumps data to a file. If this action is incorporated into a task, the task must specify the filename to write the data to. The action also has an optional parameter to specify the mode: create a file or append an existing file. An ad-hoc action can be created that incorporates the filename and the append mode into the action. A task that incorporated this ad-hoc action would always append the information to the specified file.
The Actions view shows the actions saved to NSP. Both system actions and ad-hoc actions are listed. You can create, edit, or delete an ad-hoc action. System actions are read-only.
Double-click on an action to open an Action Detail page, which provides a description of the action including parameters and usage examples.
Example
The Example workflow shown in What does a workflow look like? includes several tasks, each of which executes the std.https action. The std.https action is a system action: it sends an HTTPS request. The details of the request are specified in the input.
The following task from the example workflow creates an NSP user group. The task specifies the action and provides the input, that is, the action parameters.
In this example, the workflow input form requires the user to provide a username when the workflow is executed. The createUserGroup task executes the std.https action to send a POST request to the Access Control API, adding the username as a group name.
createUserGroup:
action: nsp.https
input:
url: 'https://rest-gateway/access-control-api/rest/api/v3/nspuac/group/'
method: POST
body:
userGroupName: <% $.username %>
roles: []
publish:
status: <% task().result.status %>
on-success:
- createUser
What is an action execution?
An action execution is a record of an executed action. The Action Executions view shows the list of actions that were executed by workflows, the names of the tasks that initiated them, and their status.
Choose Action Executions from the drop-down list at the top left of the page to open the Action Executions view.
What can I do with actions or action executions?
Viewing the lists of actions and action executions can be useful to developers for troubleshooting and evaluating whether and how workflows might need to be modified.
Double-click on an action on the Actions page to open an Action Detail page. The Action Details page provides documentation about the action, including a description, identifying details, and, the YAML definition of the action.
See the Workflows tutorial on the Network Developer Portal for more information.
To evaluate a YAQL expression, click to open the Yaqulator.