Process context is all data created, edited, and saved during the execution of a certain process. The data is stored in variables. The content or value of a variable can be changed during the process execution. For example, each time you run a modeled process, it might have different names of contracts and contractors.
Process variables can be local or obtained from an external system (for example, ELMA BPM). The values of the context variables can be obtained from external systems at the process start. They can also be transferred from ELMA RPA to an external system at the process end.
The list of all context variables is displayed on the process card of the Context tab.
You can add ( ), edit (), or delete () variables at any stage of a process.
When you delete a variable, it is removed from all the activities it is used in. Working with the process might result in errors.
Creating a context variable
To create a new variable, click the button and fill in the required fields.
- Name *. The variable name.
- Variable*. The name of the variable used when working with API, scripts, etc. It is created automatically after filling in the Name* field and cannot be changed. It is displayed in the variables list on the context tab. If you want to change the variable name, delete the variable, and create a new one.
- Description. You can specify the detailed information about the variable and its usage to make it easier to work with the process.
- Scope. All variables have their scope: some may contain initial data for the process start, others may contain the process execution result, and some are intermediate. By restricting the scopes, you can customize the variable visibility for external systems:
- Internal. Variables that can be filled in and used during the process execution but cannot be edited by external systems before running a process. They cannot be passed to external systems after the process ends;
- Input. Variables that can be set before the process execution. The values of the variables can be specified when starting a process from ELMA RPA Designer, when creating a task in the Orchestrator, or can be obtained from external systems. They are indicated by the icon in the variables list. You can set these variables as required. To do that, check the Required box on the form. This scope is used as a default for all created variables;
- Output. Variables passed to external systems after the process ends;
- Input/Output. Variables that can function as Input and Output simultaneously;
All context variables, regardless of their scope, can be used and changed during the process execution.
- String. May receive values containing letters and numbers ("Hello, world!");
- File. A special ELMA RPA system variable describing a path to the file that can be used when running a process;
- Date/Time. Contains a date ("21.09.2020 09:00");
- Yes/No. A logic variable taking the Yes (True) or No (False) values;
- Non-integer. May receive values containing numbers with a fractional part ("123,15");
- Integer. May receive values containing integers ("123").
Depending on the selected type of data, you can perform various operations with a variable. For example, in strings, you can change uppercase letters to lowercase (or vice versa), shorten them, or add endings to them. Numbers can be added or subtracted. In logic variables, you can change the Yes/No values, which is very important for creating the process logic.
You cannot change the type of the variable once it is created. If you want to do that, delete the variable and create a new one.
- Array — allows you to perform the same sequence of actions for different values of the context variable.
For example, you have to send the same email to several different contractors. You can model a process containing the email address of one contractor. If there are 10 different addresses, you have to run 10 different processes. Using an array, you can set the list of email addresses in one variable. For each address, the bot will perform the same action.
If the Array box is checked, the fields for setting array values appear. To add a new value, click the +Add element link. To delete a value, click the Delete link under the field.
- Default value. A context variable value set during the process execution in case the value wasn't set by the user.