readEnvironmentVariables Step

Use this step to fetch an environment variable from the application server.

Last published at: June 7th, 2024

Description:

Fetch an environment variable from the application server.

 

Inputs

  • name – provide a step name
  • envvarmappings – environmental variable mappings 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

Example:

Let’s build and execute the readEnvironmentVariablesDef example.          

  • Create a new definition called “readEnvironmentVariablesDef”
  • Select the definition and click the “design” button
  • Drag a “readEnvironmentVariables” from the toolbox
  • Connect the dots between the start and “readEnvironmentVariables” step
  • Define a variable/global to store the result after execution
  • Click the "readEnvironmentVariables" step to configure its "Settings" properties. Provide a name to the step. Click on the button to configure environmental variable mappings. 

 

  • Provide the environmental variable name to fetch from the application server and the variable/global to store the result. Click on the Add Row button to include more. Click on Save to confirm the action.

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute. Render the process instance. Click on the “readEnvironmentVariables” process step to view the properties. The step should get the environment variable value defined in the Windows system (previously set by the “setEnvironmentVariables” process step).

 

Create or modify environment variables on Windows 10:

  • On the Windows taskbar, right-click the Windows icon and select System.
  • In the Settings window, under Related Settings, click Advanced system settings.

 

  • On the Advanced tab, click Environment Variables to view the list of variables and their values in the list.