Subscribe
Accepted Solution

Syntax to abort Command in WFA

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

}

Re: Syntax to abort Command in WFA

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

Re: Syntax to abort Command in WFA

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.