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

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


The following commit(s) were added to refs/heads/main by this push:
     new 21fd4539c [incubator-kie-issues#1596] Adding Business Calendar Example 
(#2036)
21fd4539c is described below

commit 21fd4539cb78620543f67f7b7f990d8060320a4b
Author: Abhiram Gundala <[email protected]>
AuthorDate: Thu Nov 14 13:34:45 2024 -0500

    [incubator-kie-issues#1596] Adding Business Calendar Example (#2036)
    
    * business-calendar-example
    
    * business-calendar-example
    
    * business-calendar-example
    
    * business-calendar-example
    
    * business-calendar-example
    
    * business-calendar-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
    
    * incubator-kie-issues-1596-bc-example
---
 kogito-quarkus-examples/pom.xml                    |   1 +
 .../process-business-calendar-example/README.md    | 286 ++++++++++++++++
 .../docs/images/CancelPaymentAssign.png            | Bin 0 -> 38041 bytes
 .../docs/images/CancelPaymentTop.png               | Bin 0 -> 70960 bytes
 .../docs/images/CreditCardModel.png                | Bin 0 -> 66662 bytes
 .../docs/images/Get1.png                           | Bin 0 -> 647 bytes
 .../docs/images/Get2.png                           | Bin 0 -> 22627 bytes
 .../docs/images/Get3.png                           | Bin 0 -> 21583 bytes
 .../docs/images/Post1.png                          | Bin 0 -> 21129 bytes
 .../docs/images/Post2.png                          | Bin 0 -> 21159 bytes
 .../docs/images/Post3.png                          | Bin 0 -> 21389 bytes
 .../docs/images/ProcessCreditBillAssign.png        | Bin 0 -> 20929 bytes
 .../docs/images/ProcessCreditBillTop.png           | Bin 0 -> 70477 bytes
 .../docs/images/SettlePaymentAssign.png            | Bin 0 -> 43370 bytes
 .../docs/images/SettlePaymentTop.png               | Bin 0 -> 67600 bytes
 .../docs/images/Timer.png                          | Bin 0 -> 35292 bytes
 .../docs/images/VerifyPayment.png                  | Bin 0 -> 64621 bytes
 .../docs/images/WithPropertiesLogs.png             | Bin 0 -> 1054599 bytes
 .../docs/images/WithoutPropertiesLogs.png          | Bin 0 -> 464348 bytes
 .../docs/images/WithoutPropertiesLogsNW.png        | Bin 0 -> 321505 bytes
 .../process-business-calendar-example/pom.xml      | 128 ++++++++
 .../kogito/calendar/bill/CreditCardDetails.java    |  51 +++
 .../kogito/calendar/bill/CreditCardService.java    |  48 +++
 .../src/main/resources/application.properties      |  20 ++
 .../src/main/resources/calendar.properties         |  25 ++
 .../BPMN2-BusinessCalendarBankTransaction.bpmn2    | 359 +++++++++++++++++++++
 .../kie/kogito/calendar/CreditCardProcessIT.java   |  80 +++++
 27 files changed, 998 insertions(+)

diff --git a/kogito-quarkus-examples/pom.xml b/kogito-quarkus-examples/pom.xml
index 1b555b56d..1a3f0bbe8 100644
--- a/kogito-quarkus-examples/pom.xml
+++ b/kogito-quarkus-examples/pom.xml
@@ -67,6 +67,7 @@
         <module>pmml-event-driven-quarkus</module>
         <module>pmml-incubation-api-quarkus</module>
         <module>pmml-quarkus-example</module>
+        <module>process-business-calendar-example</module>
         <module>process-business-rules-quarkus</module>
         <module>process-decisions-quarkus</module>
         <module>process-decisions-rest-quarkus</module>
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/README.md 
b/kogito-quarkus-examples/process-business-calendar-example/README.md
new file mode 100644
index 000000000..b88068dcb
--- /dev/null
+++ b/kogito-quarkus-examples/process-business-calendar-example/README.md
@@ -0,0 +1,286 @@
+# Process Business Calendar Example
+
+This example demonstrates the impact of a business calendar on process 
execution within a Quarkus application. It showcases a business process 
involving credit card bill processing, which adapts to a business calendar 
defined in calendar.properties. This configuration modifies timer behaviors to 
respect working hours, holidays, and other schedule-based constraints.
+
+### Main Components
+
+**BPMN2-BusinessCalendarBankTransaction.bpmn2**:
+Defines the workflow for processing credit card transactions. 
+Includes tasks such as processing the credit bill, verifying payment, handling 
timers, cancelling and bill settlement.
+
+**CreditCardService.java**:
+Implements the logic for handling credit card payment processes.
+
+**calendar.properties**:
+Configures business hours, holidays, and other calendar properties that affect 
scheduling and timer behavior.
+
+### BPMN Process Details
+
+The BPMN model (`BPMN2-BusinessCalendarBankTransaction.bpmn2`) defines a 
workflow that includes the following main elements:
+<p align="center"><img width=75% height=50% 
src="docs/images/CreditCardModel.png"></p>
+
+### Start Event
+
+The initial trigger that starts the credit card bill processing workflow.
+
+### Process Credit Bill
+* Process Credit Bill Properties (Top)
+  <p align="center"><img width=75% height=50% 
src="docs/images/ProcessCreditBillTop.png"></p>
+
+* Process Credit Card Bill Assignments
+  <p align="center"><img width=75% height=50% 
src="docs/images/ProcessCreditBillAssign.png"></p>
+
+### Verify Payment
+A user task where the credit card details are validated, ensuring the payment 
is processed under valid terms.
+
+* Verify Payment
+  <p align="center"><img width=75% height=50% 
src="docs/images/VerifyPayment.png"></p>
+
+### Timer
+
+Attached to a user task to simulate waiting for manual confirmation or user 
action. This timer can be configured to react differently based on the presence 
of the business calendar.
+<p align="center"><img width=75% height=50% src="docs/images/Timer.png"></p>
+
+### Cancel Payment
+Executed if the timer expires without human action, leading to the 
cancellation of the payment process.
+
+* Cancel Payment (Top)
+  <p align="center"><img width=75% height=50% 
src="docs/images/CancelPaymentTop.png"></p>
+
+* Cancel Payment Assignments
+  <p align="center"><img width=75% height=50% 
src="docs/images/CancelPaymentAssign.png"></p>
+
+### Settle Payment
+
+The final step where the payment is settled successfully on manual 
verification.
+
+* Settle Payment (Top)
+ <p align="center"><img width=75% height=50% 
src="docs/images/SettlePaymentTop.png"></p>
+
+* Settle Payment Assignments
+<p align="center"><img width=75% height=50% 
src="docs/images/SettlePaymentAssign.png"></p>
+
+## Build and run
+
+### Prerequisites
+
+You will need:
+- Java 17+ installed
+- Environment variable JAVA_HOME set accordingly
+- Maven 3.9.6+ installed
+
+### Compile and Run in Local Dev Mode
+
+```sh
+mvn clean compile quarkus:dev
+```
+
+NOTE: With dev mode of Quarkus you can take advantage of hot reload for 
business assets like processes, rules, decision tables and java code. No need 
to redeploy or restart your running application.
+
+### Package and Run in JVM mode
+
+```sh
+mvn clean package
+java -jar target/quarkus-app/quarkus-run.jar
+```
+
+or on windows
+
+```sh
+mvn clean package
+java -jar target\quarkus-app\quarkus-run.jar
+```
+
+### OpenAPI (Swagger) documentation
+[Specification at swagger.io](https://swagger.io/docs/specification/about/)
+
+You can take a look at the [OpenAPI 
definition](http://localhost:8080/openapi?format=json) - automatically 
generated and included in this service - to determine all available operations 
exposed by this service. For easy readability you can visualize the OpenAPI 
definition file using a UI tool like for example available [Swagger 
UI](https://editor.swagger.io).
+
+In addition, various clients to interact with this service can be easily 
generated using this OpenAPI definition.
+
+When running in either Quarkus Development or Native mode, we also leverage 
the [Quarkus OpenAPI 
extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development)
 that exposes [Swagger UI](http://localhost:8080/q/swagger-ui/) that you can 
use to look at available REST endpoints and send test requests.
+
+## curl command can be found below:
+
+### To start the process
+
+```sh
+curl -X POST http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-d '{"creditCardNumber": null, "creditCardDetails": {"cardNumber": 
"434353433", "status": "Bill Due"}}'
+
+```
+
+### To retrieve instances
+
+```sh
+curl -X GET http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-H "Accept: application/json"
+
+```
+### To retrieve status of particular instance using id
+
+```sh
+curl -X GET http://localhost:8080/BusinessCalendarCreditBill/{id} \
+-H "Content-Type: application/json" \
+-H "Accept: application/json"
+
+```
+
+## Understanding calendar.properties
+**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.weekend.days** defaults to Saturday and Sunday (Sunday-1, 
Monday-2, Tuesday-3, Wednesday-4, Thursday-5, Friday-6, Saturday-7).
+
+* **business.holiday.date.format** defaults to yyyy-MM-dd, (input must match 
format defined format).
+
+* **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.
+
+**Behavior**:
+* Considering the default properties as mentioned above, if a task is executed 
after working hours i.e., non-working hours (e.g., at 7 PM), the system will 
delay its execution until the start of the next working hour/working day (9 
AM). For example, if a task timer is set to trigger at 7 PM on a Friday, it 
will not execute until 9 AM on Monday (assuming a standard 5-day workweek).
+* If a task becomes due or is scheduled to start outside business hours, it 
will remain in a pending state until business hours resume.
+* If the business calendar is configured with a 5-day workweek 
(business.days.per.week=5), any tasks scheduled over the weekend will not 
resume until the following Monday at the start of business hours.
+
+
+## Configuring Custom Calendar.Properties
+### Note: Important Guidelines for Configuring `calendar.properties`
+To override default values, configure calendar.properties file based on 
requirements. In order to ensure more aligned functionality, please follow the 
rules outlined below. Adhering to these guidelines will help ensure that tasks 
are executed as expected. Incorrect configurations may result in unintended 
behavior, so it's recommended to input accurate values.
+
+| Property                     | Valid Range                                   
                                                                         | 
Description                                                                     
                                                                                
                               |
+|------------------------------|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `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                                                                    
                                                                                
                   |
+| `business.cal.timezone`     | Valid timezone as per [Java TimeZone 
Documentation](https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html)
 | Timezone for calculations                                                    
                                                                                
                                  |
+
+### Example of custom calendar.properties
+```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
+```
+**Behavior**:
+* **Tasks within working hours**: When a task or timer is scheduled within the 
defined working hours (e.g., between business.start.hour=0 and 
business.end.hour=24), the task will be completed immediately once it becomes 
due. For example, if a task is scheduled to trigger at 10 AM on a Tuesday, and 
your working hours are from 0 to 24, the task will execute as expected at 10 AM.
+* **Handling custom working days**: If calendar.properties file specifies 
business.days.per.week=6, the system will treat these days as working days, 
tasks scheduled on any of these days will be processed during the defined 
working hours. For example, if a task is due at 10 AM on Saturday, and you’ve 
configured Saturday as a working day, the task will execute as completed.
+* **Weekend handling**: Even if a task is executed within the defined working 
hours, it will be delayed if it falls on a configured weekend. For example, if 
you have business.days.per.week =5 and business.weekend.days=6,7 the task will 
not execute on the weekend days mentioned. Instead, it will be postponed to the 
next working day at the defined business.start.hour. This ensures that no tasks 
are executed on days that are considered holidays, even if they fall within 
regular business hours.
+* **Holiday handling**: if a task is executed within the defined working 
hours, it will be delayed if it falls on a configured holiday. For example, if 
you have business.holdays = 2024-10-30 and a task is executed on the same day 
in a working hour, it will not execute, instead it will be postponed to the 
next working day at the defined business.start.hour. This ensures that no tasks 
are executed on days that are considered holidays, even if they fall within 
regular business hours.
+* **Timezone**: If you specify a timezone using business.cal.timezone, the 
calendar will adjust all scheduling based on this timezone, regardless of 
system time else systems time will be considered.
+
+## Testing with default calendar.properties (working hours)
+**Note**: The test was performed at 16:13 on Monday, which falls under default 
working hours 
+
+* The timer for the Verify Payment task will follow a straightforward 
countdown based on real time. If the specified time elapses i.e., 1 second, it 
immediately moves to cancel payment task.
+
+* POST/ BusinessCalendarCreditBill
+```sh
+curl -X POST http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-d '{"creditCardNumber": null, "creditCardDetails": {"cardNumber": 
"434353433", "status": "Bill Due"}}'
+
+```
+<p align="center"><img width=75% height=50% src="docs/images/Post1.png"></p>
+
+* After 1 second when we send request for GET/ BusinessCalendarCreditBill 
again we get empty array representing the cancellation.
+```sh
+curl -X GET http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-H "Accept: application/json"
+
+```
+<p align="center"><img width=75% height=50% src="docs/images/Get1.png"></p>
+
+### Example of logs representing the process from start to completion
+<p align="center"><img width=75% height=50% 
src="docs/images/WithPropertiesLogs.png"></p>
+
+* At 16:13:20,606, job 18e97326-897b-4f1b-8121-b09ea9eb37d7 was started, 
indicating that the timer was triggered approximately after one second as 
expected.
+
+## Testing with default calendar.properties (non-working hours)
+**Note**: The test was performed at 08:27 on Monday, which does not fall in 
the default working hours range
+
+* During non-working hours, the timer for the Verify Payment task will not 
trigger and the process remains in active state, does not move to cancel 
payment task.
+
+* POST/ BusinessCalendarCreditBill
+```sh
+curl -X POST http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-d '{"creditCardNumber": null, "creditCardDetails": {"cardNumber": 
"434353433", "status": "Bill Due"}}'
+```
+<p align="center"><img width=75% height=50% src="docs/images/Post3.png"></p>
+
+
+* GET/ BusinessCalendarCreditBill
+```sh
+curl -X GET http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-H "Accept: application/json"
+
+```
+* Now, even after 1 second, the process will be in Active State but not 
completed state.
+
+<p align="center"><img width=75% height=50% src="docs/images/Get3.png"></p>
+
+### Example of logs representing the active state during non-working hours
+
+<p align="center"><img width=75% height=50% 
src="docs/images/WithoutPropertiesLogsNW.png"></p>
+
+## Testing with calendar.properties (During non-working hours/Specified 
Holiday)
+**Note**: The test was performed considering 24-hour workday properties with 
configured holiday i.e., business.holidays=2024-11-07
+
+* After calendar.properties file is added, build the example again "mvn clean 
compile quarkus:dev" or type 's' in the quarkus terminal and hit enter just to 
restart.
+
+* POST/ BusinessCalendarCreditBill
+```sh
+curl -X POST http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-d '{"creditCardNumber": null, "creditCardDetails": {"cardNumber": 
"434353433", "status": "Bill Due"}}'
+```
+<p align="center"><img width=75% height=50% src="docs/images/Post2.png"></p>
+
+
+* GET/ BusinessCalendarCreditBill
+```sh
+curl -X GET http://localhost:8080/BusinessCalendarCreditBill \
+-H "Content-Type: application/json" \
+-H "Accept: application/json"
+
+```
+* Now, even after 1 second, the process will be in Active State.
+
+<p align="center"><img width=75% height=50% src="docs/images/Get2.png"></p>
+
+### Example of logs representing the active state during non-working 
hours/specified holiday
+
+<p align="center"><img width=75% height=50% 
src="docs/images/WithPropertiesLogs.png"></p>
+
+* The node 'Start' for the process 'BusinessCalendarCreditBill', identified by 
08ea5258-9d91-4f05-a8d8-184107c042ed, was triggered at 08:54:28,621.
+
+* At 08:54:28,629, the 'Process Credit Bill' node was activated.
+
+* At 08:54:28,653, verification step through the 'Verify Payment' node was 
started.
+
+* Subsequently, a human task was registered at 08:54:28,773.
+
+* The workflow transitioned to an 'Active' state at 08:54:28,808.
+
+* Due to mentioned "business.holidays property" in calendar.properties, timer 
does not trigger and the state remains active.
+
+* On next business day, timer will resume at the beginning of the next working 
hour/day, after the non-working hour/holiday has ended. The timer is set to 
fire after one second of active business time.
+
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentAssign.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentAssign.png
new file mode 100644
index 000000000..9306de7df
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentAssign.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentTop.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentTop.png
new file mode 100644
index 000000000..4ad4b8cb5
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CancelPaymentTop.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/CreditCardModel.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CreditCardModel.png
new file mode 100644
index 000000000..c05c5e3e3
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/CreditCardModel.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get1.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get1.png
new file mode 100644
index 000000000..936601bd7
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get1.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get2.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get2.png
new file mode 100644
index 000000000..ed77865a2
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get2.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get3.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get3.png
new file mode 100644
index 000000000..d1888c96c
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Get3.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post1.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post1.png
new file mode 100644
index 000000000..04686a9e7
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post1.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post2.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post2.png
new file mode 100644
index 000000000..610d6b040
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post2.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post3.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post3.png
new file mode 100644
index 000000000..fed2c0c92
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Post3.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillAssign.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillAssign.png
new file mode 100644
index 000000000..05b50c61a
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillAssign.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillTop.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillTop.png
new file mode 100644
index 000000000..97594f6d0
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/ProcessCreditBillTop.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentAssign.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentAssign.png
new file mode 100644
index 000000000..b3f5b205d
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentAssign.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentTop.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentTop.png
new file mode 100644
index 000000000..3f23e2118
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/SettlePaymentTop.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/Timer.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Timer.png
new file mode 100644
index 000000000..036c23649
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/Timer.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/VerifyPayment.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/VerifyPayment.png
new file mode 100644
index 000000000..5c40e3d57
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/VerifyPayment.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithPropertiesLogs.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithPropertiesLogs.png
new file mode 100644
index 000000000..cfa3d7c0e
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithPropertiesLogs.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogs.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogs.png
new file mode 100644
index 000000000..ccfc797af
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogs.png
 differ
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogsNW.png
 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogsNW.png
new file mode 100644
index 000000000..fb73b2d62
Binary files /dev/null and 
b/kogito-quarkus-examples/process-business-calendar-example/docs/images/WithoutPropertiesLogsNW.png
 differ
diff --git a/kogito-quarkus-examples/process-business-calendar-example/pom.xml 
b/kogito-quarkus-examples/process-business-calendar-example/pom.xml
new file mode 100644
index 000000000..a1cfa1a13
--- /dev/null
+++ b/kogito-quarkus-examples/process-business-calendar-example/pom.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.kie.kogito.examples</groupId>
+        <artifactId>kogito-quarkus-examples</artifactId>
+        <version>999-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>process-business-calendar-example</artifactId>
+    <name>Kogito Example :: Process Business Calendar</name>
+    
+    <properties>
+        <quarkus-plugin.version>3.8.6</quarkus-plugin.version>
+        
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
+        <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
+        <quarkus.platform.version>3.8.6</quarkus.platform.version>
+        <kogito.bom.group-id>org.kie.kogito</kogito.bom.group-id>
+        <kogito.bom.artifact-id>kogito-bom</kogito.bom.artifact-id>
+        <kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
+        <version.org.kie.kogito>999-SNAPSHOT</version.org.kie.kogito>
+    </properties>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>${quarkus.platform.group-id}</groupId>
+                <artifactId>${quarkus.platform.artifact-id}</artifactId>
+                <version>${quarkus.platform.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>${kogito.bom.group-id}</groupId>
+                <artifactId>${kogito.bom.artifact-id}</artifactId>
+                <version>${kogito.bom.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy-jackson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jbpm</groupId>
+            <artifactId>jbpm-with-drools-quarkus</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jbpm</groupId>
+            <artifactId>jbpm-quarkus</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.kie.kogito</groupId>
+            <artifactId>jbpm-flow</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-smallrye-openapi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.enterprise</groupId>
+            <artifactId>cdi-api</artifactId>
+            <version>2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-smallrye-health</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>${quarkus.platform.group-id}</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <version>${quarkus-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardDetails.java
 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardDetails.java
new file mode 100644
index 000000000..011beebf2
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardDetails.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.calendar.bill;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CreditCardDetails {
+    private String cardNumber;
+    private String status = "Bill Due";
+
+    public CreditCardDetails() {
+    }
+
+    public CreditCardDetails(String cardNumber) {
+        this.cardNumber = cardNumber;
+    }
+
+    public String getCardNumber() {
+        return cardNumber;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setCardNumber(String cardNumber) {
+        this.cardNumber = cardNumber;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardService.java
 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardService.java
new file mode 100644
index 000000000..92313279c
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/java/org/kie/kogito/calendar/bill/CreditCardService.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.calendar.bill;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jakarta.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+public class CreditCardService {
+
+    private Logger logger = LoggerFactory.getLogger(CreditCardService.class);
+
+    public CreditCardDetails processCreditBill(String creditCardNumber) {
+        logger.info("Paying credit card");
+        return new CreditCardDetails(creditCardNumber);
+    }
+
+    public CreditCardDetails settleBill(CreditCardDetails creditCardDetails) {
+        creditCardDetails.setStatus("Bill paid");
+        logger.info("settling bill");
+        return creditCardDetails;
+    }
+
+    public CreditCardDetails cancelPayment(CreditCardDetails 
creditCardDetails) {
+        creditCardDetails.setStatus("Payment cancelled, money will be refunded 
if it is debited");
+        logger.info("cancelling bill");
+        return creditCardDetails;
+    }
+}
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/application.properties
 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/application.properties
new file mode 100644
index 000000000..fdac783f4
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/application.properties
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+quarkus.swagger-ui.always-include=true
+quarkus.log.level=INFO
\ No newline at end of file
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/calendar.properties
 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/calendar.properties
new file mode 100644
index 000000000..eddf031d2
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/calendar.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# 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
+
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/org/kie/kogito/calendar/bill/BPMN2-BusinessCalendarBankTransaction.bpmn2
 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/org/kie/kogito/calendar/bill/BPMN2-BusinessCalendarBankTransaction.bpmn2
new file mode 100644
index 000000000..c26518955
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/main/resources/org/kie/kogito/calendar/bill/BPMN2-BusinessCalendarBankTransaction.bpmn2
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"; 
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"; 
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"; 
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"; 
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"; 
xmlns:drools="http://www.jboss.org/drools"; id="_qtlLMHyCED2WA6aH6h3CCg" 
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd 
http://www. [...]
+  <bpmn2:itemDefinition id="_creditCardNumberItem" structureRef="String"/>
+  <bpmn2:itemDefinition id="_creditCardDetailsItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:itemDefinition 
id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_InMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_OutMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="__9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputXItem" 
structureRef="String"/>
+  <bpmn2:itemDefinition 
id="__9726CC54-817D-4EBD-BC63-A3DBED0183A5_responseOutputXItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:itemDefinition 
id="_D350DC2A-D283-4357-9B87-3E295C348D50_InMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="_D350DC2A-D283-4357-9B87-3E295C348D50_OutMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="__D350DC2A-D283-4357-9B87-3E295C348D50_creditCardDetailsInputXItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:itemDefinition 
id="__D350DC2A-D283-4357-9B87-3E295C348D50_resultOutputXItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_PriorityInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_CommentInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_DescriptionInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_CreatedByInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_GroupIdInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_ContentInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_NotStartedReassignInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_NotCompletedReassignInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_NotStartedNotifyInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_NotCompletedNotifyInputXItem" 
structureRef="Object"/>
+  <bpmn2:itemDefinition 
id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_InMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_OutMessageType" structureRef=""/>
+  <bpmn2:itemDefinition 
id="__049D6ACC-0D5B-4C91-9382-D5B8417F3902_creditCardDetailsInputXItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:itemDefinition 
id="__049D6ACC-0D5B-4C91-9382-D5B8417F3902_resultOutputXItem" 
structureRef="org.kie.kogito.calendar.bill.CreditCardDetails"/>
+  <bpmn2:message id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_InMessage" 
itemRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_InMessageType"/>
+  <bpmn2:message id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_OutMessage" 
itemRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_OutMessageType"/>
+  <bpmn2:interface id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_ServiceInterface" 
name="org.kie.kogito.calendar.bill.CreditCardService" 
implementationRef="org.kie.kogito.calendar.bill.CreditCardService">
+    <bpmn2:operation 
id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_ServiceOperation" 
name="processCreditBill" implementationRef="processCreditBill">
+      
<bpmn2:inMessageRef>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_InMessage</bpmn2:inMessageRef>
+      
<bpmn2:outMessageRef>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_OutMessage</bpmn2:outMessageRef>
+    </bpmn2:operation>
+  </bpmn2:interface>
+  <bpmn2:message id="_D350DC2A-D283-4357-9B87-3E295C348D50_InMessage" 
itemRef="_D350DC2A-D283-4357-9B87-3E295C348D50_InMessageType"/>
+  <bpmn2:message id="_D350DC2A-D283-4357-9B87-3E295C348D50_OutMessage" 
itemRef="_D350DC2A-D283-4357-9B87-3E295C348D50_OutMessageType"/>
+  <bpmn2:interface id="_D350DC2A-D283-4357-9B87-3E295C348D50_ServiceInterface" 
name="org.kie.kogito.calendar.bill.CreditCardService" 
implementationRef="org.kie.kogito.calendar.bill.CreditCardService">
+    <bpmn2:operation 
id="_D350DC2A-D283-4357-9B87-3E295C348D50_ServiceOperation" 
name="cancelPayment" implementationRef="cancelPayment">
+      
<bpmn2:inMessageRef>_D350DC2A-D283-4357-9B87-3E295C348D50_InMessage</bpmn2:inMessageRef>
+      
<bpmn2:outMessageRef>_D350DC2A-D283-4357-9B87-3E295C348D50_OutMessage</bpmn2:outMessageRef>
+    </bpmn2:operation>
+  </bpmn2:interface>
+  <bpmn2:message id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_InMessage" 
itemRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_InMessageType"/>
+  <bpmn2:message id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_OutMessage" 
itemRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_OutMessageType"/>
+  <bpmn2:interface id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_ServiceInterface" 
name="org.kie.kogito.calendar.bill.CreditCardService" 
implementationRef="org.kie.kogito.calendar.bill.CreditCardService">
+    <bpmn2:operation 
id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_ServiceOperation" name="settleBill" 
implementationRef="settleBill">
+      
<bpmn2:inMessageRef>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_InMessage</bpmn2:inMessageRef>
+      
<bpmn2:outMessageRef>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_OutMessage</bpmn2:outMessageRef>
+    </bpmn2:operation>
+  </bpmn2:interface>
+  <bpmn2:collaboration id="_DCDB6E8C-F47A-4DBC-B34A-046A81E24F95" 
name="Default Collaboration">
+    <bpmn2:participant id="_D18AFD4D-A5A8-4C66-8259-5D9CF9B946FA" name="Pool 
Participant" processRef="BusinessCalendarCreditBill"/>
+  </bpmn2:collaboration>
+  <bpmn2:process id="BusinessCalendarCreditBill" 
drools:packageName="org.kie.kogito.calendar.bill" drools:version="1.0" 
drools:adHoc="false" name="BusinessCalendar-CreditBill" isExecutable="true" 
processType="Public">
+    <bpmn2:property id="creditCardNumber" 
itemSubjectRef="_creditCardNumberItem" name="creditCardNumber"/>
+    <bpmn2:property id="creditCardDetails" 
itemSubjectRef="_creditCardDetailsItem" name="creditCardDetails"/>
+    <bpmn2:sequenceFlow id="_3319AF07-1259-4E0B-95FB-4D7439C2D1BB" 
sourceRef="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7" 
targetRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902"/>
+    <bpmn2:sequenceFlow id="_E15E86A8-BF0E-400F-8147-9CDCA638DBF6" 
sourceRef="_D350DC2A-D283-4357-9B87-3E295C348D50" 
targetRef="_42CCFD67-909F-4BA9-BC3B-1BAB395E3ED3">
+      <bpmn2:extensionElements>
+        <drools:metaData name="isAutoConnection.target">
+          <drools:metaValue><![CDATA[true]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="_1EA09C74-739D-41E1-A05A-E3C34942E6D2" 
sourceRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5" 
targetRef="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7">
+      <bpmn2:extensionElements>
+        <drools:metaData name="isAutoConnection.target">
+          <drools:metaValue><![CDATA[true]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="_BD039EC9-BD1C-44EB-8DB7-347E412D0F7A" 
sourceRef="processStartEvent" 
targetRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5"/>
+    <bpmn2:sequenceFlow id="_445DAFA9-C397-4051-B9A4-13673ACB2857" 
sourceRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902" 
targetRef="_03613543-8CE0-406A-9777-46BC93776DFB"/>
+    <bpmn2:sequenceFlow id="_A60B1BA8-2BCB-4765-8C9C-EFFCA75D8CA9" 
sourceRef="_6D9D1EAC-390E-45DE-806C-69472005BEED" 
targetRef="_D350DC2A-D283-4357-9B87-3E295C348D50"/>
+    <bpmn2:serviceTask id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902" 
drools:serviceimplementation="Java" 
drools:serviceinterface="org.kie.kogito.calendar.bill.CreditCardService" 
drools:serviceoperation="settleBill" name="Settle Payment" 
implementation="Java" 
operationRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_ServiceOperation">
+      <bpmn2:extensionElements>
+        <drools:metaData name="elementname">
+          <drools:metaValue><![CDATA[Settle Payment]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>_3319AF07-1259-4E0B-95FB-4D7439C2D1BB</bpmn2:incoming>
+      <bpmn2:outgoing>_445DAFA9-C397-4051-B9A4-13673ACB2857</bpmn2:outgoing>
+      <bpmn2:ioSpecification>
+        <bpmn2:dataInput 
id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_creditCardDetailsInputX" 
drools:dtype="org.kie.kogito.calendar.bill.CreditCardDetails" 
itemSubjectRef="__049D6ACC-0D5B-4C91-9382-D5B8417F3902_creditCardDetailsInputXItem"
 name="creditCardDetails"/>
+        <bpmn2:dataOutput 
id="_049D6ACC-0D5B-4C91-9382-D5B8417F3902_resultOutputX" 
drools:dtype="org.kie.kogito.calendar.bill.CreditCardDetails" 
itemSubjectRef="__049D6ACC-0D5B-4C91-9382-D5B8417F3902_resultOutputXItem" 
name="result"/>
+        <bpmn2:inputSet>
+          
<bpmn2:dataInputRefs>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_creditCardDetailsInputX</bpmn2:dataInputRefs>
+        </bpmn2:inputSet>
+        <bpmn2:outputSet>
+          
<bpmn2:dataOutputRefs>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_resultOutputX</bpmn2:dataOutputRefs>
+        </bpmn2:outputSet>
+      </bpmn2:ioSpecification>
+      <bpmn2:dataInputAssociation>
+        <bpmn2:sourceRef>creditCardDetails</bpmn2:sourceRef>
+        
<bpmn2:targetRef>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_creditCardDetailsInputX</bpmn2:targetRef>
+      </bpmn2:dataInputAssociation>
+      <bpmn2:dataOutputAssociation>
+        
<bpmn2:sourceRef>_049D6ACC-0D5B-4C91-9382-D5B8417F3902_resultOutputX</bpmn2:sourceRef>
+        <bpmn2:targetRef>creditCardDetails</bpmn2:targetRef>
+      </bpmn2:dataOutputAssociation>
+    </bpmn2:serviceTask>
+    <bpmn2:endEvent id="_42CCFD67-909F-4BA9-BC3B-1BAB395E3ED3">
+      <bpmn2:incoming>_E15E86A8-BF0E-400F-8147-9CDCA638DBF6</bpmn2:incoming>
+      <bpmn2:terminateEventDefinition/>
+    </bpmn2:endEvent>
+    <bpmn2:userTask id="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7" name="Verify 
Payment">
+      <bpmn2:extensionElements>
+        <drools:metaData name="elementname">
+          <drools:metaValue><![CDATA[Verify Payment]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>_1EA09C74-739D-41E1-A05A-E3C34942E6D2</bpmn2:incoming>
+      <bpmn2:outgoing>_3319AF07-1259-4E0B-95FB-4D7439C2D1BB</bpmn2:outgoing>
+      <bpmn2:ioSpecification>
+        <bpmn2:dataInput 
id="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputX" drools:dtype="Object" 
itemSubjectRef="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputXItem" 
name="TaskName"/>
+        <bpmn2:dataInput 
id="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputX" 
drools:dtype="Object" 
itemSubjectRef="__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputXItem" 
name="Skippable"/>
+        <bpmn2:inputSet>
+          
<bpmn2:dataInputRefs>_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputX</bpmn2:dataInputRefs>
+          
<bpmn2:dataInputRefs>_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputX</bpmn2:dataInputRefs>
+        </bpmn2:inputSet>
+      </bpmn2:ioSpecification>
+      <bpmn2:dataInputAssociation>
+        
<bpmn2:targetRef>_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputX</bpmn2:targetRef>
+        <bpmn2:assignment>
+          <bpmn2:from 
xsi:type="bpmn2:tFormalExpression"><![CDATA[Task]]></bpmn2:from>
+          <bpmn2:to 
xsi:type="bpmn2:tFormalExpression"><![CDATA[_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_TaskNameInputX]]></bpmn2:to>
+        </bpmn2:assignment>
+      </bpmn2:dataInputAssociation>
+      <bpmn2:dataInputAssociation>
+        
<bpmn2:targetRef>_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputX</bpmn2:targetRef>
+        <bpmn2:assignment>
+          <bpmn2:from 
xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
+          <bpmn2:to 
xsi:type="bpmn2:tFormalExpression"><![CDATA[_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_SkippableInputX]]></bpmn2:to>
+        </bpmn2:assignment>
+      </bpmn2:dataInputAssociation>
+    </bpmn2:userTask>
+    <bpmn2:serviceTask id="_D350DC2A-D283-4357-9B87-3E295C348D50" 
drools:serviceimplementation="Java" 
drools:serviceinterface="org.kie.kogito.calendar.bill.CreditCardService" 
drools:serviceoperation="cancelPayment" name="Cancel Payment" 
implementation="Java" 
operationRef="_D350DC2A-D283-4357-9B87-3E295C348D50_ServiceOperation">
+      <bpmn2:extensionElements>
+        <drools:metaData name="elementname">
+          <drools:metaValue><![CDATA[Cancel Payment]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>_A60B1BA8-2BCB-4765-8C9C-EFFCA75D8CA9</bpmn2:incoming>
+      <bpmn2:outgoing>_E15E86A8-BF0E-400F-8147-9CDCA638DBF6</bpmn2:outgoing>
+      <bpmn2:ioSpecification>
+        <bpmn2:dataInput 
id="_D350DC2A-D283-4357-9B87-3E295C348D50_creditCardDetailsInputX" 
drools:dtype="org.kie.kogito.calendar.bill.CreditCardDetails" 
itemSubjectRef="__D350DC2A-D283-4357-9B87-3E295C348D50_creditCardDetailsInputXItem"
 name="creditCardDetails"/>
+        <bpmn2:dataOutput 
id="_D350DC2A-D283-4357-9B87-3E295C348D50_resultOutputX" 
drools:dtype="org.kie.kogito.calendar.bill.CreditCardDetails" 
itemSubjectRef="__D350DC2A-D283-4357-9B87-3E295C348D50_resultOutputXItem" 
name="result"/>
+        <bpmn2:inputSet>
+          
<bpmn2:dataInputRefs>_D350DC2A-D283-4357-9B87-3E295C348D50_creditCardDetailsInputX</bpmn2:dataInputRefs>
+        </bpmn2:inputSet>
+        <bpmn2:outputSet>
+          
<bpmn2:dataOutputRefs>_D350DC2A-D283-4357-9B87-3E295C348D50_resultOutputX</bpmn2:dataOutputRefs>
+        </bpmn2:outputSet>
+      </bpmn2:ioSpecification>
+      <bpmn2:dataInputAssociation>
+        <bpmn2:sourceRef>creditCardDetails</bpmn2:sourceRef>
+        
<bpmn2:targetRef>_D350DC2A-D283-4357-9B87-3E295C348D50_creditCardDetailsInputX</bpmn2:targetRef>
+      </bpmn2:dataInputAssociation>
+      <bpmn2:dataOutputAssociation>
+        
<bpmn2:sourceRef>_D350DC2A-D283-4357-9B87-3E295C348D50_resultOutputX</bpmn2:sourceRef>
+        <bpmn2:targetRef>creditCardDetails</bpmn2:targetRef>
+      </bpmn2:dataOutputAssociation>
+    </bpmn2:serviceTask>
+    <bpmn2:serviceTask id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5" 
drools:serviceimplementation="Java" 
drools:serviceinterface="org.kie.kogito.calendar.bill.CreditCardService" 
drools:serviceoperation="processCreditBill" name="Process Credit Bill" 
implementation="Java" 
operationRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_ServiceOperation">
+      <bpmn2:extensionElements>
+        <drools:metaData name="elementname">
+          <drools:metaValue><![CDATA[Process Credit Bill]]></drools:metaValue>
+        </drools:metaData>
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>_BD039EC9-BD1C-44EB-8DB7-347E412D0F7A</bpmn2:incoming>
+      <bpmn2:outgoing>_1EA09C74-739D-41E1-A05A-E3C34942E6D2</bpmn2:outgoing>
+      <bpmn2:ioSpecification>
+        <bpmn2:dataInput 
id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputX" 
drools:dtype="String" 
itemSubjectRef="__9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputXItem"
 name="creditCardNumber"/>
+        <bpmn2:dataOutput 
id="_9726CC54-817D-4EBD-BC63-A3DBED0183A5_responseOutputX" 
drools:dtype="org.kie.kogito.calendar.bill.CreditCardDetails" 
itemSubjectRef="__9726CC54-817D-4EBD-BC63-A3DBED0183A5_responseOutputXItem" 
name="response"/>
+        <bpmn2:inputSet>
+          
<bpmn2:dataInputRefs>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputX</bpmn2:dataInputRefs>
+        </bpmn2:inputSet>
+        <bpmn2:outputSet>
+          
<bpmn2:dataOutputRefs>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_responseOutputX</bpmn2:dataOutputRefs>
+        </bpmn2:outputSet>
+      </bpmn2:ioSpecification>
+      <bpmn2:dataInputAssociation>
+        
<bpmn2:targetRef>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputX</bpmn2:targetRef>
+        <bpmn2:assignment>
+          <bpmn2:from 
xsi:type="bpmn2:tFormalExpression"><![CDATA[434354343]]></bpmn2:from>
+          <bpmn2:to 
xsi:type="bpmn2:tFormalExpression"><![CDATA[_9726CC54-817D-4EBD-BC63-A3DBED0183A5_creditCardNumberInputX]]></bpmn2:to>
+        </bpmn2:assignment>
+      </bpmn2:dataInputAssociation>
+      <bpmn2:dataOutputAssociation>
+        
<bpmn2:sourceRef>_9726CC54-817D-4EBD-BC63-A3DBED0183A5_responseOutputX</bpmn2:sourceRef>
+        <bpmn2:targetRef>creditCardDetails</bpmn2:targetRef>
+      </bpmn2:dataOutputAssociation>
+    </bpmn2:serviceTask>
+    <bpmn2:startEvent id="processStartEvent">
+      <bpmn2:outgoing>_BD039EC9-BD1C-44EB-8DB7-347E412D0F7A</bpmn2:outgoing>
+    </bpmn2:startEvent>
+    <bpmn2:endEvent id="_03613543-8CE0-406A-9777-46BC93776DFB">
+      <bpmn2:incoming>_445DAFA9-C397-4051-B9A4-13673ACB2857</bpmn2:incoming>
+    </bpmn2:endEvent>
+    <bpmn2:boundaryEvent id="_6D9D1EAC-390E-45DE-806C-69472005BEED" 
drools:dockerinfo="126^64.38749999999999|" drools:boundaryca="false" 
attachedToRef="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7" cancelActivity="false">
+      <bpmn2:outgoing>_A60B1BA8-2BCB-4765-8C9C-EFFCA75D8CA9</bpmn2:outgoing>
+      <bpmn2:timerEventDefinition>
+        <bpmn2:timeDuration 
xsi:type="bpmn2:tFormalExpression">PT1S</bpmn2:timeDuration>
+      </bpmn2:timerEventDefinition>
+    </bpmn2:boundaryEvent>
+  </bpmn2:process>
+  <bpmndi:BPMNDiagram>
+    <bpmndi:BPMNPlane bpmnElement="BusinessCalendarCreditBill">
+      <bpmndi:BPMNShape id="shape__6D9D1EAC-390E-45DE-806C-69472005BEED" 
bpmnElement="_6D9D1EAC-390E-45DE-806C-69472005BEED">
+        <dc:Bounds height="56" width="56" x="580" y="206.3875"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__03613543-8CE0-406A-9777-46BC93776DFB" 
bpmnElement="_03613543-8CE0-406A-9777-46BC93776DFB">
+        <dc:Bounds height="56" width="56" x="914" y="165"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape_processStartEvent" 
bpmnElement="processStartEvent">
+        <dc:Bounds height="56" width="56" x="120" y="165"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__9726CC54-817D-4EBD-BC63-A3DBED0183A5" 
bpmnElement="_9726CC54-817D-4EBD-BC63-A3DBED0183A5">
+        <dc:Bounds height="102" width="154" x="238" y="142"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__D350DC2A-D283-4357-9B87-3E295C348D50" 
bpmnElement="_D350DC2A-D283-4357-9B87-3E295C348D50">
+        <dc:Bounds height="102" width="154" x="531" y="344"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7" 
bpmnElement="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7">
+        <dc:Bounds height="102" width="154" x="454" y="142"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__42CCFD67-909F-4BA9-BC3B-1BAB395E3ED3" 
bpmnElement="_42CCFD67-909F-4BA9-BC3B-1BAB395E3ED3">
+        <dc:Bounds height="56" width="56" x="759" y="367"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="shape__049D6ACC-0D5B-4C91-9382-D5B8417F3902" 
bpmnElement="_049D6ACC-0D5B-4C91-9382-D5B8417F3902">
+        <dc:Bounds height="102" width="154" x="698" y="142"/>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge 
id="edge_shape__6D9D1EAC-390E-45DE-806C-69472005BEED_to_shape__D350DC2A-D283-4357-9B87-3E295C348D50"
 bpmnElement="_A60B1BA8-2BCB-4765-8C9C-EFFCA75D8CA9">
+        <di:waypoint x="608" y="234.3875"/>
+        <di:waypoint x="608" y="395"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge 
id="edge_shape__049D6ACC-0D5B-4C91-9382-D5B8417F3902_to_shape__03613543-8CE0-406A-9777-46BC93776DFB"
 bpmnElement="_445DAFA9-C397-4051-B9A4-13673ACB2857">
+        <di:waypoint x="775" y="193"/>
+        <di:waypoint x="914" y="193"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge 
id="edge_shape_processStartEvent_to_shape__9726CC54-817D-4EBD-BC63-A3DBED0183A5"
 bpmnElement="_BD039EC9-BD1C-44EB-8DB7-347E412D0F7A">
+        <di:waypoint x="135" y="180"/>
+        <di:waypoint x="315" y="193"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge 
id="edge_shape__9726CC54-817D-4EBD-BC63-A3DBED0183A5_to_shape__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7"
 bpmnElement="_1EA09C74-739D-41E1-A05A-E3C34942E6D2">
+        <di:waypoint x="315" y="193"/>
+        <di:waypoint x="454" y="193"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge 
id="edge_shape__D350DC2A-D283-4357-9B87-3E295C348D50_to_shape__42CCFD67-909F-4BA9-BC3B-1BAB395E3ED3"
 bpmnElement="_E15E86A8-BF0E-400F-8147-9CDCA638DBF6">
+        <di:waypoint x="608" y="395"/>
+        <di:waypoint x="759" y="395"/>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge 
id="edge_shape__C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7_to_shape__049D6ACC-0D5B-4C91-9382-D5B8417F3902"
 bpmnElement="_3319AF07-1259-4E0B-95FB-4D7439C2D1BB">
+        <di:waypoint x="531" y="193"/>
+        <di:waypoint x="775" y="193"/>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+  <bpmn2:relationship type="BPSimData">
+    <bpmn2:extensionElements>
+      <bpsim:BPSimData>
+        <bpsim:Scenario id="default" name="Simulationscenario">
+          <bpsim:ScenarioParameters/>
+          <bpsim:ElementParameters elementRef="processStartEvent">
+            <bpsim:TimeParameters>
+              <bpsim:ProcessingTime>
+                <bpsim:UniformDistribution max="10" min="5"/>
+              </bpsim:ProcessingTime>
+            </bpsim:TimeParameters>
+          </bpsim:ElementParameters>
+          <bpsim:ElementParameters 
elementRef="_9726CC54-817D-4EBD-BC63-A3DBED0183A5">
+            <bpsim:TimeParameters>
+              <bpsim:ProcessingTime>
+                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+              </bpsim:ProcessingTime>
+            </bpsim:TimeParameters>
+            <bpsim:ResourceParameters>
+              <bpsim:Availability>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Availability>
+              <bpsim:Quantity>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Quantity>
+            </bpsim:ResourceParameters>
+            <bpsim:CostParameters>
+              <bpsim:UnitCost>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:UnitCost>
+            </bpsim:CostParameters>
+          </bpsim:ElementParameters>
+          <bpsim:ElementParameters 
elementRef="_D350DC2A-D283-4357-9B87-3E295C348D50">
+            <bpsim:TimeParameters>
+              <bpsim:ProcessingTime>
+                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+              </bpsim:ProcessingTime>
+            </bpsim:TimeParameters>
+            <bpsim:ResourceParameters>
+              <bpsim:Availability>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Availability>
+              <bpsim:Quantity>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Quantity>
+            </bpsim:ResourceParameters>
+            <bpsim:CostParameters>
+              <bpsim:UnitCost>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:UnitCost>
+            </bpsim:CostParameters>
+          </bpsim:ElementParameters>
+          <bpsim:ElementParameters 
elementRef="_C10EDD5D-0C5F-4ADB-9B85-28D3B9C7D2A7">
+            <bpsim:TimeParameters>
+              <bpsim:ProcessingTime>
+                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+              </bpsim:ProcessingTime>
+            </bpsim:TimeParameters>
+            <bpsim:ResourceParameters>
+              <bpsim:Availability>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Availability>
+              <bpsim:Quantity>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Quantity>
+            </bpsim:ResourceParameters>
+            <bpsim:CostParameters>
+              <bpsim:UnitCost>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:UnitCost>
+            </bpsim:CostParameters>
+          </bpsim:ElementParameters>
+          <bpsim:ElementParameters 
elementRef="_049D6ACC-0D5B-4C91-9382-D5B8417F3902">
+            <bpsim:TimeParameters>
+              <bpsim:ProcessingTime>
+                <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+              </bpsim:ProcessingTime>
+            </bpsim:TimeParameters>
+            <bpsim:ResourceParameters>
+              <bpsim:Availability>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Availability>
+              <bpsim:Quantity>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:Quantity>
+            </bpsim:ResourceParameters>
+            <bpsim:CostParameters>
+              <bpsim:UnitCost>
+                <bpsim:FloatingParameter value="0"/>
+              </bpsim:UnitCost>
+            </bpsim:CostParameters>
+          </bpsim:ElementParameters>
+        </bpsim:Scenario>
+      </bpsim:BPSimData>
+    </bpmn2:extensionElements>
+    <bpmn2:source>_qtlLMHyCED2WA6aH6h3CCg</bpmn2:source>
+    <bpmn2:target>_qtlLMHyCED2WA6aH6h3CCg</bpmn2:target>
+  </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git 
a/kogito-quarkus-examples/process-business-calendar-example/src/test/java/org/kie/kogito/calendar/CreditCardProcessIT.java
 
b/kogito-quarkus-examples/process-business-calendar-example/src/test/java/org/kie/kogito/calendar/CreditCardProcessIT.java
new file mode 100644
index 000000000..e8b9d28a3
--- /dev/null
+++ 
b/kogito-quarkus-examples/process-business-calendar-example/src/test/java/org/kie/kogito/calendar/CreditCardProcessIT.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.calendar;
+
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.process.ProcessConfig;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+
+@QuarkusTest
+public class CreditCardProcessIT {
+
+    private static final String PROCESS_ID = "BusinessCalendarCreditBill";
+    private static final String CARD_NUMBER = "434354343";
+
+    @jakarta.inject.Inject
+    ProcessConfig processConfig;
+
+    @Test
+    public void testCardPaymentInWorkingDay() throws Exception {
+        String id = given()
+                .contentType(ContentType.JSON)
+                .body("{}")
+                .when()
+                .post("/" + PROCESS_ID)
+                .then()
+                .statusCode(201)
+                .body("id", notNullValue())
+                .body("creditCardDetails.cardNumber", is(CARD_NUMBER))
+                .body("creditCardDetails.status", is("Bill Due"))
+                .extract()
+                .path("id");
+
+        Thread.sleep(2000);
+        BusinessCalendar businessCalendar = 
processConfig.getBusinessCalendar();
+        assertThat(businessCalendar).isNotNull();
+        long timeDuration = 
businessCalendar.calculateBusinessTimeAsDuration("1s");
+        if (timeDuration > 1000L) {
+            given()
+                    .when()
+                    .get("/" + PROCESS_ID + "/" + id)
+                    .then()
+                    .statusCode(200)
+                    .body("id", is(id))
+                    .body("creditCardDetails.cardNumber", is(CARD_NUMBER))
+                    .body("creditCardDetails.status", is("Bill Due"));
+        } else {
+            given()
+                    .when()
+                    .get("/" + PROCESS_ID)
+                    .then()
+                    .statusCode(200)
+                    .body(equalTo("[]"));
+        }
+
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to