Configuring runtime environment variables
During development to IBM® Process Designer, 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 to 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 in IBM Process Designer.
Using a REST API call
Call the operations REST API ACTION
https://host:port/ops/std/bpm/containers/container_acronym/versions/version_acronym/env_vars
or ACTION
https://host:port/ops/std/bpm/containers/container_acronym/branches/branch_acronym/env_vars
where container_acronym is the acronym of the process application or toolkit
that contains the targeted snapshot, version_acronym is the acronym of the
targeted snapshot, and branch_acronym is the acronym of the targeted track.
https://hostname.bpm.ibmcloud.com/bpm/environment/ops/std/bpm/containers/container_acronym/versions/version_acronym/env_vars
or
https://hostname.bpm.ibmcloud.com/bpm/environment/ops/std/bpm/containers/container_acronym/branches/branch_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.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.-
- 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:
BPMCSRFToken is
set with every request. For information about how to obtain a token,
see Preventing cross site request forgery.