Configuring runtime environment variables
During development, process authors can set environment variables for each process
application. In some cases, the correct value for a particular environment (test or production)
might not be known during process design. In those cases, you need to provide the value after
installing the process application in the new environment.
You can use the Process Admin Console or REST API calls to manage environment variables.
Using the Process Admin Console
- Log in to the Process Admin Console, and then click Installed Apps to show the list of current snapshots on the server.
- Click the snapshot that you want to work with.
- From the menu bar, click Environment Vars.
- For the variables listed, provide a value or ensure that the value shown is accurate for the current server. If no variables are listed, no variables were established during process development.
Using a REST API call
Remember: In cloud environments, the operations REST APIs have the
URL
https://hostname.automationcloud.com/environment/ops/std/dba/containers/container_acronym/versions/version_acronym/env_vars,
where environment has the value dev for the development system,
test for the test system, or run for the production (runtime)
system.Important: For details about the operations REST APIs and to try invoking them from a
browser, use the Swagger interface. The Swagger interface is available at
https://server:port/ops/explorer where
server is the host name of your workflow server and port is
the port number that is used by workflow server, for example,
https://localhost:9443/ops/explorer.The following examples illustrate how to use the REST API to manage environment variables.
-
- Retrieve a list of environment variables for snapshot S1 of process application
APP1:
GET http://host:port/ops/std/bpm/containers/APP1/versions/S1/env_vars - For process application APP1, snapshot S1, set the environment variable DEBUG to the value of
true
:POST http://host:port/ops/std/bpm/containers/APP1/versions/S1/env_vars{ "pairs": [ { "name": "DEBUG", "value": "true" } ] } - Copy the environment variable from snapshot S1 to snapshot S2 of process application
APP1:
POST http://host:port/ops/std/bpm/containers/APP1/versions/S1/env_vars/sync?target_version=S2 - For the tip snapshot of track T1 of process application APP1, set the environment variable TRACE
to the value of
true
:POST http://host:port/ops/std/bpm/containers/APP1/branches/T1/env_vars{ "pairs": [ { "name": "TRACE", "value": "true" } ] }
- Retrieve a list of environment variables for snapshot S1 of process application
APP1:
Important: All calls to the Operations REST API require that the HTTP header
.
BPMCSRFToken is set with every request. For information about how to obtain a
token, see Preventing cross site request
forgery
.