Now we will look at how to create vCenter Orchestrator workflows that call WFA. This post will take you through initial workflow creation and assumes you have followed the previous posts and have the NetApp WFA Pakcage for VMware vCenter Orchestrator (you can download from here) already installed. Be warned that this is a LONG blog post. However, to cover everything in detail takes a bit of effort.
To create a vCO workflow that will call a WFA workflow, complete the following steps:
1. Open the vCO client and then go to the Workflows tab at the top. Go to Administrator > Library > NetApp > Tasks. Right click on Get WFA Workflow Inputs and select Start Workflow.
2. When the workflow starts, put the name of the WFA workflow exactly as it appears in WFA into the NetApp WFA workflow name box. In the below example we are using the WFA workflow “Create a Clustered Data ONTAP NFS Volume”.
3. This workflow wil run and get the User Inputs that will need to be used for the vCO workflow to call the WFA workflow.
4. Next we want to create a new vCO workflow. Right click on a folder that you will keep your workflows in and select “New Workflow”.
5. Next give the workflow a name. For simplicity sake it is recommended that you name the workflow the same as the WFA workflow.
6. Once the new workflow is created, you will be taken to an edit workflow screen. Go to Inputs and click on the Add Inputs button. Create as many inputs as shown after running the Get WFA Workflow Inputs workflow in vCO.
7. Add the Inputs you will need. For the selected workflow we are creating there are seven inputs needed.
8. You will then need to click on the inputs and rename them after the inputs given to you in the above step.
9. Next click on the Schema tab at the top. Select Scriptable Task from the left and drag it into the right pane. Then click on edit (the “Pencil” icon above the scriptable task)
10. You will then be at the below screen
11. Click on the In tab at the top. Then click on the “Bind to workflow parameter/attribute” button.
12. Select each entry on this screen by placing a check box next to it.
13. Click on “Select”. You will be taken back to the In tab and will see that the Local Parameters have now been set.
14. Next click on the Scripting tab and type the following:
System.log(“Starting the workflow”) (shown below)
15. Click Close on the Scripting tab
16. At the Schema screen, go to the left hand menu items and select Action element and drag it to the right of Bind Inputs that you just completed. Once you do this you will taken to the Chose action screen (show at Figure xxxx)
17. At the Chose action screen click on the Filter box and type in wfa. This will bring up a list of actions for you. Click on generateNetAppWFA_Inputs action and click select.
18. You will then be taken back to the Schema screen.
19. From the left hand menu on the Schema screen select Workflow elements and drag this to the right side of the newly created generateNetAppWFA_Inputs action.
20. This immediately lauches the “Chose workflow” screen. Here, click on NetApp WFA Workflow execution and then click select at the bottom right of this screen.
21. You will now be back at the Schema screen. Hover the mouse of the generateNetAppWFA_Inputs action. Click on the Edit button (Pencil Icon shown in the image below)
22. Once in the Edit portion click on the Scripting tab. You will be at the below screen.
23. Click on the OUT tab at the top of the screen. Then click on “not set” under Source Parameters next to actionResult.
24. Once you click on “not set” you will be taken to the generateNetAppWFA_Inputs output parameters ‘actionResult” screen. Click on Create parameter/attribute in workflow.
25. You will now be in Parameter information screen. Change the Name from actionResult to userInputs then click on OK.
26. You should now be back at the OUT tab screen for generateNetAppWFA_Inputs. Click on Close.
27. This will take you back to the Schema screen. Hover the mouse over NetApp WFA Workflow and click on the Edit button.
28. You will be taken to the Info tab of the NetApp WFA Workflow element.
29. Click on the IN tab at the top of this screen. Then click on “not set” under Source parameters next in the userInputs row.
30. At this screen click on userInputs and click select
31. Click on “not set” under Source parameters in the workflowName row.
32. Click on Create parameter/attribute in workflow
33. In the Parameter information screen in the Value input box at the bottom input the name of the workflow you are creating. In this example Create a Clustered Data ONTAP Volume is used.
34. Click OK
35. You will now be back at the below screen. Click Select.
36. Your screen should now be similar to the one below.
37. Click on the OUT tab at the top. Click on “not set” in the errorCode row under the Source Parameter column
38. Click on Create parameter/attribute in workflow.
39. Ensure that errorCode is listed for the name then click OK.
40. Click on “not set” in the wfaWorkflowJobID row under the Source parameter column.
41. Click on Create parameter/attribute in workflow.
42. Ensure that wfaWorkflowJobID is entered into the Name. Click OK.
43. Click on “not set” in the returnWFAParameters row under the Source parameters column.
44. Click on Create parameter/attribute in workflow.
45. Ensure that returnWFAParameters is listed in the Name box. Click OK.
46. When this step is complete your OUT screen should be similar to the one below. Then click on the Exception tab at the top
47. Under the Exception tab click on “not set”.
48. Chose “errorCode” and click on Select.
49. Once that is completed, your screen should resemble the one below.
50. Click on close to return to the main Schema screen. At this screen drag and drop Throw Exception under the NetApp WFA Workflow element.
51. Hover over Throw Exception and click on the Edit button.
52. Under the Exception tab in Throw Exception click on “Not set”.
53. Click on errorCode and click Select at the bottom.
54. Your screen should now look similar to the one below. Click on Close.
55. Next, click on the Presentation tab at the top.
56. Set your Presentation for the workflow up how you choose. In the below example we create a Set Volume Information display group and two steps called Volume Details and Export Details. We then move the input parameters under the respective steps.
57. Once this is done we then set the properties of the inputs under the steps. Below we see that we are setting ClusterName as a Mandatory Input and setting a predefined list of answers for it. We then set a default value.
58. Add the desired property for each input in the steps. Below we see examples of other properties that are added to the inputs.
59. Once this is done, save the newly created workflow. You will then be returned to the Workflow screen. Right click on the newly created workflow and select Start Workflow.
60. Select or input the desired entries for the new workflow, in this case entries for creating a new volume.
61. If all the steps have been followed your workflow should run successfully.
Rejoice for you have finally come to end of this very long post. Hopefully it has helped with your own setup.
Here are the links for the Software-Defined Storage with NetApp and VMware series:
As always I appreciate the time you have taken to read this post and I’d love to get your feedback and hear what you’d like to see. Workflow ideas, blog post ideas, and general comments are all welcome.
Thanks for reading!