Active IQ Unified Manager Discussions

How to conditionalize 'Exec this cmd' based on previous cmd step?

korns
4,177 Views

Within a workflow (7-mode) I have a number of steps/rows but at certain points I have a side-by-side sequence of: [ Create Volume ] followed by [ Create Export ].

The Create Volume parameter step uses Define Volume: [_myVol___] [by searching for an existing Volume] and has filters which search to see if the volume exists. If myVol was not found:  [Fill-in attributes and execute the command] ... so if it doesn't exist, a volume is created. So far, so good.

The subsequent Create Export command references back to myVol from the previous step and creates an export of that volume. However, if the volume exists, it probably already has the required export and I'd like to conditional'ize the Create Export command using the _/Advanced\_ tab to only execute if the previous Create Volume command ended up actually creating a new volume. Is there any way to communicate that status from the prior step to this step via a variables existence or value setting ... that I could test with the Execute this command: If the following variable was { variable was found | variable was not found |  expression is true } ???

1 ACCEPTED SOLUTION

ktim
4,177 Views

Each object variable has an "_found" attribute that you can use in expressions. So if myVol already existed myVol._found would be true.

Regards,

Tim

View solution in original post

4 REPLIES 4

adaikkap
4,177 Views

Hi Dave,

           Is my understanding right that you are trying to do something very similar to nested IF statement ?

Regards

adai

korns
4,177 Views

Hi Adai,

I know how to use an MVEL unary expression to make a nested if that I could use in _/Advanced\_ with an Execute if expression is TRUE ... I just don't know any status or variable I could test in the expression to tell whether myVol (in my example) already existed or was just created.

Dave

ktim
4,178 Views

Each object variable has an "_found" attribute that you can use in expressions. So if myVol already existed myVol._found would be true.

Regards,

Tim

korns
4,177 Views

Perfect. Exactly what I was looking for.

Public