Last Modified: 06.09.2021
Example: supervisor is on a vacation
Below is the example of using Select Employee activity. Use it for selecting a supervisor who will approve an element. When the supervisor is on a vacation, the system selects a supervisor, one step higher in seniority and etc. Following this logic the activity reaches the CEO or selects no supervior at all (in case if management is missing altogether), assigns a deputy supervisor.
Sequence of activities
- Create new template, with 2 User variables inside:
- Supervisor, updates during workflow progress;
- Deputy is practically a permanent variable, modified manually when deputy is on leave or vacation. Indicate a default employee that will approve an element in case supervisors are missing.
- First, add a Select Employee activity. In parameters,
, the direct supervisor for the Author with missing employee skipped.
- Add an Edit variable activity. Indicate variable in
, as Supervisor via Select employee (Insert Value] - Additional Results - Select Employee - Selected Employee).
- Add a Condition construction and create 3 branches in it. Condition numbering is the same as the activity's performance sequence: from left to right.
- Define the condition in the first branch for deputy to be assigned instead of selected CEO. Indicate
in the lowest condition and then add an activity Edit Variable. Inside it,
, the Supervisor variable as equal to Deputy.
- Define the condition inside the second branch for the deputy to approve the document in case when the complete management is unavailable. Indicate inside the
, the Supervisor variable as
Due to Select employee activity returning an empty value for selected employee, if none of supervisors was selected (for example, all management is unavailable).
. Now, add the Edit variable activity, configured in the same manner as the previous branch. Next, add notification about completely unavailable management.
- We do not change employees in the last branch, which results in Supervisor
variable remains equal
to the Select Employee activity result.
Finally, the template looks as follows: