forall with nested collections
by braveheart85
Hello,
I'm pretty new to Drools hence i apologize if my question is newbie but i'm
getting crazy.
I'm trying to write a functioning query since yesterday without fortune.
I have data about vehicles owned by person organized for year. My structure
is:
VechicleData
|___VehicleYearData
|____Vehicle
I have inserted in Drools only the root of the hierarchy (VehicleData)
because insert all objects has been problematic for me. Now i need to check
if a person has all vehicle of the same make.
I have tried this:
$result: PersonData( $id: identifierCode )
forall
(
($o: VehicleData( ownerIdentifierCode == $result.identifierCode )) &&
($y: VehicleYearData( ) from $o.data) &&
($v: VehicleEntity( ) from $y.vehicleEntity)
)
VehicleEntity( this == $v, make == "BMW" )
)
and this:
PersonData( $id: identifierCode )
$list: List( ) from accumulate (
(and
$o: VehicleData( ownerIdentifierCode == $id )
$y: VehicleYearData( ) from $o.data
$e: VehicleEntity( ) from $y.vehicleEntity
),
collectList( $e )
)
forall (
$v: VehicleEntity( ) from $list
VehicleEntity( this == $v, make == "BMW" )
)
and many other...
Someone can help me??
Thank you.
Andrea
--
View this message in context: http://drools.46999.n3.nabble.com/forall-with-nested-collections-tp402957...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months
Drools 6 support for changeset
by wtang
I have a requirement in which when a rule is changed, the change needs to be
reflected immediately without retarting the system.
In Drools 5.x we can use the changeset.xml with the knowlegde agent. Now in
Drool 6.0 we have Kie API.
1) does Kie support changeset.xml?
2) Upper management don't want to use kie, they want to use jsr94. Does
jsr94 support changeset.xml?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp402713...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months
Deploy Rules in a separate OSGi bundles
by Ephemeris Lappis
Hello.
I'd like to separate cleanly my Drools system into 2 OSGi bundles :
1) the java code that uses the Kie API (6.0.1) and exposes service
interfaces to the business part of the applications. Its code relies on
someting like :
KieServices kieServices = KieServices.Factory.get();
kieContainer = kieServices.getKieClasspathContainer();
KieSession kieSession = kieContainer.newKieSession(name);
2) the rules themselves, just including the kmodule.xml that manages the
ksessions and the drl files in their own packages.
Let say the first module is S and second is R, while the applcation is A.
This build model works nice in my eclipse with correct maven dependancies
set from A to both S and R. Classes in the application A calls the service
from the S. The kieContainer has resolved as expected the kmodule and
associated the rules files for the given packages, and the application can
get the ksession for a given name.
I'm afraid that the same code won't run as nice as it does when deployed on
my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may
encounter some troubles to detect the kmodule.xml in the META-INF and the
DRL files out of another jar.
Is there anyone with such experiences ?
Any advice to do it ?
Thanks in advance.
Regards.
--
View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-a-separate-OSGi-bundles...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months
Deploy Rules in a separater OSGi bundle
by Ephemeris Lappis
Hello.
I'd like to separate cleanly my Drools system into 2 OSGi bundles :
1) the java code that uses the Kie API (6.0.1) and exposes service
interfaces to the business part of the applications. Its code relies on
someting like :
KieServices kieServices = KieServices.Factory.get();
kieContainer = kieServices.getKieClasspathContainer();
KieSession kieSession = kieContainer.newKieSession(name);
2) the rules themselves, just including the kmodule.xml that manages the
ksessions and the drl files in their own packages.
Let say the first module is S and second is R, while the applcation is A.
This build model works nice in my eclipse with correct maven dependancies
set from A to both S and R. Classes in the application A calls the service
from the S. The kieContainer has resolved as expected the kmodule and
associated the rules files for the given packages, and the application can
get the ksession for a given name.
I'm afraid that the same code won't run as nice as it does when deployed on
my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may
encounter some troubles to detect the kmodule.xml in the META-INF and the
DRL files out of another jar.
Is there anyone with such experiences ?
Any advice to do it ?
Thanks in advance.
Regards.
--
View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-a-separater-OSGi-bundle...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 8 months