i
Activity Due Date Calculation
The activity due date is calculated in different ways, depending on whether the maximum duration was modeled from a duration or by selecting a form field related to the process.
The calculation detail is made for the due date but it is also valid for the average date, depending on the modeling of the average duration of the activity.
Due Date Based on a Duration
Elements involved in the calculation:
•Activity start date and time.
•Activity maximum duration.
•Calendar of the participant who executes the activity.
•Configuration of holidays and special dates.
Calendar of the Participant Who Executes the Activity
When the participant is a user:
•The calendar established in the user's profile is considered.
•If not indicated, the calendar established in the user's organizational unit is considered.
•If the unit does not indicate a calendar, it moves up in the hierarchy, searching for a higher unit to establish a calendar.
•If no higher unit indicates a calendar, the standard calendar is considered.
When the activity is executed in an organizational unit:
•The calendar established in the organizational unit is considered.
•If the unit does not indicate a calendar, it moves up in the organizational structure, searching for a higher unit to establish a calendar.
•If no higher unit indicates a calendar, the standard calendar is considered.
When the activity is assigned to a generic role:
•The standard calendar is considered.
•When role players assign themselves an activity, the due date is recalculated considering the calendar of the executing participants.
Steps for Activity Due Date Calculation
Step 1: The maximum duration of the activity is calculated, expressed in seconds.
The number of days, hours, minutes and seconds, indicated in the activity definition, is considered.
The number of hours and minutes of a working day is retrieved from the executing participant's calendar.
The maximum duration of the activity is calculated as:
Maximum Duration in Seconds =
Activity.Days * (Calendar.Hours * 3600 + Calendars.Minutes * 60) +
Activity.Hours * 3600 +
Activity.Minutes * 60 + Activity.Seconds
Step 2: The user's working times are defined, through the executing participant's calendar, together with the definition of general holidays and specific dates.
Each of the work bands is perfectly defined by the calendar, and has a start date and time and an end date and time, therefore, this specification can be converted to a number of work seconds.
The definition of "Holidays" means that certain periods are considered non-working days.
The definition of "Specific Date" allows to establish specific working times for a specific date.
The definition of specific dates that is performed at the calendar level takes precedence over the general specific dates.
Step 3: Express the Start Date and Time of the activity, in the time zone of the executing participant's calendar.
Based on that date, working times are assigned until all the seconds that correspond to the activity duration are assigned.
In this way, the activity due date is calculated, according to the user's working times.
Due Date Based on a Form Field
The due date takes the value of a form field.
If the field data type is Date or Local Date, if the value entered is MM/DD/YYYY, the due date is MM/DD/YYYY at 23:59:59.999
If the field data type is Date and Time, the DD/MM/YYYY HH:MM:SS value is considered as the due date.
If the field type is Local Date and Time, the DD/MM/YYYY HH:MM:SS value is transformed to the standard calendar time zone and is considered as the due date.