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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I abort a WFA command under certain circumstances? Is the following correct?
# If Snapmirror Relation exists abort
$SnapMirrorStatus = Get-NaSnapmirror $SourceVolumeName
if ($SnapMirrorStatus)
{
Get-WFALogger -Info -message $("Snapmirror Relation " + $SnapMirrorStatus + " already exists")
exit
}
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
Hi Stefan,
It depends on what you are trying to achieve.
- if you would like to abort current command and continue to the next one - just use "return" statement - as a result workflow will be "green" and it will continue to the next command
- if you would like to abort current command and workflow - just throw an exception (throw "user created message") - as a result workflow will be "red" and you will see "user created message" in error box of monitoring screen
Regards,
Sasha Korman
WFA Team
2 REPLIES 2
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Stefan,
It depends on what you are trying to achieve.
- if you would like to abort current command and continue to the next one - just use "return" statement - as a result workflow will be "green" and it will continue to the next command
- if you would like to abort current command and workflow - just throw an exception (throw "user created message") - as a result workflow will be "red" and you will see "user created message" in error box of monitoring screen
Regards,
Sasha Korman
WFA Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where does one actually go withing hte interface to issue the return statement once the workflow is executing? I am stuck in an "aborting" state for several workflows with no apparted option to clear this. There are no reserveations remaining related to these workflows to release. Just stuck.
