Adding process input variables to a workflow
Internal service suppliers, internal supplier administrators, and catalog administrators create process input variables to 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 information about how to create a service questionnaire, 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 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.
It must be unique from other variables in the same workflow.
Select Input/Output Parameter.
Define how your parameter will be used in an activity which 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 the Local variable radio button. For more details about this option, 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 forma
- 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 additionally create options list.
You can assign only the variable data type that the external system expects. For example, if a connector action expects an integer, then you must create a variable of integer data type.
Default value (Optional) Specify the default value for a process variable. Description (Optional) Enter the description for the process input variable. It can be useful if you have a complex workflow with many input variables.
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 this variable 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 a another variable in the workflow: