<?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: Assistance with If/Else Conditional Workflow in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248071#M1245</link>
    <description>&lt;P&gt;I need few more input on passing the values in JS.&lt;BR /&gt;
results.MECMsuccess.Success  here MECMsuccess is the taskcode?&lt;/P&gt;
&lt;P&gt;if yes, I am using the same but getting the below error. It will be great if we have some small examples and recoding’s.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149788i5F6BC493E6AB325A/image-size/large?v=v2&amp;amp;px=2000" role="button" title="bea8fb52ab9092e9c3ec6915a585e082a3862900.png" alt="bea8fb52ab9092e9c3ec6915a585e082a3862900.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 13:40:42 GMT</pubDate>
    <dc:creator>Ibrahim-GCC</dc:creator>
    <dc:date>2024-09-04T13:40:42Z</dc:date>
    <item>
      <title>Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248069#M1243</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I’m poking at the If/Else Conditional Workflow type task but I keep hitting an error around:&lt;/P&gt;
&lt;P&gt;Cannot convert null value ‘undefined’(language: JavaScript, type: undefined) to Java type ‘boolean’ using Value.asBoolean(). You can ensure that the operation is supported using Value.isBoolean().&lt;/P&gt;
&lt;P&gt;No matter what I try. I’m sure I’m missing something simple.&lt;/P&gt;
&lt;P&gt;I have a task with a really simple Powershell array that gets converted to JSON and ‘write-output’:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;$RESULTSOUTPUT = @{}
$RESULTSOUTPUT.add("Unzipping Results", "Success")
$RESULTSOUTPUT.add("MECM Innstallation", "Success")
$RESULTSOUTPUT.add("Success", "True")
Write-Output($RESULTSOUTPUT | ConvertTo-Json)
Exit 0
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is set to be registered to Code “MECMsuccess” with Result Type JSON&lt;/P&gt;
&lt;P&gt;I then have a debug task that just does write-output(“&amp;lt;%=results.MECMsuccess.Success%&amp;gt;”)&lt;BR /&gt;
and that spits out True as expected&lt;/P&gt;
&lt;P&gt;The next step is the If/Else Conditional Workflow task, which I setup with information from &lt;A href="https://discuss.morpheusdata.com/t/looking-guidances-for-triggering-multiple-automation-tasks-based-on-user-inputs-yes-no-in-service-catalog/1830/2" class="inline-onebox"&gt;Looking guidances for triggering multiple automation tasks based on user inputs Yes/No in service catalog - #2 by Tyler_Boyd&lt;/A&gt; as my example:&lt;/P&gt;
&lt;P&gt;if (results.MECMsuccess.Success == “true”) {&lt;BR /&gt;
true;&lt;BR /&gt;
} else if (results.MECMsuccess.Success == “false”) {&lt;BR /&gt;
false;&lt;BR /&gt;
}&lt;/P&gt;
&lt;P&gt;(I also tried using three ==='s as the text block has two but if you click to expand the screenshot you can see there are three there).&lt;/P&gt;
&lt;P&gt;The results I get no matter what are:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;Error Executing Conditional Workflow Task _Catalog - MECM Email Logic - Cannot convert null value 'undefined'(language: JavaScript, type: undefined) to Java type 'boolean' using Value.asBoolean(). You can ensure that the operation is supported using Value.isBoolean().
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This holds true even if I adjust things to just be a Single value result or a Key/Value. I’m not sure what in the Boolean is going on.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:22:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248069#M1243</guid>
      <dc:creator />
      <dc:date>2024-08-23T12:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248070#M1244</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hpe.com/u/tyler_boyd"&gt;@Tyler_Boyd&lt;/A&gt; &lt;A class="mention" href="https://community.hpe.com/u/cbunge"&gt;@cbunge&lt;/A&gt; Thank you for the replies and information.&lt;/P&gt;
&lt;P&gt;I did rebuild just a really simple workflow using the Conditional and it worked there, so I must have something boogered up in my original attempt I’ll have to flush out.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 13:57:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248070#M1244</guid>
      <dc:creator />
      <dc:date>2024-08-26T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248071#M1245</link>
      <description>&lt;P&gt;I need few more input on passing the values in JS.&lt;BR /&gt;
results.MECMsuccess.Success  here MECMsuccess is the taskcode?&lt;/P&gt;
&lt;P&gt;if yes, I am using the same but getting the below error. It will be great if we have some small examples and recoding’s.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149788i5F6BC493E6AB325A/image-size/large?v=v2&amp;amp;px=2000" role="button" title="bea8fb52ab9092e9c3ec6915a585e082a3862900.png" alt="bea8fb52ab9092e9c3ec6915a585e082a3862900.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 13:40:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248071#M1245</guid>
      <dc:creator>Ibrahim-GCC</dc:creator>
      <dc:date>2024-09-04T13:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248072#M1246</link>
      <description>&lt;P&gt;Tyler,&lt;/P&gt;
&lt;P&gt;If it’s because I didn’t catch the capitalization of the “True” and not having a general else instead of else if… haha.&lt;/P&gt;
&lt;P&gt;I’ll test that here and post back. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248072#M1246</guid>
      <dc:creator />
      <dc:date>2024-08-23T12:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248073#M1247</link>
      <description>&lt;P&gt;I updated my old post to reflect.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248073#M1247</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-08-23T12:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248074#M1248</link>
      <description>&lt;P&gt;Interesting, I’m not seeing the same thing.&lt;/P&gt;
&lt;P&gt;What version of Morpheus are you on? The same logic is working for me in 7.0.5.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150329i0D98E16B06AF0FDE/image-size/large?v=v2&amp;amp;px=2000" role="button" title="a958bd662767fbb1130726bff9e63816bd0b8e0f.png" alt="a958bd662767fbb1130726bff9e63816bd0b8e0f.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 13:30:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248074#M1248</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-08-23T13:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248075#M1249</link>
      <description>&lt;P&gt;We’re on version 7.0.4&lt;/P&gt;
&lt;P&gt;Being my first time playing around with this stuff, it couldn’t just be something I have screwed up or am doing wrong and that wouldn’t surprise me&lt;/P&gt;
&lt;P&gt;I’m updating this test instance to 7.0.5 and will give it another go after that completes. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 15:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248075#M1249</guid>
      <dc:creator />
      <dc:date>2024-08-23T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248076#M1250</link>
      <description>&lt;P&gt;Sorry to be a pain, but I think it almost worked.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot from 2024-08-23 09-01-56"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149648i875D56949A92DCC1/image-size/large?v=v2&amp;amp;px=2000" role="button" title="71fcf9609eb92ed3f33a1212b496d5c983186a02.png" alt="71fcf9609eb92ed3f33a1212b496d5c983186a02.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If you look, that seems to have triggered the  “Email on MECM Installation success” task, but the logic in the If/Else is&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot from 2024-08-23 08-58-21"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150236iAE1A8C2FA4582EA0/image-size/large?v=v2&amp;amp;px=2000" role="button" title="f49331bc820dc4779436bab099e62389ef278f03.png" alt="f49331bc820dc4779436bab099e62389ef278f03.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It seems the false didn’t run the fail workflow and associated task but still ran the true/success workflow and task&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 13:02:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248076#M1250</guid>
      <dc:creator />
      <dc:date>2024-08-23T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248077#M1251</link>
      <description>&lt;ASIDE class="quote group-Customers" data-username="rjr162" data-post="1" data-topic="2012"&gt;
rjr162:
&lt;BLOCKQUOTE&gt;
&lt;P&gt;MECMsuccess&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;
&lt;P&gt;Can you try&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;if (results.MECMsuccess.Success == "True") {
    return true;
} else if (results.MECMsuccess.Success == "False") {
    return false;
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:35:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248077#M1251</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-08-23T12:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248078#M1252</link>
      <description>&lt;P&gt;I utilized the conditionals within this package for the approvals check:&lt;BR /&gt;
&lt;A href="https://share.morpheusdata.com/package/SP-MORPHEUS-MORPKG/about"&gt;Package&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://dev.azure.com/morpheusdata/Morpheus%20Packages/_git/SP-MORPHEUS-MORPKG"&gt;Repository&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 11:33:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248078#M1252</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2024-08-26T11:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248079#M1253</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hpe.com/u/ibrahim"&gt;@ibrahim&lt;/A&gt;&lt;BR /&gt;
In my case, yup the MECMsuccess was the task code output variable from my test script. Not sure on your error as that seems to maybe indicate the wrong type of task vs what’s allowed?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 13:12:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248079#M1253</guid>
      <dc:creator />
      <dc:date>2024-09-10T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248080#M1254</link>
      <description>&lt;P&gt;If it continues to be an issue you may want to look at putting in a ticket in case you are hitting a bug.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 19:41:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248080#M1254</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-08-24T19:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248081#M1255</link>
      <description>&lt;P&gt;I’m hitting the same in 7.0.5 where both success and fail seem to kick off the “Success” email workflow and not the “Failure” email workflow.&lt;/P&gt;
&lt;P&gt;I might create another variant from scratch and see if that works and why typo or something I may have in the original.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:30:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248081#M1255</guid>
      <dc:creator />
      <dc:date>2024-08-23T16:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248082#M1256</link>
      <description>&lt;P&gt;Tyler,&lt;/P&gt;
&lt;P&gt;That did it! It looks like the missing ‘return’ is what was throwing things off as the error went away and the task worked successfully on adding the “Return”&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;– Ron&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:54:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248082#M1256</guid>
      <dc:creator />
      <dc:date>2024-08-23T12:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with If/Else Conditional Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248083#M1257</link>
      <description>&lt;P&gt;Could also do&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;if (results.MECMsuccess.Success == "True") {
    return true;
} else {
    return false;
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:42:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/assistance-with-if-else-conditional-workflow/m-p/7248083#M1257</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-08-23T12:42:16Z</dc:date>
    </item>
  </channel>
</rss>

