<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Continue execution of workflow even when it errors in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106878#M18848</link>
    <description>&lt;P&gt;Hello Prasad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is your workflow always going to create aggregate?&lt;/P&gt;&lt;P&gt;I guess, it is not based on the availability of aggregate it will decide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is the case, it can be handling easily using a user option on aggregate creation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Already Existing Aggregate: [true/false]&lt;/P&gt;&lt;P&gt;New Aggregate: [some_new_aggr]&lt;/P&gt;&lt;P&gt;Existing Aggregate: [aggr_list|\/]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;New Aggregate&lt;/EM&gt; will take new aggregate name (&lt;EM&gt;string type&lt;/EM&gt;) when &lt;EM&gt;Already Existing Aggregate&lt;/EM&gt; is false. This time &lt;EM&gt;Existing Aggregate&lt;/EM&gt; drop down list will be disabled.&lt;/P&gt;&lt;P&gt;Second time when user is going to run the flow, he will search his aggregate in the &lt;EM&gt;Existing Aggregate&lt;/EM&gt; drop down list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The step, where we are going to create the aggregate (the aggregate creation command), can be handle (enable/disable) using MVEL expression like:&lt;/P&gt;&lt;P&gt;In the advance tab of the command instance,&lt;/P&gt;&lt;P&gt;Use: If the following expression is true:&lt;/P&gt;&lt;P&gt;&amp;lt;your_emvl_expr&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like you can use: $AlreadyExistingAggregate == 'false'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Gaurab&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2015 05:35:50 GMT</pubDate>
    <dc:creator>GaurabBanerjee</dc:creator>
    <dc:date>2015-07-01T05:35:50Z</dc:date>
    <item>
      <title>Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106730#M18814</link>
      <description>&lt;P&gt;So I have a bunch of steps that I would like to continue executing even if one of fails.&lt;/P&gt;&lt;P&gt;I have provided the option -ErrorAction Continue but it still fails.&lt;/P&gt;&lt;P&gt;Looks like this is only for a non-terminating error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sequence of steps like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invoke-Expression -ErrorAction Continue $expression&lt;/P&gt;&lt;P&gt;Invoke-Expression -ErrorAction Continue $expression&lt;/P&gt;&lt;P&gt;Invoke-Expression -ErrorAction Continue $expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expression varies in every step and I want the rest to continue even when it fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Prasad&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 23:58:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106730#M18814</guid>
      <dc:creator>prasadkm0204</dc:creator>
      <dc:date>2025-06-04T23:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106737#M18817</link>
      <description>&lt;P&gt;Sometimes ErrorAction doesnot work for non terminating errors, e.g: unable to connect to ONTAP server.&lt;/P&gt;&lt;P&gt;You can use try -- catch block and can continue execution based on the type of exception message.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2015 06:19:04 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106737#M18817</guid>
      <dc:creator>rkiran</dc:creator>
      <dc:date>2015-06-26T06:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106805#M18832</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two types of Error. Terminating and non-terminating.&lt;/P&gt;&lt;P&gt;A terminating error is an error that will halt a function or operation. If you make a syntax error or run out of memory, that is a terminating error. Terminating errors can be caught and handled.&lt;/P&gt;&lt;P&gt;Non-terminating errors allow Powershell to continue and usually come from cmdlets or other managed situations. Under normal circumstances they cannot be caught by Try-Catch-Finally.&lt;/P&gt;&lt;P&gt;So how to catch a Non-Terminating error?&lt;/P&gt;&lt;P&gt;Basically, we need to tell PowerShell to treat it as terminating. To do this you use the ErrorAction parameter. By specifying -ErrorAction Stop on the end of a cmdlet you ensure that any errors it throws are treated as terminating and can be caught.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add-NcLunMap -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -Id $LunId -ErrorAction Stop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have ensured that the error you are trying to catch is going to be treated as terminating, you can build a Try Catch block around the command (or commands) that might cause the error. The first stage is to surround the section of your script that may throw the error with a Try block. Immediately after the Try block you must place a Catch block to deal with the error. The Catch block is only accessed if a terminating error occurs, otherwise it is ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try {&lt;BR /&gt;if ($LunId) {&lt;BR /&gt;Add-NcLunMap -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -Id $LunId -ErrorAction Stop&lt;BR /&gt;Get-WFALogger -Info -message $("Mapped LUN successfully")&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;Add-NcLunMap -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -ErrorAction Stop&lt;BR /&gt;Get-WFALogger -Info -message $("Mapped LUN successfully")&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch {&lt;BR /&gt;$ErrorMessage = $_.Exception.Message&lt;BR /&gt;$FailedItem = $_.Exception.ItemName&lt;BR /&gt;throw "Failed to map LUN $FailedItem. Error: $ErrorMessage"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The values you can supply for the&amp;nbsp;–ErrorAction&amp;nbsp;parameter are SilentlyContinue,&amp;nbsp;Stop,&amp;nbsp;Continue, and&amp;nbsp;Inquire.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Enumeration&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Value&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Description&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;SilentlyContinue&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;The Windows PowerShell runtime will continue processing without notifying the user that an action has occurred.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Stop&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;The Windows PowerShell runtime will stop processing when an action occurs.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Continue&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The Windows PowerShell runtime will continue processing and notify the user that an action has occurred.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Inquire&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;The Windows PowerShell runtime will stop processing and ask the user how it should proceed.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can handle the situation as bellow:&lt;/P&gt;&lt;P&gt;if ($LunId) {&lt;BR /&gt;Add-NcLunMap -ErrorVariable Err -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -Id $LunId -ErrorAction SilentlyContinue&lt;BR /&gt;if ($Err) {&lt;BR /&gt;Get-WFALogger -Error -message $("Failed to map LUN: "+ $Err)&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;Get-WFALogger -Info -message $("Mapped LUN successfully")&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;Add-NcLunMap -ErrorVariable Err -Path $LunPath -InitiatorGroup $IgroupName -VserverContext $VserverName -ErrorAction SilentlyContinue&lt;BR /&gt;if ($Err) {&lt;BR /&gt;Get-WFALogger -Error -message $("Failed to map LUN:"+ $Err)&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;Get-WFALogger -Info -message $("Mapped LUN successfully")&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 06:18:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106805#M18832</guid>
      <dc:creator>GaurabBanerjee</dc:creator>
      <dc:date>2015-06-29T06:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106817#M18834</link>
      <description>&lt;P&gt;Thanks Gaurab. That was detailed info.&lt;/P&gt;&lt;P&gt;In my case, I have a workflow to deploy a storage system.&lt;/P&gt;&lt;P&gt;But sometimes, it can fail half way after creating the aggregates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the next time I run, I want the skip the part of creating aggregates since its already created.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One choice is remove the steps and create new references to the aggregates (cumbersome).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I was wondering if there is a any recommended way to skip steps in a workflow when required and I tried ErrorAction which did not work in this case (because trying to create a aggregate that already exists is a terminating error).&lt;/P&gt;&lt;P&gt;I will check out try/catch exceptions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a bunch,&lt;/P&gt;&lt;P&gt;-Prasad&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 17:32:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106817#M18834</guid>
      <dc:creator>prasadkm0204</dc:creator>
      <dc:date>2015-06-29T17:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106835#M18837</link>
      <description>&lt;P&gt;Hello Prasad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me understand the scenario clearly.&lt;/P&gt;&lt;P&gt;Let us take it we have a workflow which constitutes of 9 different steps.&lt;/P&gt;&lt;P&gt;1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5-&amp;gt;…-&amp;gt;9&lt;/P&gt;&lt;P&gt;Now, let say, the aggregate creation happens in the 3 step (and always passes).&lt;/P&gt;&lt;P&gt;Now the step 4 will execute and for simplicity, lets it will pass.&lt;/P&gt;&lt;P&gt;Then it’s time for 5th step and it will fail/is failing catastrophically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this situation, what do you want?&lt;/P&gt;&lt;P&gt;Do you want an abort or continue with the other step(s) till end and even if it is in a loop, other iteration should continue??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Gaurab&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 06:51:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106835#M18837</guid>
      <dc:creator>GaurabBanerjee</dc:creator>
      <dc:date>2015-06-30T06:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106865#M18843</link>
      <description>&lt;P&gt;Hi Gaurab,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using your scenario, let the 5th one fail and stop execution.&lt;/P&gt;&lt;P&gt;After fixing the issues related to step 5,&amp;nbsp;&lt;SPAN&gt;I will need to rerun the workflow. This time, it will fail at step 3 (aggr creation) since the aggrs already exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I need is to selectively ignore a few steps in reruns (in this case step 3), but access to those variable still need to be available for future steps (like vol creation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that possible or is there a workaround ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Prasad&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 17:24:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106865#M18843</guid>
      <dc:creator>prasadkm0204</dc:creator>
      <dc:date>2015-06-30T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Continue execution of workflow even when it errors</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106878#M18848</link>
      <description>&lt;P&gt;Hello Prasad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is your workflow always going to create aggregate?&lt;/P&gt;&lt;P&gt;I guess, it is not based on the availability of aggregate it will decide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is the case, it can be handling easily using a user option on aggregate creation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Already Existing Aggregate: [true/false]&lt;/P&gt;&lt;P&gt;New Aggregate: [some_new_aggr]&lt;/P&gt;&lt;P&gt;Existing Aggregate: [aggr_list|\/]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;New Aggregate&lt;/EM&gt; will take new aggregate name (&lt;EM&gt;string type&lt;/EM&gt;) when &lt;EM&gt;Already Existing Aggregate&lt;/EM&gt; is false. This time &lt;EM&gt;Existing Aggregate&lt;/EM&gt; drop down list will be disabled.&lt;/P&gt;&lt;P&gt;Second time when user is going to run the flow, he will search his aggregate in the &lt;EM&gt;Existing Aggregate&lt;/EM&gt; drop down list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The step, where we are going to create the aggregate (the aggregate creation command), can be handle (enable/disable) using MVEL expression like:&lt;/P&gt;&lt;P&gt;In the advance tab of the command instance,&lt;/P&gt;&lt;P&gt;Use: If the following expression is true:&lt;/P&gt;&lt;P&gt;&amp;lt;your_emvl_expr&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like you can use: $AlreadyExistingAggregate == 'false'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Gaurab&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 05:35:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Continue-execution-of-workflow-even-when-it-errors/m-p/106878#M18848</guid>
      <dc:creator>GaurabBanerjee</dc:creator>
      <dc:date>2015-07-01T05:35:50Z</dc:date>
    </item>
  </channel>
</rss>

