Adding local variables to a workflow
Internal service suppliers, internal supplier administrators, and catalog administrators create local variables to map them to an output map of a workflow's activity. By assigning a local variable to an output map, you associate a source expression with a variable that can be easily referenced in a complex workflow without a need to manually configure the same expression again.
Before you begin
If you have not done so already, create a workflow. For more information, see Designing a simple workflow.
You can add local variables to your workflow in one of the following ways:
To create a local variable from the Add/Remove Variables dialog box
- Open a workflow that you want to edit, and click the tab with the pencil icon, and open the Variables section.
- Click Add/Remove Variables.
In the Add/Remove Variables dialog box, click Add Variable, and enter the following values:
objName variable that represents the question data type.
Each variable in the same workflow must have a unique name.
Select Local Variable.
Select one of the following data types:
- Boolean—true or false
- Date—Yyyy-MM-dd format
- Date/Time—Yyyy-MM-dd hh:mm AM/PM format
- Time—Hh:mm AM/PM format
- Decimal—Integer numerical with a decimal point
- Floating—Integer with a floating point
- Integer—Integer numerical (with no decimal)
- Object—Universal type of data
- Text—Text string
- Selection—Selection list value. For this data type, you must create an options list.
Note: You can assign only the variable data type that the input field of the expects. For example, if a connector action expects an integer, you must create a variable of integer data type.
Default value (Optional) Specify the default value for the local variable. Description (Optional) Enter the description for the local variable. It can be useful when you have a complex workflow with several input variables.
- Save the local variable.
The saved variable appears in the list of variables.
To create a local variable from the output map of a selected activity
- Open the workflow that you want to edit, and select the activity to which you want to add a local variable.
- Expand the Output Map section for the selected activity.
- Click Add.
Double-click in the Name field, enter the name of the local variable, and press Enter.
The local variable is saved and is available for selection from the variables list.
You can map dynamically added local variables to the output map of any activity only when both fields are defined for the added local variable: the Name field and the Source expression.
In a workflow, local variables that were dynamically added, are not displayed in the Variables section on the Properties pane.
Where to go from here
When you have created a local variable, you can map it to a source expression of any activity. For information about how to do this, see Configuring an output map for an activity and using it in multiple activities.