2012-08-10 05:43 AM
How can I abort a WFA command under certain circumstances? Is the following correct?
# If Snapmirror Relation exists abort
$SnapMirrorStatus = Get-NaSnapmirror $SourceVolumeName
Get-WFALogger -Info -message $("Snapmirror Relation " + $SnapMirrorStatus + " already exists")
Solved! See The Solution
2 REPLIES 2
2012-08-11 11:53 PM
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
Re: Syntax to abort Command in WFA
2014-10-01 01:53 PM
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.