Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Syntax to abort Command in WFA

skellner

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

}

1 ACCEPTED SOLUTION

korman

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

View solution in original post

2 REPLIES 2

korman

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

View solution in original post

edgel

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.  

 

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public