How to share DataStore between two different rule unit in a BPMN process with Drools 8?

109 views Asked by At

Context : I am migrating my Java/DRL project from Drools 7 to Drools 8.

To do this I am using the new Rule Unit style combined with kogito/quarkus recommended by Drools. I am trying to figure out how one can achieve to do this :

DataSources can be shared across different units, providing a coordination mechanism between them. (source -> sharing_dataSource )

Let's say I have two Rule Unit A and B such as :

Start -> A -> B -> End

Then I should define two Java Class AUnit and BUnit implementing RuleUnitData. Both class have their owns DataStore fields standing for the entry-point of each rule unit.

I don't understand how it is possible to define a shared DataStore between my two RuleUnits since a DataStore should be declared in either one or the other one ... But maybe I'm getting wrong on something.

I have actually no idea how to do this.

0

There are 0 answers