<?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: Davis needs time to store events and problems after the workflow has triggered in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251601#M1719</link>
    <description>&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;FYI this is how my WF looks (-; creating the 5 mins delay!&lt;/P&gt;&lt;P&gt;I will retry to skip the two delay scripts and limit the wait in the main part see what happens. (also I will use the Promise ,&amp;nbsp; great reminder)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="henk_stobbe_0-1721904045739.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21386i35D05F393AD04AB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="henk_stobbe_0-1721904045739.png" alt="henk_stobbe_0-1721904045739.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 10:45:54 GMT</pubDate>
    <dc:creator>henk_stobbe</dc:creator>
    <dc:date>2024-07-25T10:45:54Z</dc:date>
    <item>
      <title>Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/250799#M1699</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when a Event or problem workflow is triggered, I you try to do a dql query to retrieve the attached&amp;nbsp; problem or events resp. It seems these are not yet available.&lt;/P&gt;&lt;P&gt;After sometime when you run the workflow again retrieving the events attached to a problem and retrieving the problem attached to an event gives no issue;s.&lt;/P&gt;&lt;P&gt;Who knows the wait time before Davis has added these records to a bucket, after a trigger?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 16:45:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/250799#M1699</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-16T16:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251592#M1717</link>
      <description>&lt;P&gt;It should only take 10 seconds from Workflow being triggered by an Event (this is done internally), to the Event appearing in Grail.&lt;/P&gt;&lt;P&gt;I would recommend adding a Run JavaScript step with&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export default async function ({ execution_id }) {
  console.log('Starting to sleep');
  const milliseconds = 15000; // sleep time
  await new Promise(resolve =&amp;gt; setTimeout(resolve, milliseconds));
  console.log('Done sleeping');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;before the actual DQL statement.&lt;/P&gt;&lt;P&gt;In addition, a built-in "delay" feature for Workflows is planned.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 10:32:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251592#M1717</guid>
      <dc:creator>christian_kreuz</dc:creator>
      <dc:date>2024-07-25T10:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251601#M1719</link>
      <description>&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;FYI this is how my WF looks (-; creating the 5 mins delay!&lt;/P&gt;&lt;P&gt;I will retry to skip the two delay scripts and limit the wait in the main part see what happens. (also I will use the Promise ,&amp;nbsp; great reminder)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="henk_stobbe_0-1721904045739.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21386i35D05F393AD04AB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="henk_stobbe_0-1721904045739.png" alt="henk_stobbe_0-1721904045739.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 10:45:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251601#M1719</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-25T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251606#M1721</link>
      <description>&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;Very small remark/question: I assume all workflow task are separated, I mean the next step will only start if the previous is finished?&amp;nbsp;&lt;/P&gt;&lt;P&gt;KR Henk&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:10:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251606#M1721</guid>
      <dc:creator>henk_stobbe</dc:creator>
      <dc:date>2024-07-25T11:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251609#M1723</link>
      <description>&lt;P&gt;Looking at your screenshot, those tasks should be running in sequence, not parallel.&lt;/P&gt;&lt;P&gt;However, within a single JavaScript task, some things can run parallel, for instance:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;export default async function ({ execution_id }) {
  console.log('Starting...');
  setTimeout(() =&amp;gt; { console.log('First'); }, 1000);
  setTimeout(() =&amp;gt; { console.log('Second'); }, 500);
  console.log('Done!');
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code sample will lead to an unexpected output of&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Starting...
Done!
Second
First&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you need to use await and a promise to make it right here:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;export default async function ({ execution_id }) {
  console.log('Starting...');
  await new Promise(resolve =&amp;gt; setTimeout(() =&amp;gt; { console.log('First'); resolve(); }, 1000));
  await new Promise(resolve =&amp;gt; setTimeout(() =&amp;gt; { console.log('Second'); resolve(); }, 500));
  
  console.log('Done!');
}&lt;/LI-CODE&gt;&lt;P&gt;and you will get the expected output of Starting..., First, Second and Done.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:26:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251609#M1723</guid>
      <dc:creator>christian_kreuz</dc:creator>
      <dc:date>2024-07-25T11:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Davis needs time to store events and problems after the workflow has triggered</title>
      <link>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251611#M1724</link>
      <description>&lt;P&gt;FYI: we just added another task option to make a task wait a user defined time before executing..This will become available in the upcoming weeks and should make this a lot easier.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:29:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Davis-needs-time-to-store-events-and-problems-after-the-workflow/m-p/251611#M1724</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2024-07-25T11:29:07Z</dc:date>
    </item>
  </channel>
</rss>

