I wanted to fetch the environments name (Dev, Test or Prod) where my processes are running. (Depending on that environment, I have to make it as a subject of the email).
For Ex:
“Dev - Process ABC”
“Test - Process ABC”
“Prod - Process ABC”
Note: I don’t want to use API’s, and I am not using config files.
Getting an asset value from orchestrator would be Static value, but when I run the BOT, how will I be able to know which environment my BOT is running (dynamically) if I take the value from asset (which is static in this case)?
Asset is for cross checking the environment. But I need the dynamic environment where my process is running (can be either in Dev, Test or Prod).
I believe you have different orchestrator / Tenant / Folder for each of these environments rite?
If you keep an asset name as “Environment” where the value is different in each of the environment and using the same while sending email should solve the problem rite??
Say suppose, if I keep the asset name as Environment and the value as either Dev or Test Or Prod.
And if I run the BOT in Dev how will my process knows that it is running in Dev or if I run the BOT in Prod, how my process will come to know that it is Prod?
Bot will pick up the asset from the tenant your bot machine connected to. Your PROD bot will be connected to PROD tenant so bot will fetch asset from the tenant which would have value PROD. This way your bot will get to know which environment it is in.
This can also be done via a custom activity. I am not sure if there are any on the Marketplace, I have one I development myself but my access to the marketplace is abit messed up so I cannot upload it.
As far as I know if cannot be converted out of an activity due to it needing the use reflection to gather information about the current robot runner.
Create assets in all the three environments
Environment = Dev
Environment = Test
Environment = Prod
Now in the studio
Use get asset activity
Use if conditon to check if the environment variable contains test or dev or prod and send the email accordingly
Also you can use switch case
Expression : Environment variable
Case “test”
Case “dev”
Case “prod “