You can create multiple context variables in a process flow using the PutContextVar action. Once they are created, you can use these context variables in the context of the process context as and when required.
Steps to create a Context Variable
- In Web Process Designer, click Repository View icon. The Repository View panel is displayed.
- Click Actions and select the Put-Context-Var action.
Drag it to the Canvas area. The Put-Context-Var action is displayed in the Canvas area.
Click Put-Context-Var action and select View Properties from context pad. The properties of the Put-Context-Var action are displayed in the Activity Properties Panel.
Click the VARIABLES option. This screen displays a list of existing context variables and the option to Add the variables.
The Edit Variable and Delete Variable buttons appear if any context variables have been created or existing context variables have been selected.To add a variable, select the name of the activity for which you want create the context variable, from the drop-down list of Activity Name. This drop-down lists all the activities that are currently present on the Canvas area. Once you select the activity, all the attributes of the selected activity, are listed in the Variable Name drop-down list.
If the Activity Name field is left blank, then a new context variable is declared.Select the attribute for which you want to create the context variable, from the drop-down list Variable Name. For example, you can select the File Path field in case of a File Source or File Target activity.
If the Activity Name field is blank, then the current context variables will be listed in the Variable Name drop-down list.Enter the value that you want to set for the attribute/context variable, in the Variable Value field.
Click Done.This adds the context variable and takes the control back to the Edit Context Variables screen, where the new context variable is added to the list of existing context variables.
You can add multiple context variables (up to a maximum of 100) for the process flow.Click Done on the Edit Context Variables screen to add all the displayed context variables to the context of the process flow.
Similarly, you can edit a context variable, by selecting it from the list of existing context variables on the Edit Context Variablesscreen. This selection will enable the Edit Variable button. Clicking this button will display the Context Variable Information screen with the selected context variable details in edit mode. You can make the necessary changes and click Done to save the modified context variable.
You can delete a context variable, by selecting it from the list of existing context variables on the Edit Context Variables screen. You can select multiple context variables to delete, by pressing <CTRL> and the context variables. This selection(s) will enable the Delete Variable button. Clicking this button will delete the selected context variable(s).