2014-08-02 11:05 PM
I want to use conditional execution in my workflow to execution command of VMFS creating just if the os_type on the lun is vmware.
I saw the options of the conditional execution but I can't understand how to use them
• When the variables you have specified are found
• When the variables you have specified are not found
• When the expression you have specified is true
I assume that simple examples would help me.
Solved! See The Solution
2 REPLIES 2
2014-08-03 05:30 AM
It largely depends on how you want to design your workflow. So I assume you are going to create a VMFS datastore on an existing Lun.
Also assuming you are going to use the WFA certified command "Create VMFS Volume". For checking lun's os type, you would need a lun definition with os_type attribute and this cmd Create VMFS volume doesn't have it. So you'll need a no-op command to find a lun using a filter. Once you have the lun object like lun1, you can use the Advanced tab of Create VMFS command selecting "If the following Expression is true"
lun1.os_type == "vmware"
So if the found lun using the no-op command has os_type as 'vmware', the command Create VMFS will execute in workflow job execution. Else will be disabled. If you want to see the value of this lun1.os_type add it in workflow's return parameters.
Attaching a workflow which you can import on WFA2.2. This will explain you clearly.
Note: This attached workflow example is designed to help you understand using conditional execution in workflows. Preview of this will pass and is enough to explain the concept. Successful execution of this will not happen because it has hard-coded dummy values. Also assuming you have some Lun Data in your WFA cache, else the filter will return empty result.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.