Creating Variables in a Process Flow

A variable is declared when the action is executed while running the process flow. Variable is generally used to set the value of any field of an activity used in a process flow, during the execution of the process flow.

You can create variables in a process flow using these methods.

 Process Flow Variable

A variable is declared when the action is executed while running the process flow. Variable is generally used to set the value of any field of an activity used in a process flow, during the execution of the process flow. For example, if you want to specify an algorithm/cipher for file encryption in a Process Flow, you can define a Process Flow variable, encryptionAlgorithm, and set its value to any of the following algorithms/ciphers that you want to use.

    • IDEA
    • TRIPLE_DES
    • CAST5
    • BLOWFISH
    • DES
    • AES_128
    • AES_192
    • AES_256
    • TWOFISH
    • CAMELLIA_128
    • CAMELLIA_192
    • CAMELLIA_256

You can create and use a Process Flow Variable throughout the execution of a process flow.

Steps to create a Process Flow variable

  1. Open Process Designer.
  2. Click  View Process Flow Properties option in toolbar.



  3. Select VARIABLES in the Process Flow Properties Panel.



  4. Enter the name and value of the process flow variable in Key and Value textbox of Global tab. 

    Select Track Toggle button to track all changes made to the Process Flow variable. Click/wiki/spaces/AC41/pages/15993337 to get more details.
  5. Click Add.
  6. Once a new process flow variable is created, it is added to the list in the Process Flow Variables tab.

     

 Activity Variable

Steps to create Variables

  1. Click the activity for which you want create the variables, select View Properties option from context pad to open Activity Properties panel.
  2. Select VARIABLES tab from Activity Properties panel.



  3. Select type of variable Process or Activity for Input. For example, creating a Process variable for Input.
  4. Enter the Name and value of the variable in Name and Value text box. Alternatively, you can select the name from drop-down list. Click Add.
  5. The variable is added.



  6. Follow the same step for creating Process variable for output.

To create Activity variable for Input, select the type of variable as Activity.

  1. Enter the Name and value of the variable in Name and Value text box. Alternatively, you can select the name from drop-down list. Click Add.
  2. The variable is added.
  3. Follow the same step for creating Activity variable for output.

Steps to create Variable from Parent Process Flow to Child Process Flow 

Variable for Child Process Flow is used to set the value of Process Flow Variable or Activity Variable from the parent process flow to the child process flow.

  1. Click the Call Action and select View Properties option from context pad to open Activity Properties panel.
  2. Select VARIABLES tab from Activity Properties panel.
  3. Select the Child PF as a type of variable Process for Input.



  4. Specify the properties of each filed to define the variable.
    1. Activity: Select the Name of activity in the parent process flow, whose 'Activity Variable' value will be used to set the child variable specified by the Child Key. If the name of the activity is not specified, then the 'Process Flow Variable' specified by the Key will be used.
    2. Key: Name of the variable of the parent process flow whose value will be used to set the child process variable specified by the Child Key.
    3. Child Activity Name: Name of the activity in the child process flow, whose variable value will be defined. Child PF uses the Child Name to find out the call or spawn action and the corresponding process flow to set the variable.
    4. Child Key: Name of the Variable of the child process flow whose value will be set.
  5. Click Add.

Variable for Child Process Flow is applicable only for Call and Spawn actions.


Steps to create Variable from Child Process Flow to Parent Process Flow 

Variable for Parent Process Flow is used to set the value of the 'Process Flow Variable' or 'Activity Variable' from the child process flow to the 'Process Flow Variable' or 'Activity Variable' of the parent process flow, which initiated the child process flow by the call/spawn action.

  1. Click the activity for which you want create the variables and select View Properties option from context pad to open Activity Properties panel.
  2. Select VARIABLES tab from Activity Properties panel.
  3. Select the Output tab and provide the details of each field to define the variable.



    1. Activity: Select the name of the activity of the child process flow, whose 'Activity Variable' value specified by the Key will be used to set the parent process flow variable specified by the Parent key. If the name of the activity is not specified, then the 'Process Flow Variable' specified by the Key will be used.
    2. Key: Select the name of the variable of the child process flow whose value will be used to set the parent process variable specified by the Parent Key.
    3. Child Activity Name: Select the name of the activity of the parent process flow whose 'Activity Variable' specified by the Parent Key will be set. If the name of the activity is not specified, then the 'Process Flow Variable' specified by the Parent Key will be set
    4. Child Key: Name of the Context Variable of the parent process flow whose value will be set.
  4. Click Add.