You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ti...@apache.org on 2025/03/06 17:22:54 UTC

(incubator-kie-tools) branch main updated: NO-ISSUE: Update properties on `process-business-calendar` example (#2963)

This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new f53838bf368 NO-ISSUE: Update properties on `process-business-calendar` example (#2963)
f53838bf368 is described below

commit f53838bf368010dad9664f2c4edb5e6c4712f9e3
Author: Abhiram Gundala <16...@users.noreply.github.com>
AuthorDate: Thu Mar 6 12:22:49 2025 -0500

    NO-ISSUE: Update properties on `process-business-calendar` example (#2963)
---
 examples/process-business-calendar/README.md           | 18 ++++++++----------
 .../src/main/resources/calendar.properties             |  2 --
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/examples/process-business-calendar/README.md b/examples/process-business-calendar/README.md
index e6dbcb9706a..8b3fd093f4f 100644
--- a/examples/process-business-calendar/README.md
+++ b/examples/process-business-calendar/README.md
@@ -157,11 +157,7 @@ curl -X GET http://localhost:8080/BusinessCalendarCreditBill/{id} \
 
 **Default Behavior**: If you do not input custom values in a calendar.properties file, the system will use the following default settings:
 
-- **business.days.per.week** defaults to 5, meaning only Monday to Friday are considered working days.
-
-- **business.hours.per.day** defaults to 8, representing an 8-hour workday.
-
-- **business.start.hour** defaults to 9, and business.end.hour defaults to 17 (i.e.,9 AM to 5 PM workday).
+- **business.start.hour** defaults to 9, and **business.end.hour** defaults to 17 (i.e.,9 AM to 5 PM workday).
 
 - **business.weekend.days** defaults to Saturday and Sunday (Sunday-1, Monday-2, Tuesday-3, Wednesday-4, Thursday-5, Friday-6, Saturday-7).
 
@@ -169,7 +165,13 @@ curl -X GET http://localhost:8080/BusinessCalendarCreditBill/{id} \
 
 - **business.holidays** by default will be considered empty, meaning no predefined holidays unless specified, if specified, it should be in the format defined by business.holiday.date.format, Holidays can be specified as individual dates (e.g., 2024-12-25,2024-12-31) or as a range of dates (e.g., 2024-11-12:2024-11-14).
 
-- **business.cal.timezone** defaults to the system’s default timezone, if configured, valid time-zone as per Valid timezone as per https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html should be specfied.
+- **business.cal.timezone** defaults to the system’s default timezone, if configured, valid time-zone as per Valid timezone as per https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html should be specified.
+
+**Calculated Properties (Do not include in `calendar.properties` file)**:
+
+- **business.days.per.week**: calculated value, 7 - business.weekend.days.
+
+- **business.hours.per.day** : Calculated value, business.end.hour - business.start.hour.
 
 **Behavior**:
 
@@ -187,8 +189,6 @@ To override default values, configure calendar.properties file based on requirem
 | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
 | `business.start.hour`          | 0-23                                                                                                                   | Start hour of the workday                                                                                                                                                                      |
 | `business.end.hour`            | 0-23                                                                                                                   | End hour of the workday                                                                                                                                                                        |
-| `business.hours.per.day`       | 1-24                                                                                                                   | Total working hours in a day                                                                                                                                                                   |
-| `business.days.per.week`       | 1-7                                                                                                                    | Total working days per week                                                                                                                                                                    |
 | `business.weekend.days`        | 0-7                                                                                                                    | Days considered as weekends (e.g., 1 = Sunday, 7 = Saturday). In case you want to consider all the days as working days i.e., no weekend days, input 0 as value considering working days as 7. |
 | `business.holiday.date.format` | (yyyy-MM-dd)                                                                                                           | List of holidays                                                                                                                                                                               |
 | `business.holidays`            | Dates aligned with business.holiday.date.format                                                                        | Date format for holidays                                                                                                                                                                       |
@@ -198,11 +198,9 @@ To override default values, configure calendar.properties file based on requirem
 
 ```Properties
 business.end.hour=23
-business.hours.per.day=24
 business.start.hour=0
 business.holiday.date.format=yyyy-MM-dd
 business.holidays=2024-10-30
-business.days.per.week=5
 business.weekend.days=6,7
 business.cal.timezone=America/Toronto
 ```
diff --git a/examples/process-business-calendar/src/main/resources/calendar.properties b/examples/process-business-calendar/src/main/resources/calendar.properties
index eddf031d2ce..286d8c5907c 100644
--- a/examples/process-business-calendar/src/main/resources/calendar.properties
+++ b/examples/process-business-calendar/src/main/resources/calendar.properties
@@ -16,10 +16,8 @@
 # under the License.
 
 business.end.hour=23
-business.hours.per.day=24
 business.start.hour=0
 business.holiday.date.format=yyyy-MM-dd
 business.holidays=2024-11-07
-business.days.per.week=6
 business.weekend.days=1
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org