Adding process input variables to a workflow
Internal service suppliers, internal supplier administrators, and catalog administrators create process input variables and map them to input parameters of activities used in a workflow. By using process input variables in a workflow, you define information that requires input from a service requester. When an end user requests a service, the information the user enters into the questionnaire is sent to the workflow. For more information about this process, see Capturing process information and passing it into a workflow.
If you create process input variables and map them to the input of activities in a workflow, you must create a service questionnaire.
When you open the Questions Designer to create a service questionnaire, the process input variables are automatically generated and added there as process questions. For more information, see Creating service questionnaires.
To create a process input variable
To pass process input information to your workflow, you must add a process variable of any type, except Service Broker Context. You can add multiple process input variables in your workflow.
- Open the workflow designer, and select the canvas to modify the settings of a process.
- Click Add/Remove Variables.
Click Add Variable, and enter the following values:
objName process variable that represents the question data type.
Each variable in the same workflow must have a unique name.
Select Input/Output Parameter.
Define how your parameter will be used in an activity that is applied to one or more workflows.
To use the variable in the current workflow, enable any of the following options:
- Input—Data input is not mandatory to perform an action.
- Input Required—Data input is required to perform an action.
To use the variable in one or more calling external workflows, enable the following option:
- Output—Data output from an activity is captured, and can be used in other workflows. See Example of using a process output variable in a calling workflow.
Note: You can create a variable that will be used locally in a workflow, and will not be passed to a service questionnaire. To create a local variable, select Local Variable. For more information, see Adding local variables to a workflow,
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)
- Text—Text string
- Selection—Selection list. For this data type, you must create an options list.
Note: You can assign only the variable data type that the external system 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 a process variable. Description (Optional) Enter a description for the process input variable. It can be useful if you have a complex workflow with many input variables.
Variable ID (Optional)
This field is automatically populated with an integer value when the workflow is saved.
- Save the process input variable.
The saved process input variable appears in the list of variables. For examples of creating process input variables, see Designing a simple workflow.
Example of using a process output variable in a calling workflow
The following example shows how you can create an output variable and use it in a calling workflow.
- The Create change request from ITSM workflow uses the Company Information process variable, which is configured as an input variable and an output variable.
The Company information input variable is mapped to the input map of the Create Change Request activity.
- Another workflow is configured to use the Call Activity, which calls the Create change request from ITSM workflow.
The Company information output variable (configured for the first process) is available in the list of the Call Activity variables.
The Company information output variable is used in the input map of another variable in the workflow: