<?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: Aborting workflow if variable is found in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23482#M4992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you try something like this in your workflow:&lt;/P&gt;&lt;P&gt;- Add a return parameter to your workflow with a value that errors out if the export rule was found. Something like this screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26471_return_parameter.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The value used above is:&lt;/P&gt;&lt;P&gt;export_rule1._found ? throwException("The volume is associated with an export policy that has active rules. Use Modify NFS Volume workflow to fix that before attempting to destroy the volume") : "No problem"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the workflow is executed on a volume associated with an export policy with rules, then it errors out as shown below. Unfortunately, the error message, shows the complete expression string also.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26490_planning_failure.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When executed on a volume which is associated with an export policy with no rules, it succeeds.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26491_planning_success.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same can also be tried in the Advanced tab-&amp;gt;Conditional Execution -&amp;gt; If the following expression is true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is an easier way to achieve this case, then we will get back again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2014 11:42:15 GMT</pubDate>
    <dc:creator>shailaja</dc:creator>
    <dc:date>2014-08-05T11:42:15Z</dc:date>
    <item>
      <title>Aborting workflow if variable is found</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23476#M4990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in the process of writing a "Delete NFS Volume" workflow in WFA v2.2 that will be called via the REST API from our own Storage Service.&amp;nbsp; Here is how it currently works:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Establish some variables with the No-Op command (cluster name, vserver, etc).&lt;/LI&gt;&lt;LI&gt;Then move onto another modified No-Op command that includes a reference to export rules where I try to find any export rules that exist in the named export policy.&lt;/LI&gt;&lt;LI&gt;Then execute the Remove Volume command only if I did not find any export rules in step 2 (in Advanced tab I test if I did not find the export_rule1 variable).&lt;/LI&gt;&lt;LI&gt;Then execute the Remove Export Policy command only if I did not find any export rules in step 2 (in Advanced tab I test if I did not find the export_rule1 variable).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For steps 3 &amp;amp; 4 we don't want to remove the volume &amp;amp; its export policy if any rules exist because we want to protect naive end-users from destroying their own data.&amp;nbsp; The idea is that they will need to explicitly remove all export rules from the policy first with the "Modify NFS Volume" workflow first.&lt;/P&gt;&lt;P&gt;Right now the Remove Volume &amp;amp; Remove Export Policy commands become disabled if any export rules are found -&amp;nbsp; good in the sense that the workflow doesn't delete the volume as desired but bad because the overall workflow exits successfully.&amp;nbsp; Therein lies the problem - I want to abort the workflow if I find any export rules and I'm not sure how to abort a workflow if I find something.&amp;nbsp; It's only clear to me how to abort a workflow if I don't find what I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone let me know how it might be possible to abort a workflow if I find something (and in this case exit with a custom error message)?&amp;nbsp; I'm playing around with conditional execution but haven't figured it out yet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:31:18 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23476#M4990</guid>
      <dc:creator>dcornely1</dc:creator>
      <dc:date>2025-06-05T05:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Aborting workflow if variable is found</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23482#M4992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you try something like this in your workflow:&lt;/P&gt;&lt;P&gt;- Add a return parameter to your workflow with a value that errors out if the export rule was found. Something like this screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26471_return_parameter.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;The value used above is:&lt;/P&gt;&lt;P&gt;export_rule1._found ? throwException("The volume is associated with an export policy that has active rules. Use Modify NFS Volume workflow to fix that before attempting to destroy the volume") : "No problem"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the workflow is executed on a volume associated with an export policy with rules, then it errors out as shown below. Unfortunately, the error message, shows the complete expression string also.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26490_planning_failure.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When executed on a volume which is associated with an export policy with no rules, it succeeds.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/26491_planning_success.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same can also be tried in the Advanced tab-&amp;gt;Conditional Execution -&amp;gt; If the following expression is true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is an easier way to achieve this case, then we will get back again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 11:42:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23482#M4992</guid>
      <dc:creator>shailaja</dc:creator>
      <dc:date>2014-08-05T11:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aborting workflow if variable is found</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23491#M4995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Shailaja - this is exactly what I was after.&amp;nbsp; I've tested it in my lab environment with success and am now working to test with our storage service via API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 18:14:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Aborting-workflow-if-variable-is-found/m-p/23491#M4995</guid>
      <dc:creator>dcornely1</dc:creator>
      <dc:date>2014-08-05T18:14:11Z</dc:date>
    </item>
  </channel>
</rss>

