<?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 Get results from pervious workflow in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Get-results-from-pervious-workflow/m-p/218752#M69</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P data-unlink="true"&gt;In Workflow, there are three types of Execution:&amp;nbsp;&lt;SPAN&gt;Execute DQL Query,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;HTTP Request,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Run Javascript. If I use&amp;nbsp;&lt;SPAN&gt;HTTP Request for task1 and have the response. How can I get this response result to use in next tasks, if next task uses Javascript? I tried with the ref&lt;A href="https://www.dynatrace.com/support/help/platform-modules/cloud-automation/workflows/reference" target="_self"&gt;&amp;nbsp;Expression reference | Dynatrace Docs&lt;/A&gt;&amp;nbsp;but still get error&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13100iF94C550E9D392864/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="capture.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2023 16:17:21 GMT</pubDate>
    <dc:creator>Jingyi</dc:creator>
    <dc:date>2023-07-21T16:17:21Z</dc:date>
    <item>
      <title>Get results from pervious workflow</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-results-from-pervious-workflow/m-p/218752#M69</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P data-unlink="true"&gt;In Workflow, there are three types of Execution:&amp;nbsp;&lt;SPAN&gt;Execute DQL Query,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;HTTP Request,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Run Javascript. If I use&amp;nbsp;&lt;SPAN&gt;HTTP Request for task1 and have the response. How can I get this response result to use in next tasks, if next task uses Javascript? I tried with the ref&lt;A href="https://www.dynatrace.com/support/help/platform-modules/cloud-automation/workflows/reference" target="_self"&gt;&amp;nbsp;Expression reference | Dynatrace Docs&lt;/A&gt;&amp;nbsp;but still get error&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/13100iF94C550E9D392864/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="capture.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 16:17:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-results-from-pervious-workflow/m-p/218752#M69</guid>
      <dc:creator>Jingyi</dc:creator>
      <dc:date>2023-07-21T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get results from pervious workflow</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-results-from-pervious-workflow/m-p/219307#M70</link>
      <description>&lt;P&gt;res will need to be declared here. For example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;const res = ex.result('http_request_1')
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, keep in mind that in javascript, the result function is called via the current execution. While you may use the template string {{ result() }} from within an HTTP request for instance, you are importing the execution and result modules, which would require you to write the declaration as such:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;export default async function({execution_id}) {
  const ex = await execution(execution_id); 
  const res = await ex.result('http_request_1');
  console.log(res);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 13:30:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-results-from-pervious-workflow/m-p/219307#M70</guid>
      <dc:creator>samuelbernardy</dc:creator>
      <dc:date>2023-07-31T13:30:47Z</dc:date>
    </item>
  </channel>
</rss>

