setEnvironmentVariables Step

Use this step to create and initialize environment variable on the application server.

Last published at: July 27th, 2024

Description:

Create and initialize environment variables on 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 setEnvironmentVariablesDef example.          

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

 

  • Provide the name to create an environmental variable on the application server. Provide the value for the variable. 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.

 

  • 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 name of the environmental variable 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 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 and the new variable the step has added will be shown on the list.