I would like to modify a workflow so that based on say an environment variable (e.g. SendEmails = "true") notification emails get sent to the destination users only in the production environment. In the dev/test environments (e.g. SendEmails = "false") I want to send the emails to the process originator instead.
What I'm trying to avoid is having to modify the workflow each time when deploying to dev/test vs production environments.
Currently my task notification emails are being sent using a seperate email event just prior to the client event, rather than by using the "Notify participants when they receive a work item" option on the client event.
Has anyone come up with an elegant solution for this? I suppose I could use an expression on the To: field for the email event, but that would be a bit complicated I think.