Applies to version: 2021.1.x and above; author: Józef Cyran
The article presents two workflows, the first is used to plan absence by an employee, and the second to register absence requests (using wizard). A special workflow for creating absence plans allows the employee to plan the absence (e.g. at the beginning of the year), which will then appear on the Gantt chart.
The second way is to use the absence workflow generated by the absence process wizard - in this case, the selected absence plans (e.g. not approved by the supervisor or vacation leave) will be displayed on the Gantt chart.
Fig. 1. Workflow instance for registering absence plans
The workflow should contain similar form fields to the one created using the wizard (absence type, name of the supervisor/employee). Instead of the data type form field (From/To), create an item list – it allows the employee to plan absence e.g. for the whole year.
It’s a good idea to add a calculated column (text type) that will automatically display the number of working days that the plan contains. Below is the configuration of this column:
Fig. 2. Configuration of the calculated column
Next, go to the data source configuration – in the “Template” field, select the Vacation plans option.
Fig. 3. Data source configuration – the first way
For the template to be validated correctly, this source must contain the following columns:
The SQL query contains data from the WFElements table (such as employee's id) connected by JOIN with the WFElementDetails table with values from item lists. The DET_WFCONID constraint allows you to select the appropriate item list, and the WFD_DTYPEID constraint restricts the selection to Absence plan elements.
Note - vacation plans should return rows for all vacation plans, not only for a specific employee (displaying appropriate plans for employees is configured in the schedule configuration).
The last step is to select the created data source in the Template configuration tab of the process.
Fig. 4. Template configuration tab – the first way
The registered plan will appear on the Gantt chart:
Fig. 5. Presentation of the registered absence plans on the Gantt chart
The second way is to use the absence workflow generated by the absence process wizard - in this case, the selected absence plans (e.g. not approved by the supervisor or vacation leave) will be displayed on the Gantt chart.
Fig. 6. The instance workflow used to register absence plans
For the plans to be displayed correctly, configure the data source. As before, select the Vacation plans option but its configuration is slightly different.
Fig. 7. Data source configuration – the second way
In the presented configuration, the form type has been narrowed down to Absence request, the current step to the Approving step, and the absence type to the 'Vacation' type. As a result, absences that are registered in emergencies (e.g. sick leave) are not included as vacation plans. In this case, the date form fields (From/To) were used instead of the item list.
In the Template configuration tab, select the created data source:
Fig. 8. Template configuration tab – the second way
The created absences plan will appear as a two-color bar, where the top color indicates the type of absence, and the bottom color indicates that it is still scheduled.
Fig. 9. The Gantt chart