cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow - reading appState.

veranika_k
Helper

Hi! 

Is it possible to read and write an AppState from the workflow level? As for now, I am receiving an error (code 541). 

Thank you!

3 REPLIES 3

michal_zawislak
Dynatrace Advisor
Dynatrace Advisor

Hi @veranika_k!

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).

To make it work, you would need an app function. Also, you can find more details about the State SDK client in the documentation.

Please let me know if I can help you further.

Your AutomationEngine ally!

Hi @michal_zawislak 

Great response @michal_zawislak  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.

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.

Best,
Sini

 

Hi @sinisa_zubic,

Thank you for the clarification! You're right, and I misread the documentation. It clearly states that app states can be used only in the (custom) apps.

Your AutomationEngine ally!

Featured Posts