<?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 Are BizEvents triggering workflows too early, before the BizEvent is persisted? in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260920#M1848</link>
    <description>&lt;P&gt;I made an interesting observation today, which seems like a race condition when triggering an SRG from a workflow.&lt;/P&gt;&lt;P&gt;I have this situation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A workflow is triggered upon a bizevent. The bizevent contains some information in a JSON payload&lt;/LI&gt;&lt;LI&gt;the workflow then triggers a SRG, with objectives that query the exact same bizevent to perform analysis on the payload.&lt;/LI&gt;&lt;LI&gt;I have noticed that &lt;EM&gt;sometimes&lt;/EM&gt;&amp;nbsp;when the SRG executes the query for the bizevent the data seems to be not there yet? e.g. the DQL in the obejctive would get the last Bizevent of that type. Querying that bizevent in the objective with:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| sort timestamp desc
| limit 1​&lt;/LI-CODE&gt;&lt;P&gt;should give us the exact last injected BizEvent. But it sometimes isn't...it's the previous one.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested this by adding a time delay on the workflow, to have it wait 30s between the trigger and the SRG execution. Then this works.&lt;BR /&gt;So could it really be that the WF triggers are executed directly upon ingest before the bizevent is actually persisted so it can be queried by DQL?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 11:36:58 GMT</pubDate>
    <dc:creator>r_weber</dc:creator>
    <dc:date>2024-10-29T11:36:58Z</dc:date>
    <item>
      <title>Are BizEvents triggering workflows too early, before the BizEvent is persisted?</title>
      <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260920#M1848</link>
      <description>&lt;P&gt;I made an interesting observation today, which seems like a race condition when triggering an SRG from a workflow.&lt;/P&gt;&lt;P&gt;I have this situation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A workflow is triggered upon a bizevent. The bizevent contains some information in a JSON payload&lt;/LI&gt;&lt;LI&gt;the workflow then triggers a SRG, with objectives that query the exact same bizevent to perform analysis on the payload.&lt;/LI&gt;&lt;LI&gt;I have noticed that &lt;EM&gt;sometimes&lt;/EM&gt;&amp;nbsp;when the SRG executes the query for the bizevent the data seems to be not there yet? e.g. the DQL in the obejctive would get the last Bizevent of that type. Querying that bizevent in the objective with:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| sort timestamp desc
| limit 1​&lt;/LI-CODE&gt;&lt;P&gt;should give us the exact last injected BizEvent. But it sometimes isn't...it's the previous one.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested this by adding a time delay on the workflow, to have it wait 30s between the trigger and the SRG execution. Then this works.&lt;BR /&gt;So could it really be that the WF triggers are executed directly upon ingest before the bizevent is actually persisted so it can be queried by DQL?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 11:36:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260920#M1848</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2024-10-29T11:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Are BizEvents triggering workflows too early, before the BizEvent is persisted?</title>
      <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260937#M1849</link>
      <description>&lt;P&gt;Do you mean the workflow is fired before the Bizevent is available in the Bizevents table?&lt;BR /&gt;Did you confirm the event firing the Workflow was present after some time?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 12:32:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260937#M1849</guid>
      <dc:creator>PacoPorro</dc:creator>
      <dc:date>2024-10-29T12:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Are BizEvents triggering workflows too early, before the BizEvent is persisted?</title>
      <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260963#M1851</link>
      <description>&lt;P&gt;You are correct. The workflow is triggered as soon as the event is coming in, but Grail might take 10-15 seconds until the new data point is stored and is returned by queries.&lt;BR /&gt;We are looking into delaying event triggers internally to get around this, but not confirmed yet.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 13:57:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260963#M1851</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2024-10-29T13:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Are BizEvents triggering workflows too early, before the BizEvent is persisted?</title>
      <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260977#M1852</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40713"&gt;@PacoPorro&lt;/a&gt;&amp;nbsp;yes that is correct and confirmed by&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/44096"&gt;@ChristopherHejl&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;This is important to know, because with this behavior it means that a new BizEvent can trigger a workflow which then works on old data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Simple workaround: you need to add a delay on the srg execution task.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:34:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260977#M1852</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2024-10-29T14:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Are BizEvents triggering workflows too early, before the BizEvent is persisted?</title>
      <link>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260978#M1853</link>
      <description>&lt;P&gt;Thanks for confirming this!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:34:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Are-BizEvents-triggering-workflows-too-early-before-the-BizEvent/m-p/260978#M1853</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2024-10-29T14:34:52Z</dc:date>
    </item>
  </channel>
</rss>

