Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Workflows

Workflows are built with Atomic Actions and they act as lego pieces to create workflows.

Workflows

.. youtube:: 4lcsCGlfwnY

Creating a New Workflow

  1. Select the "New Workflow" button.
_static/newworkflow.png
  1. Click on the empty palette to see all the properties of the workflow on the right side panel.
  2. Provide a display name and a description.
  3. Drag an action from the left side panel from any category desired. For an example, we will be using the "AWS Service" named "Create VPC".
_static/createvpc.png
  1. Click on the action to see the properties required in the right side panel.
  2. Click the empty palette and add the AWS Endpoint to the target section under execute on a target.
_static/selecttarget.png
  1. Go back to the "Create VPC" action you will see that you can now select the target as use workflow target or you can override it.
_static/choosetarget.png
  1. Provide a name tag and an IP address.
_static/createvpcinfo.png
  1. Add a new action called "Create Subnet in a VPC".
_static/createsubnet.png
  1. Provide it a name, an IP CIDR Block, and an availability zone.
_static/createsubnetinfo.png
  1. Click the puzzle piece next to VPC ID and go to Activities, Create VPC, and then VPC ID to add the ID.
_static/addidvariable.png
  1. The example workflow is now complete.

Running a Workflow from the UI

  1. Click the "Validate" button.
  2. Click the "Run" button.
_static/runworkflow.png

Running a Workflow from the API

The following API call can be used to start a workflow

/v1/workflows/start

More information can be found here.

Runs

Runs allow you to see what actually occurred within your workflow. It lets you see every single step that happened so you can easily see where something went wrong.

.. youtube:: Tu17IclKIlM

How to See Runs

  1. In the left side panel below "Workflows" you will see a tab for "Runs".
_static/runs.png
  1. Find runs for a specific workflow by going to the workflow and hitting the "View Runs" button.
_static/specificrun.png
  1. The runs page will show you the status of the run, the time it was started, the time it ended, the user it was started by, and the owner of the workflow.
_static/status.png
  1. Use the filter on the left to see specific results and workflows.
_static/filter.png

How to View a Failed Run

  1. Click on a workflow that failed it will take you to the workflow and put a green box around everything that ran successfully and a red box around what failed.
  2. Click on the red box and see what all the input and output was to find the error.
_static/failedrun.png

Targets

Targets specify where you want your actions or workflows to run. There are both single targets or target groups to choose from.

.. youtube:: OeBlb6fj760

Creating Single Targets

  1. Create a new single target click the "New Target" button.
_static/newtarget.png
  1. Choose a target type.

Note

HTTP Endpoint is the most common target type.

_static/targettype.png
  1. Create a display name and description.
  2. Choose to apply an account key or create a new one.

Note

Account keys are only required for actions that require authentication.

  1. Provide the HTTP protocol, host/ip address, the port, and the path.
_static/targetinfo.png
  1. Click the "Submit" button.

Adding Targets to a Workflow

  1. Open the workflow.
  2. Select the target you created.
_static/addtarget.png

Creating Target Groups

TODO add info here

Account Keys

Account keys are used to authenticate to a target that is used in workflows. Account keys can be credentials like usernames and passwords or they can be certificates.

.. youtube:: pM2jKpDAJlo

Creating a New Account Key

  1. Click on the "New Account Key" button.
_static/accountkeybutton.png
  1. Choose the target account key type.
_static/keytype.png

Note

The most common key type is HTTP Basic Authentication or HTTP Client Certificate Authentication. Most REST interfaces will use HTTP Basic Authentication.

Example of Creating New Account Keys

  1. To create a HTTP Basic Authentication Key you will provide a display name and a description. Then you will add the credentials and click the "Submit" button.
_static/httpkey.png
  1. To create an Email Credentials Key you will provide a display name and a description. Then you will provide a from email address and a password then click the "Submit" button.
_static/emailkey.png
  1. To create a SNMP Credentials Key you will provide a display name and a description. Then you will provide a version number, a username, and a security level then click the "Submit" button.
_static/snmpkey.png

Using an Account Key

  1. Under "Targets" you can choose a target and apply an account key you created to it.
_static/newkeytarget.png

Atomic Actions

Atomic actions are the building blocks of workflows.

.. youtube:: r-1LTqU4RWI

Creating an Example Atomic Action

This atomic action will call out a postman echo and echo the response back to us.

Postman Echo

  1. Start by clicking the "New Workflow" button.
_static/newworkflow.png
  1. Scroll down in the left side bar until you reach "Web Service" and add a "HTTP Request" to the workflow.
_static/newecho.png
  1. Provide the HTTP Request the display name "Postman Echo" and provide a description.
  2. Provide the relative URL "/get".
_static/getURL.png
  1. Go to the target section and select execute on a target.
  2. Create a new target called "Postman Echo" and provide it the URL "postman-echo.com".
_static/echotarget.png
  1. To test the request please change "/get" to "/get?test&test2" then validate the workflow and run it. In the response JSON you will be able to see "test", "test2", and some unnecessary data.

Removing Unnecessary JSON

  1. To remove the extra unnecessary JSON add another action called "JSONPathQuery". This allows you to pick which data you want to be returned back.
_static/jsonpath.png
  1. In the right hand bar scroll down to JSON Query and click the puzzle piece to add a source JSON to query.
  2. Click activities then "Postman Echo" then choose the body.
_static/jsonvariable.png
  1. Add a JSON Path Query by providing "$.args" and the property name "args".
  2. To test this action validate the workflow and run it. If you look at the response from the "JSONPathQuery" you will just see "test" and "test2".

Making the Workflow Reusable

  1. Click an empty spot on the screen and then add a variable.
  2. Choose the data type string, add a display name of "Args", choose the scope to be input, and make it required.
_static/args.png
  1. Go back to the "Postman Echo" action and change the "/get?test&test2" by leaving the "/get?" and clicking the puzzle piece to select the variable you made.
_static/selectargs.png
  1. Set an output variable by adding a "Set Variables" action to the workflow.
_static/setvariableecho.png
  1. Go back to the main options for the workflow and add a new variable of type string called "OutArgs" and change the scope to output.
_static/outargs.png
  1. Add the variable to the "Set Variables" action by clicking the puzzle piece and choosing "OutArgs" for the variable to update section and for the variable value new section select JSONPath Query then Jsonpath Queries then args.
  2. Validate the workflow and select the "Is Atomic Workflow" button and give it a group name.
_static/atomicworkflow.png
  1. Validate the workflow again and you can no longer click run.
  2. To use the "Postman Echo" workflow you can create a new workflow and now add the "Postman Echo" action.