Create process variables

Create a process variable on the Variables tab of the process modeling bar

  1. Open the process map in which to create a process variable.
  2. On the process modeling bar, click Variables and click New.

    The New variable dialog box is displayed.

  3. Enter a unique Name for the variable, such as CustomerName.
    By default, the variable name is displayed as the ID of the variable; however, you can change the ID if needed.

    For the naming convention of name and ID, see Name conventions.

  4. On the Type list, select the type of variable, such as Byte (Default: String).

    • The Label text option is available only for the following variables: String, Nullable string, Bool, Byte, Decimal, Double, Float, JSON expression, Long, Date, Nullable date, and Short.

    • The specified label text name is used when you generate a Take activity form or a Create new job form. For example, when you open the form, Customer name information is displayed.

    • At runtime, the name specified in the label text is displayed in the input and output variables.

  5. Optional. To use the variable for process initialization, select Initialization.

    This option is not available for a business rule and complex variable.

  6. Select, enter, or configure a Value for the variable.

    • To provide a dynamic value, at runtime, leave the Value empty.

    • In some nodes such as Email, C#, VBNET, and Decision, plain text is being replaced by variable with the same name. For example, if you have a variable called ID and if you type the text VOID, the plain text will be replaced by VO[ID]. This only happens at design time; at runtime the values validate and appear correctly.

  7. You can configure the display properties for a Bool, Data object, Date, Decimal, String, Nullable string, Byte, Double, Float, JSON expression, Long, Date, and Nullable date type variables.
    1. Label text: By default, the variable name is displayed as the label text. You can change the label text if you wish to display a longer piece of text than the variable name.
    2. The following table describes the additional display properties as applicable.

    Type Display properties
    Byte
    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: 0); (Default Maximum value: 255).

    Data object

    Value: Set the values either by selecting the required server data model or local data model.

    Label text option is not available for the Data object.

    Date

    • Show time: If selected, displays the time element at runtime.

    • Min date and Max date: Set the minimum and maximum date values either by selecting the required date and time using the Calendar picker or by clicking fx and using the @Today macro to get the current date or past/future date. For example, to set the date as 5 days from the current date, set the value as @Today+5.

    Decimal

    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: -900719925474); (Default Maximum value: 900719925474).

    • Decimal precision: Enter a value for decimal precision. (Default:2)

    Double
    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -900719925474); (Default maximum value: 900719925474).

    • Decimal precision: Enter a value for decimal precision. (Default:2)

    Float
    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -900719925474); (Default maximum value: 900719925474).

    • Decimal precision: Enter a value for decimal precision. (Default:2)

    Long
    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -2147483647); (Default maximum value: 2147483647).

    Nullable Date
    • Show time: If selected, displays the time element at runtime.

    • Min date and Max date: Set the minimum and maximum date values either by selecting the required date and time using the Calendar picker or by clicking fx and using the @Today macro to get the current date or past/future date. For example, to set the date as 5 days from the current date, set the value as @Today+5

    Short
    • Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: -32768); (Default Maximum value: 32767).

    String and Nullable string

    • Input type: Select one of the following controls as needed.

      Single line

      If selected, adds a text box for the single-line fields, such as name.

      Multi line

      If selected, adds a text box that may go beyond one line, such as the customer address.

      Drop down

      If selected, adds a drop-down list based on the selected Data source. Available data source options are:

      Lookup

      Select an existing lookup.

      Custom

      To enter custom data, do the following:

      1. Click .

      2. Add a Name.

      3. Click Add and close.

        To quickly add as many values as needed without navigating away, click Add another.

      4. To make it a default value, select Default.

      Add more items as needed.

      Email

      If selected, adds a text box to an Email field type.

    • Max number of characters: Provide the maximum number of characters allowed to enter in the input type selected above. (Default: 10,000)

    • Mandatory: Select this option to make the input type mandatory.

  8. Do either of the following:
    • To add one variable at a time, click Add and close.

      The New variable dialog box is closed, and the variable is listed on the Variables page.

    • To quickly add as many variables as needed without navigating away from the New variable dialog box, click Add another.

      The current variable is added and the New variable dialog box remains open with a clear screen to add another variable. All the variables are listed on the Variables page.

  9. Similarly, create other process variables.
    By default, all the variables are sorted on Name and displayed in ascending order. However, you can sort (ascending or descending) on the following columns: Name, ID, Type, Value, and Initialization.
  10. To view the variables of a specific type, on the Type filter, select the variable type, such as String. (Default: All)
    The variables of the selected type are displayed.
    The Type filter only contains the variable types that exist in the list for the current process.
  11. To change the initialization order for process initialization variables, perform the following steps:
    1. Click Initialization order.

      The Initialization variables dialog box is displayed.

    2. Select the variable and use or to change the order.
    3. Click OK to return to the Variables page.
  12. Save the process.

Create a process variable while configuring process properties

You can create a new variable directly from the process properties panel while configuring process properties, such as Time and cost, Predictive model, and Default settings. The variable automatically gets assigned to the property for which it is created.

For example, to create a new date variable while configuring the Time and cost property, do the following:

  1. On the properties panel of a process, click Time and cost.
  2. Select By a date for Duration/Expected finish time.
  3. Click
    The New variable dialog box is displayed.
  4. Configure the variable as needed.
  5. Click Add and close. To quickly add as many variables as needed without navigating away, click Add another.

    The newly created variable is automatically assigned to the Duration/Expected finish time property.

Create a process variable while configuring activities

You can create a new variable directly from the configuration window of activities such as .Net, Web service, and Data access, and when configuring the metadata for nodes such as "SharePoint add item. "

For example, to create a new variable for the .Net activity, do the following:

  1. On the Configuration tab of the .Net activity, click Configure for parameters.
  2. Click the down arrow for Value.
  3. Click
    The New variable dialog box is displayed.
  4. Configure the variable as needed.
  5. Click Add and close. To quickly add as many variables as needed without navigating away, click Add another.

    The newly created variable is automatically assigned to the value field of the .Net activity.

Create a process variable while configuring activity properties

You can create a new variable directly from the properties panel of activities while configuring activity properties such as input and output variables, resource assignment, and time and cost.

For example, to create a new variable while configuring resources for an activity, do the following:

  1. On the properties panel of an activity, click Resource assignment.
  2. Click Add for Resources.
  3. On the Add resources dialog box, select Process variable.
  4. Click
    The New variable dialog box is displayed.
  5. Configure the variable as needed.
  6. Click Add and close.

    The newly created variable is automatically assigned to the Resource assignment property.