Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to conditionalize 'Exec this cmd' based on previous cmd step?

2014-09-16
04:03 PM
5,227 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 } ???
Solved! See The Solution
1 ACCEPTED SOLUTION
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dave,
Is my understanding right that you are trying to do something very similar to nested IF statement ?
Regards
adai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect. Exactly what I was looking for.
