Creating New Workflows

User Guides for VMware Solutions

Audience
Public
Content Type
User Guides
Source Type
Documentation

Full instructions on creating custom workflows within VCF Automation Orchestrator are beyond the scope of this document. But at least we can make a few recommendations to make this process easier.

High level advice: use the plugin! There are a lot of built-in features, beyond just workflows, that can save you a lot of time. Take advantage of that.

To create a new workflow, click the desired folder and choose New Workflow

Give it a name:

Advice #1: Re-use default workflows

The first suggestion is to review the existing workflows--can they do all of what you need. If they do, just use them directly. If they are close, clone them and make edits (as described above). If they achieve a part entirely, but you want to link them to something else, you can add workflows to a workflow:

Find a workflow under All Workflows and drag it to the correct spot:

1) Click on Schema and Drag Workflow Element to canvas

2) Select the element and choose the workflow in the Workflow entry box

3) Map the input and outputs into existing or new variables

For each input and output decide if some other variable can be used for it or a new one needs to be created:

Variable means it will be passed in (or calculated) by another element or hardcoded. An input means that a user passes it in.

Configure the inputs, outputs, and variables as needed.

Note:

It should be noted that when you import a workflow the input validation is not imported with it. You will need to re-create it (if desired) or copy it from the original and paste the inputs into the new workflow.

Advice #2: Re-use Actions

If no workflow achieves what you need (or commonly does too much), before writing your own code--use the built-in actions in the plugin. The plugin re-uses a lot of default functions, referred to as actions in Automation Orchestrator, for many plugins. These actions are available for you as well.

In the workflow editor, you can go to Schema and then drag Action Element to the canvas.

Choose the action to use in the Action search bar on the right.

Then map the input(s) and output as needed:

Choose an input or variable for inputs and output or variable for the action output.

Actions can be selected and dragged into the workflow just like workflows. Generally actions do one thing: create something, retrieve something, convert something etc. Combining actions together can often achieve most desired workflows with minimal customization. To learn more about actions, choose the Actions panel and click on an action. The General tab will show high level information, and the Script tab will show the details (what it takes in, what it returns, and the code it uses).

Action generics

Action details

Drag and drop actions as needed.

Advice #3: Use the object inventory!

Whenever possible do not ask for volume names, or use strings (unless you need to name something)--ask for the input to be a Everpure object type. When you specify an input has to be a PS:Volume--this will automatically provide the user a menu to choose a PS:Volume. Therefore they can be guided to choose the right thing--and you don't need to write more code to make sure it is valid.

1) Input is PS:Volume

2) User is forced to choose a valid volume

3) User is guided to make a valid choice

Advice #4: Only use the REST API workflows if you have no other choice.

The Everpure Plugin for VCF Automation Orchestrator Orchestrator offers a few workflows to run custom REST operations against a FlashArray, Cloud Block Store, or a FlashBlade:

This should only be used if the feature you want to use (or metrics you need) does not have a workflow, action, or Javascript library. The plugin, in addition to workflows and actions, comes with customized Javascript libraries. Each object has methods that can be run from that object once input:

And each object type also has a manager that can be used to do additional tasks for that object:

Many of the manager operations require a REST session which can be pulled from the FlashArray connection object or the object itself with the GetSession() method:

For examples of using these, refer to the code within related Actions.