Using REST + WFA Finders to Create Dynamic vCO Workflows

In the last post we covered how to create Filters and Finders in WFA so that we could access WFA data through a RESTful interface. This creates a nice separation between the two systems and decouples the dependency on the WFA database for dynamically populating data in vRealize Orchestrator workflows.

Let’s look at how to take the result of the last post, query the data from vRO, and incorporate it into vRO workflows.

I’m going to be using the same workflow as before, “Create a Clustered Data ONTAP Volume”, so we will once again need four inputs:

  • Cluster Name – A string with valid values being clustered Data ONTAP systems configured in WFA
  • Storage Virtual Machine Name – A string with valid values being SVMs belonging to the cluster selected above.
  • Volume Name – A string provided by the user.
  • Volume Size (in GB) – A number provided by the user.

To get started, we are going to create vRO actions which execute REST operations against the WFA filters/finders to return the same data that we used direct SQL queries for previously. These actions will then be executed/used from the workflow presentation.

Read more

Getting data from NetApp Workflow Automation using Finders and REST

Using the database to get information from Workflow Automation (WFA) and create dynamic vCenter Orchestrator (vCO) workflows is one way to add dynamic data fields to those workflows. However, it just feels dirty. It’s a “backdoor” if you will, and just not very scalable or supportable. Imagine if the WFA database schema changes…you will be responsible for changing all of the SQL queries in the vCO workflows, which make break in non-obvious ways.

A much more robust method is to abstract those queries (and keep them in WFA) then use REST to retrieve the data. WFA provides two mechanisms, filters and finders, for selecting and returning data from the database internally. We can access these through the REST interface, which we can then parse from XML into a more vCO friendly format.

What is a filter?

A filter is simply a SQL select statement that has been validated to return certain fields (the natural keys at a minimum).

What is a finder?

A finder is one or more filters.

Putting them to work

Both of these constructs use SQL to query the WFA cache database (which is periodically updated from the data sources such as OnCommand Unified Manager), however a finder does not have SQL directly in it, only the filter does.

Read more