<?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 How can I use ex.result(:xxxxx&amp;quot;) with multiple pre-tasks in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249669#M1658</link>
    <description>&lt;P&gt;Hello workflow fans!&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a task that can be triggered by&amp;nbsp; two predecessors.&lt;/P&gt;&lt;P&gt;I want to use there result in this task. Is there a decent way to do this?&lt;/P&gt;&lt;P&gt;Or do I need to a "if empty then the other on"?&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 12:08:23 GMT</pubDate>
    <dc:creator>henk_stobbe</dc:creator>
    <dc:date>2024-07-02T12:08:23Z</dc:date>
    <item>
      <title>How can I use ex.result(:xxxxx") with multiple pre-tasks</title>
      <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249669#M1658</link>
      <description>&lt;P&gt;Hello workflow fans!&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a task that can be triggered by&amp;nbsp; two predecessors.&lt;/P&gt;&lt;P&gt;I want to use there result in this task. Is there a decent way to do this?&lt;/P&gt;&lt;P&gt;Or do I need to a "if empty then the other on"?&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 12:08:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249669#M1658</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-02T12:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use ex.result(:xxxxx") with multiple pre-tasks</title>
      <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249680#M1659</link>
      <description>&lt;P&gt;Hi Henk,&lt;/P&gt;
&lt;P&gt;a more detailed example would help to better answer the question, I'll try my best with some assumptions:&lt;BR /&gt;A task can have multiple predecessors. In order to add dependencies (the lines in the graph) you can click and hold the (+) icon and drag it onto the task you want to draw the line:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_0-1719922475815.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20917i06120C0496722784/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_0-1719922475815.png" alt="ChristopherHejl_0-1719922475815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this case, task_3 only runs once both task_1 and task_2 are finished.&lt;BR /&gt;Task_3 then has access to both of their results as normal:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_1-1719922521670.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20918i6AB50844793A5B7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_1-1719922521670.png" alt="ChristopherHejl_1-1719922521670.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_2-1719922530977.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20919i08D510807A70DBA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_2-1719922530977.png" alt="ChristopherHejl_2-1719922530977.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If however task_1 and/or task_2 might fail, and you still want to run task_3, then you have to adapt the conditions of task_3 accordingly (eg to any state, the color of the lines will change between red, green and black to indicate the dependency):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_3-1719922616179.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20920iE1E46D25FAD7B4D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_3-1719922616179.png" alt="ChristopherHejl_3-1719922616179.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this case, task_3 might run even though task_2 or task_1 or both failed and don't provide a result. You can use tools like if (&lt;A href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#if-statement" target="_blank"&gt;https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#if-statement&lt;/A&gt;) or default filter (&lt;A href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#filters" target="_blank"&gt;https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#filters&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 12:18:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249680#M1659</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2024-07-02T12:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use ex.result(:xxxxx") with multiple pre-tasks</title>
      <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249694#M1660</link>
      <description>&lt;P&gt;Hi Christopher,&lt;/P&gt;&lt;P&gt;You are doing an excellent job! Sorry my question are sometime a little vague. Above already helps a lot, thanks!&lt;/P&gt;&lt;P&gt;To make above complete, suppose you have control over 1 and 2, so only one gets run and the other is skipped.&lt;/P&gt;&lt;P&gt;II suppose in step 3 you have to "try" to retrieve the return of 1 and 2?&lt;/P&gt;&lt;P&gt;Or am I trying something stupid?&lt;/P&gt;&lt;P&gt;Use case: you have green and a blauw events. You send green to 1 and blauw to 2. Then&amp;nbsp; 3 will finish. 3 needs the result of 1 or 2 to proceed.&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 12:36:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249694#M1660</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-02T12:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use ex.result(:xxxxx") with multiple pre-tasks</title>
      <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249714#M1661</link>
      <description>&lt;P&gt;Correct, then you can check which one was successful. For this, you can use the task expression to get metadata on a task (&lt;A href="https://docs.dynatrace.com/docs/platform-modules/automations/workflows/reference#task" target="_blank"&gt;Expression reference - Dynatrace Docs&lt;/A&gt;).&lt;BR /&gt;Example:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{% if task("task_1").state == "SUCCESS" %}
	Task 1 did run, result: {{ result("task_1") }}
{% else %}
	Task 2, result: {{ result("task_2") }}
{% endif %}&lt;/LI-CODE&gt;
&lt;DIV id="tinyMceEditor_7a89b05859a821ChristopherHejl_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;BR /&gt;
&lt;DIV class="lia-progress-placeholder mceNonEditable"&gt;
&lt;DIV class="lia-media-progress"&gt;&lt;I class="lia-fa lia-media-upload-progress lia-fa-picture-o"&gt;&lt;/I&gt;
&lt;DIV class="lia-progress-bar-stripes lia-progress-bar-animate lia-media-progress-bar"&gt;
&lt;DIV class="lia-progress-bar" style="width: 100%;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;SPAN class="lia-progress-value"&gt;Updating Media&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 13:05:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249714#M1661</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2024-07-02T13:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use ex.result(:xxxxx") with multiple pre-tasks</title>
      <link>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249728#M1663</link>
      <description>&lt;P&gt;Again, perfect!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 13:17:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/How-can-I-use-ex-result-xxxxx-quot-with-multiple-pre-tasks/m-p/249728#M1663</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-02T13:17:50Z</dc:date>
    </item>
  </channel>
</rss>

