Hi, I am trying to get the execution params to ret...
# ask-the-community
Hi, I am trying to get the execution params to retrieve the URL like so -
for this I am getting an EXECUTIONPARAMS not available in current context error. I also tried current_context().execution.parameters.execution_id.url I get the same error but for EXECUTION. I am doing this in a task and according to the docs ExecutionParams object is available to all tasks. Am I missing something? Is there any other way to get the execution URL in the code? Error verbatim : EXECUTION not available as a parameter in Flyte context - are you in right task-type?
we have been doing it this way
Copy code
ctx = FlyteContext.current_context()
    workflow_execution_id: WorkflowExecutionIdentifier = (
So this will return the execution_id and we construct the URL from it since base url is predefined already
We are planning to have two deployments so there will be 2 urls, we need the full URL so we don't need to worry about the base URL.
i see, yeah we also have multiple deployments, they are just being set during registration with env variables.