<?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: Workflow - reading appState. in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/224753#M534</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67240"&gt;@veranika_k&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;From the error you're getting, I suspect that you're utilizing the "Run Javascript" action to read/write AppState. Unfortunately, it won't work, as the State API requires app context (its ID, to be precise) to work, whereas "Run Javascript" is an ad-hoc action with no app context (ID).&lt;/P&gt;&lt;P&gt;To make it work, you would need an &lt;A href="https://developer.dynatrace.com/develop/functions/" target="_blank" rel="noopener"&gt;app function&lt;/A&gt;. Also, you can find more details about the State SDK client in the &lt;A href="https://developer.dynatrace.com/reference/sdks/client-state/" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Please let me know if I can help you further.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 13:50:50 GMT</pubDate>
    <dc:creator>michal_zawislak</dc:creator>
    <dc:date>2023-10-06T13:50:50Z</dc:date>
    <item>
      <title>Workflow - reading appState.</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/224746#M533</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is it possible to read and write an AppState from the workflow level? As for now, I am receiving an error (code 541).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 13:03:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/224746#M533</guid>
      <dc:creator>veranika_k</dc:creator>
      <dc:date>2023-10-06T13:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow - reading appState.</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/224753#M534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67240"&gt;@veranika_k&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;From the error you're getting, I suspect that you're utilizing the "Run Javascript" action to read/write AppState. Unfortunately, it won't work, as the State API requires app context (its ID, to be precise) to work, whereas "Run Javascript" is an ad-hoc action with no app context (ID).&lt;/P&gt;&lt;P&gt;To make it work, you would need an &lt;A href="https://developer.dynatrace.com/develop/functions/" target="_blank" rel="noopener"&gt;app function&lt;/A&gt;. Also, you can find more details about the State SDK client in the &lt;A href="https://developer.dynatrace.com/reference/sdks/client-state/" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Please let me know if I can help you further.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 13:50:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/224753#M534</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-10-06T13:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow - reading appState.</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/225116#M548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/57046"&gt;@michal_zawislak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Great response&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/57046"&gt;@michal_zawislak&lt;/a&gt;&amp;nbsp;&amp;nbsp;although to clarify the latter part of your answer. I just experimented with it in an app, and it seems that app states can be directly called from an app - so it’s not required to call app states from a function.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;So using, and accessing app state as part of workflows or notebooks doesn’t work as you mentioned already; it is missing the app context. Accessing app state only makes sense within (custom) apps.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sini&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 16:04:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/225116#M548</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-10-11T16:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow - reading appState.</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/225161#M552</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/38283"&gt;@sinisa_zubic&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the clarification! You're right, and I misread the documentation. It &lt;A href="https://developer.dynatrace.com/platform-services/services/state/#general-information" target="_blank" rel="noopener"&gt;clearly states&lt;/A&gt; that app states can be used only in the (custom) apps.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 06:27:35 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Workflow-reading-appState/m-p/225161#M552</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-10-12T06:27:35Z</dc:date>
    </item>
  </channel>
</rss>

