bpm-crafters / process-engine-api

Beautiful implementation-agnostic process engine API.
https://bpm-crafters.github.io/process-engine-api/stable/
Apache License 2.0
11 stars 0 forks source link

Async in pull-strategy #67

Closed zambrovski closed 2 months ago

zambrovski commented 2 months ago

Steps to reproduce

I believe we are still not fully async as expected. Check the timing and the thread info below

2024-08-26T17:46:04.882+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-3] d.b.e.o.f.i.a.i.worker.FetchGoodsWorker  : Received task 81
2024-08-26T17:46:04.883+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-3] d.b.e.o.f.i.a.o.i.FakeInventoryAdapter   : [INVENTORY ADAPTER] Fetching goods for 9791401b-d8df-4ae4-b131-ecb3b78fe7c9]
2024-08-26T17:46:04.883+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-3] d.b.e.o.f.i.a.o.i.FakeInventoryAdapter   : [INVENTORY ADAPTER] Some items were not in stock. Wait 20 seconds until these are delivered.
2024-08-26T17:46:24.884+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-3] d.b.e.o.f.i.a.o.i.FakeInventoryAdapter   : [INVENTORY ADAPTER] All items have been delivered.
2024-08-26T17:46:24.884+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-3] d.b.e.o.f.i.a.o.i.FakeInventoryAdapter   : [INVENTORY ADAPTER] Items are in stock
2024-08-26T17:46:24.905+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:24.911+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-4] d.b.e.o.f.s.a.in.worker.ShipGoodsWorker  : Received task 94
2024-08-26T17:46:24.911+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [pool-2-thread-4] d.b.e.o.f.s.a.usecase.ShipGoodsUseCase   : [SHIPMENT]: Shipping goods for order 9791401b-d8df-4ae4-b131-ecb3b78fe7c9 to Address[streetLine=221b Baker Street, zipCode=NW1 6XE, city=London, country=United Kingdom]
2024-08-26T17:46:24.933+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:24.945+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:24.954+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:24.963+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:29.883+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:34.884+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:39.884+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:44.883+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
2024-08-26T17:46:49.880+02:00  INFO 465943 --- [Order Fulfillment Camunda 7 Embedded] [   scheduling-1] d.b.e.o.f.o.a.o.usertasks.UserTaskPool   : Received user task for 87 (OrderFulfillment:user_inform_customer_about_delay)
zambrovski commented 2 months ago

None of the following should block each other...

There are the following places to check:

zambrovski commented 2 months ago

@p-wunderlich let us plese have a look on it together

zambrovski commented 2 months ago

See https://www.baeldung.com/spring-scheduled-tasks