11 Dec 2023 03:15 PM
Hi
I am currently developing a workflow that is eventually sending a message to an external Chat Systems with a link back to the Dynatrace Environment that executes the workflow.
I would like that workflow to not have a hard-coded Dynatrace Tenant URL included so that I can more easily share that workflow. My question now: Is there anything in JavaScript that allows me to retrieve the current Tenant URL? And in particular for workflows - is there any global context variable that I can use in most of our Workflow tasks, e.g: Http Request as a jinja expression, e.g: {{ .currentTenant.url }}?
Thanks
Solved! Go to Solution.
11 Dec 2023 03:44 PM - edited 11 Dec 2023 03:45 PM
Hi Andreas,
To get an environment URL in the JavaScript action, you can use globalThis.environmentUrl. Please see the related question. Please beware that this is available only in the JavaScript action, and currently, we don't have any alternatives for other actions.
I'll take your suggestion and discuss it with the team.
11 Dec 2023 05:28 PM
Thanks! That helps a lot already. Would be great if this could also be provided as Workflow Context Values so that every action can also use this easily through e.g: jinja expressions