When I deploy a workflow with a webhook trigger for a selected environment, this is not the environment that is necessarily executed when the trigger is called.
Steps to reproduce:
- Create a simple workflow containing a webhook trigger and a webhook return which returns the executed environment as part of its payload, e.g.
{ env: workflowContext.environment }
(see attached screenshot) - Ensure the webhook is enabled and deploy the workflow to an enrivonment
- Call the webhook's URL (e.g. using postman) - the executed environment is returned
- Change the environment for the workflow and redeploy it
- Call the webhook's URL again - the returned executed environment is unchanged - I expected it to be the new deployment environment (i.e. doesn't match what you deployed it as)
I realise you can override which environment is used by setting the environment
query param in the webhook request (e.g. environment=production
) and maybe my expectations are not correct around this feature but it seems like it should be clear(er) what the default environment is for a workflow when this param is not supplied.