FW: Nested flow terminating parent flow prematurely
by Tom.E.Murphy@wellsfargo.com
Thanks to Travis Scheponik for trying to help me resolve this. However, neither he nor I could figure it out.
Babak solved it here at the boot camp - the subprocesses should have their end nodes with terminate set to TRUE not false, and the parent process should invoke the subprocess with WaitForCompletion set to true.
This was the one combination we had not tried, and it worked.
Thanks, Babak.
Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 941 320 8014
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
_____________________________________________
From: Murphy, Tom E.
Sent: Thursday, May 28, 2009 8:54 AM
To: 'rules-users(a)lists.jboss.org'
Subject: Nested flow terminating parent flow prematurely
Hi.
I'm struggling with a rule flow that contains another rule flow.
Rule flow 1 - first step is to invoke a sub-process, call it rule flow 2.
Rule flow 2 executes fine, with correct internal branching logic.
Rule flow 2 proceeds to an End object with terminates set to false.
After RF2 completes, I am expecting a return to the parent flow, RF1.
However, entire flow terminates and subsequent RF Groups and or RF's in parent flow are never activated.
Is this a bug or am I specifying something incorrectly?
Using Version 5.0.0.CR1
Code for the two flows is below (excuse the ugly ID's and names - these are generated from our rule repository software):
<!-- TOP / OUTERMOST FLOW: -->
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd<http://drools.org/drools-5.0/process%20drools-processes-5.0.xsd>"
type="RuleFlow" name="RF6677: R3.09 GAIP" id="29405" package-name="com.wellsfargo.GeneratedRules" version="2" >
<header>
<imports>
<import name="com.wellsfargo.service.provider.hcfg.entity.workingObjects.x2007.PolicySet" />
</imports>
</header>
<nodes>
<start id="1" name="Start" x="105" y="108" width="48" height="48" />
<join id="3" name="EndJoin" x="500" y="500" type="3" />
<end id="4" name="End" x="600" y="600" terminate="false" />
<subProcess id="29403" name="R3.09 GAIP REP 3" x="400" y="400" processId="29403" >
</subProcess>
<ruleSet id="50000580" name="50000580" x="300" y="300" ruleFlowGroup="RF6677_50000580" />
<subProcess id="29364" name="R3.09 GAIP REP 1" x="200" y="200" processId="29364" >
</subProcess>
<split id="150000579" x="458" y="205" width="48" height="48" type="2" >
<constraints>
<constraint toNodeId="50000580" toType="DROOLS_DEFAULT" name="constraint" priority="1" type="rule" dialect="mvel" >PolicySet ( serviceFlowCode == "GAIP" )</constraint>
<constraint toNodeId="3" toType="DROOLS_DEFAULT" name="constraint" priority="1" type="rule" dialect="mvel" >PolicySet ( serviceFlowCode == "Post Rules Processing" )</constraint>
</constraints>
</split>
</nodes>
<connections>
<connection from="29403" to="3" />
<connection from="150000579" to="3" />
<connection from="3" to="4" />
<connection from="50000580" to="29403" />
<connection from="150000579" to="50000580" />
<connection from="1" to="29364" />
<connection from="29364" to="150000579" />
</connections>
</process>
<!-- FIRST INNER FLOW - subProcess id="29403" -->
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd<http://drools.org/drools-5.0/process%20drools-processes-5.0.xsd>"
type="RuleFlow" name="RF6662: R3.09 GAIP REP 1" id="29364" package-name="com.wellsfargo.GeneratedRules" version="2" >
<header>
<imports>
<import name="com.wellsfargo.service.provider.hcfg.entity.decision.x2007.RiskDecisionResultEnum" />
<import name="com.wellsfargo.service.provider.hcfg.document.loanFile.x2007.TransactionDecisionResults" />
</imports>
</header>
<nodes>
<start id="1" name="Start" x="405" y="12" width="48" height="48" />
<join id="250000560" x="661" y="351" width="48" height="48" type="3" />
<ruleSet id="50000554" name="50000554" x="390" y="109" width="80" height="48" ruleFlowGroup="RF6662_50000554" />
<ruleSet id="50000555" name="50000555" x="388" y="231" width="80" height="48" ruleFlowGroup="RF6662_50000555" />
<end id="3" name="End" x="682" y="754" width="48" height="48" terminate="false" />
<ruleSet id="50000556" name="50000556" x="137" y="349" width="80" height="48" ruleFlowGroup="RF6662_50000556" />
<ruleSet id="50000557" name="50000557" x="137" y="510" width="80" height="48" ruleFlowGroup="RF6662_50000557" />
<ruleSet id="50000558" name="50000558" x="253" y="506" width="80" height="48" ruleFlowGroup="RF6662_50000558" />
<ruleSet id="50000584" name="50000584" x="552" y="501" width="80" height="48" ruleFlowGroup="RF6662_50000584" />
<ruleSet id="50000559" name="50000559" x="403" y="505" width="80" height="48" ruleFlowGroup="RF6662_50000559" />
<split id="150000555" x="404" y="351" width="48" height="48" type="2" >
<constraints>
<constraint toNodeId="250000560" toType="DROOLS_DEFAULT" name="constraint" priority="1" type="rule" dialect="mvel" >TransactionDecisionResults ( riskDecisionResult == RiskDecisionResultEnum.NO_DECISION )</constraint>
<constraint toNodeId="50000556" toType="DROOLS_DEFAULT" name="constraint" priority="1" type="rule" dialect="mvel" >TransactionDecisionResults ( riskDecisionResult != RiskDecisionResultEnum.NO_DECISION )</constraint>
</constraints>
</split>
<ruleSet id="50000560" name="50000560" x="650" y="595" width="80" height="48" ruleFlowGroup="RF6662_50000560" />
</nodes>
<connections>
<connection from="50000584" to="250000560" />
<connection from="150000555" to="250000560" />
<connection from="1" to="50000554" />
<connection from="50000554" to="50000555" />
<connection from="50000560" to="3" />
<connection from="150000555" to="50000556" />
<connection from="50000556" to="50000557" />
<connection from="50000557" to="50000558" />
<connection from="50000559" to="50000584" />
<connection from="50000558" to="50000559" />
<connection from="50000555" to="150000555" />
<connection from="250000560" to="50000560" />
</connections>
</process>
Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 941 320 8014
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
15 years, 7 months
String comparison question
by Armaghan Mahmud
Hey guys,
I read in a previous post that == in Drools 4.0.7 maps to .equals()
automatically. My situation required me to put a String object into the
working memory and do a comparison on it to see if a particular word is in
the passed String sentence. Could anybody please guide me as to how to
approach this problem? Thanks in advance. Here's my original code:
rule "Find Alpha in a sentence"
*
salience* 100
wrap: WrapperClass(Sentence == "Alpha")
then
System.out.*println*("Aha found ya!");
end
15 years, 7 months
rule using sliding window
by Bhushan Bhangale
I am using Drools 5. I am struggling to write rule for this logic -
If a stock price changes more than 10% within an hour then report the
change.
I understand I have to use sliding window feature but unable to write the
rule.
For example I got an update for IBM stock @ 12:30 for price 100 and then
another update IBM stock @ 12:35 for price 111. Since the time difference is
within an hour and the change is also greater than 10% I want to report this
price change.
Stock class -
Public class Stock {
Private String stock;
Private double price;
Private Date time;
Private double priceChange;
Private Boolean highlight;
}
rule "Stock Price change more than 10% within an hour"
when
then
set the priceChange attribute of Stock object
set highlight to true
end
Secondly if the window is large and number of records coming in is high then
could there be a memory issue?
Also since every record is getting stored in database, can I not use the
database directly instead of sliding window?
Thanks
Mr. Bhangale Bhushan
Associate Manager
Kale Consultants Ltd.
<mailto:bhushan_bhangale@kaleconsultants.com>
bhushan_bhangale(a)kaleconsultants.com
tel:
<http://www.plaxo.com/click_to_call?lang=en&src=jj_signature&To=%2B91+%280%2
9206+608+3777&Email=bhushan_bhangale(a)kaleconsultants.com> +91 (0)206 608
3777
<http://www.kaleconsultants.com> http://www.kaleconsultants.com
Disclaimer: This email (including any attachments) is intended for the sole
use of the recipient/s and may contain material that is CONFIDENTIAL. Any
unauthorized disclosure / copying / distribution or forwarding of this message
or part is STRICTLY PROHIBITED. If you have erroneously received this message,
please delete it immediately and notify the sender. No liability is assumed for
any errors and/or omissions in the contents of this message. Information in
this message that does not relate to the official business of this Company
shall be understood as neither given nor endorsed by it. If verification is
required please request a hard-copy version.
To know more about Kale Consultants, visit www.kaleconsultants.com
-=-=-=-=-=-=-=-=-=-
15 years, 7 months
drools filtering
by jayadevan.m@gmail.com
HI all
I want to applay filter codition on a list , that was generated in d
rules .For example first statement applay one filter condtion on one entity
list, then I want to filter the result . is it possible in drools ?
thanks and regards
15 years, 7 months
Clarification regarding the use of Guvnor
by Andrew Nguyen
Hello all,
I am a very new Drools user and am trying to expose it as a web-
service. Due to my experience with Spring, I went ahead and
implemented a basic rule engine and exposed it as a web service via
Spring. I am now looking at integrating it with Guvnor to allow non-
computer people, who are domain experts, to modify the rules. From
what I have read in the v5 documentation, it sounds like Guvnor is
intended as a complete solution to what I am trying to accomplish -
i.e. it will handle the rule management as well as exposing the rule
engine via JSON (or other interface). But, when I have searched
around the internet, Guvnor sounds like just a rule management
component.
So, I pretty much have 3 questions:
* Is my current setup of Drools + Spring the best way to expose my
rule engine to other applications? (Specifically, a .NET/C# app...)
* Is Guvnor suitable for integrating into my system as only a rule
management system?
Thanks!
--Andrew
--
Andrew Nguyen
Nguyen & Associates
Custom Software Development & IT Services
http://www.na-consulting.net
andrew(a)na-consulting.net
858-225-7575
15 years, 7 months
Re: [rules-users] String comparison question
by Greg Barton
Try a comma instead of &&
WrapperClass( sentence matches ".*Alpha.*", sentence2 matches ".*Beta*.")
--- On Mon, 6/1/09, Armaghan Mahmud <mahmud.armaghan(a)gmail.com> wrote:
> From: Armaghan Mahmud <mahmud.armaghan(a)gmail.com>
> Subject: Re: [rules-users] String comparison question
> To: "Rules Users List" <rules-users(a)lists.jboss.org>
> Date: Monday, June 1, 2009, 11:12 AM
> Thanks for your reply Edson. What
> if I want to test for multiple substrings in different
> strings?
>
> For example, how can I find beta in sentence2?
>
> I tried to combine WrapperClass( sentence matches
> ".*Alpha.*" && sentence2 matches
> ".*Beta*.") but I got errors.
>
> Thanks,
> Armaghan
>
> 2009/5/31 Edson Tirelli <tirelli(a)post.com>
>
>
> If the string you are looking for is a substring of
> your sentence, you need to either use a regexp or an eval to
> call for an indexOf-like method:
>
>
> WrapperClass( sentence matches ".*Alpha.*" )
>
> []s
> Edson
>
>
> 2009/5/31 Armaghan Mahmud <mahmud.armaghan(a)gmail.com>
>
>
>
>
>
> Hey guys,
>
> I read in a previous post that == in Drools 4.0.7 maps
> to .equals() automatically. My situation required me to put
> a String object into the working memory and do a comparison
> on it to see if a particular word is in the passed String
> sentence. Could anybody please guide me as to how to
> approach this problem? Thanks in advance. Here's my
> original code:
>
>
>
> rule "Find Alpha in a
> sentence"
> salience100
> wrap: WrapperClass(Sentence == "Alpha")
> then
> System.out.println("Aha found
> ya!");
> end
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
>
> --
> Edson Tirelli
> JBoss Drools Core Development
> JBoss, a division of Red Hat @ www.jboss.com
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
15 years, 7 months
ClassCastException for Hibernate entity when rule is fired
by Sobhana
hi, can someone please help with the below issue? Any tips or hints on what
could be causing this would be very helpful.
We are using Drools 4.0.7 and have a rule which uses a Hibernate entity
(SaleEventItem) and its related entity (Inventory). Some times, the
SaleEventItem passed as the fact has the Inventory lazy loaded and hence its
type is the Hibernate proxy - Inventory_$$_javassist_93. In this case, the
rule runs fine.
But at times, the SaleEventItem which is passed has the Inventory attribute
set explicitly and hence its type is Inventory itself. When the rule fires
in this case, it tries to assign the Inventory into
Inventory_$$_javassist_93 which causes this ClassCastException.
java.lang.ClassCastException: com.crom.data.pojo.Inventory incompatible with
com.crom.data.pojo.Inventory_$$_javassist_93
at ASMAccessorImpl_14985690421242774005070.getValue(Unknown Source)
at
org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)
at
org.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)
at
org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
at org.mvel.MVEL.executeExpression(MVEL.java:235)
at
org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:45)
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
How do we prevent this? Is it possible to somehow enforce that the type of
the variable in the rule should be Inventory and not
Inventory_$$_javassist_93?
The rule is as follows.
dialect "java"
when
$sale:SaleEventItem(inventory != null,
$leaseInfo:inventory.leaseInformation != null,
$saleEventPrize:inventory.leaseInformation.residualPayAmount != null)
then
$sale.setStartPrice((Double)$sale.getInventory().getLeaseInformation().getResidualPayAmount());
Thanks,
Sobhana
--
View this message in context: http://www.nabble.com/ClassCastException-for-Hibernate-entity-when-rule-i...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 7 months
Re: Re: Re: [rules-users] Re: Drools performance issue
by Greg Barton
It's happening because the problem is hard. :) It's quadratic on the average number of assignments per driver. i.e. for each driver, you compare all of the assignments to each other, and you must do that for all drivers. So you have ( (num drivers) * (average num assignments)^2 ) firings in the BEST case. (The rule you originally presented was pretty much the worst case, as you were matching ( (num drivers)^2 *(num trips)^2 ) )
That's also why the processing happens when you insert the second set: before that the rule doesn't trigger.
Now, if you don't need to compare trip assignments between drivers, you could just insert one driver plus their trips and fire the rules.
But if you do want to throw everything in WM at once, you may be able to use this trick: to detect overlap, you can cut the number of conditions you've got in half, making things slightly better. You only need to detect that the start or end of one of the trips is contained in another. Also, is it possible to have a driverId attribute in your trip object? That would eliminate the need to match on the driver object. Using both you'd have this:
rule "Assignment Check"
when
$ta1: TripVO();
$ta2: TripVO(
ta1.driverId == driverId,
ta1.startDtmUtc < startDtmUtc,
ta1.endDtmUtc >= startDtmUtc
);
then
Note the "ta1.startDtmUtc < startDtmUtc" instead of ta1.startDtmUtc <= startDtmUtc". This ensures that you don't test the same two TripVOs twice.
Give this a try.
--- On Mon, 6/1/09, jayadevan.m(a)gmail.com <jayadevan.m(a)gmail.com> wrote:
> From: jayadevan.m(a)gmail.com <jayadevan.m(a)gmail.com>
> Subject: Re: Re: Re: [rules-users] Re: Drools performance issue
> To: "Wolfgang Laun" <wolfgang.laun(a)gmail.com>
> Cc: rules-users(a)lists.jboss.org
> Date: Monday, June 1, 2009, 8:34 AM
> Hi,
>
>
>
> I noticed something interesting. The issue with
> memory is happening always while inserting the second set of
> objects into working memory!
>
> Earlier, I was insering the DriverVO's into WM
> and then inserting the AssignmentsVO, and the system was
> hanging while inserting the AssignmentsVO. Then I reversed
> the order of insertion and then the machine was hit while
> inserting the DriverVO's.
>
>
>
> Does anyone know why this issue might be happening
> and how to overcome this?
>
>
>
> Thanks in advance,
>
> Jayadevan.
>
>
>
> On Jun 1, 2009 6:51pm, jayadevan.m(a)gmail.com wrote:
>
> > Thanks W,
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > I tried it out ,But didn't get any
> performance improvement :(
>
> >
>
> >
>
> > The issue might be that I am inserting too many
> objects into working memory
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > jayadevan
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > On Jun 1, 2009 3:36pm, Wolfgang Laun
> wolfgang.laun(a)gmail.com> wrote:
>
> >
>
> >
>
> > > The first two patterns pair each driver
> assignment with each trip -
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > which is quite a lot of work to do. (The
> infix "and" between the 2nd
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > and 3rd pattern doesn't change this.)
> Also, the field restriction
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > "tripId in ($tid)" is not the
> most efficient way.
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > Try this:
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > rule "Assignment Check"
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > when
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $creVo: DriverAssignVO($drId: driverId,
> $tid1: tripId)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $creVo: DriverAssignVO(driverId ==
> $drId, $tid2: tripId != $tid1)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $trAsgn1: TripVO( tripId == $tid1,
> $startDtmUtc: startDtmUtc,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $endDtmUtc: endDtmUtc)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $trAsgn2: TripVO( tripId == $tid2,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > ((startDtmUtc
> >= $startDtmUtc && startDtmUtc
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > (endDtmUtc >=
> $startDtmUtc && endDtmUtc
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > then
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > System.out.println("TRIP ID: "
> + $crvo.getTripId());
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > end
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > Here the first two patterns produce all
> pairs of assignments of a
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > single driver, and the remainder checks for
> overlaps.
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > You'll also find that this produces two
> symmetric firings for each
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > overlap. It might be possible to avoid this
> by using "$tid2: tripId >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > $tid1" in the second pattern, the
> id's data type permitting.
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > -W
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > 2009/6/1 Mark Proctor
> mproctor(a)redhat.com>:
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Please send these emails to the user
> list (in cc) so everyone can help, not
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > directly to me.
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Mark
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > jayadevan m wrote:
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Hi
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > We have one performance(memory)
> issue in drools-5
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Our Scenario
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > We have 3 entities
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Trip - Entity representing details
> about trip
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Driver - Entity for driver , it
> contain details about driver
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Assignments - details about each
> assignments (one driver may assigned to
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > many trip)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > The rule is to find ,"Find
> overlapping between trip assignments"
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > For Implementing this we take the
> Trip ,Driver And Assignments entities
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > from Data base and put it into working
> memory
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > For Small number of records this
> rule work well ,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > But we want to check it against 15000
> driver ,331176 assignments and 12745
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > trips
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > In that case it take huge amount of
> time for execution (rule firing )
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > Rule is
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > rule "Assignment Check"
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > when
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > $creVo:
> DriverAssignVO($drId: driverId ,$tid: tripId);
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> $tripAssignment: TripVO(
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> $tpid: tripId,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> $startDtmUtc: startDtmUtc,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> $endDtmUtc: endDtmUtc)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> and
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> $trvo: TripVO(
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> tripId != $tpid,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> tripId in ($tid),
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> ((startDtmUtc >= $startDtmUtc
> && startDtmUtc
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > $endDtmUtc) ||
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> (endDtmUtc >= $startDtmUtc &&
> endDtmUtc
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > $endDtmUtc)));
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > $crvo:
> DriverAssignVO($drvrId: driverId , driverId == $drId ,
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > tripId != $tid, tripId == $tpid)
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > then
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> System.out.println("TRIP ID: " +
> $crvo.getTripId());
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > end
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > thanks and regards
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> _______________________________________________
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > rules-users mailing list
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > > rules-users(a)lists.jboss.org
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
> _______________________________________________
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > rules-users mailing list
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > > rules-users(a)lists.jboss.org
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
>
> >
>
> >
>
> > >
> -----Inline Attachment Follows-----
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
15 years, 7 months
Web services integration for Drools Flow
by Ajay.Gautam@rbs.com
Hello,
I am evaluating a few workflow engines for an up coming project. Drools flow is the first one I am looking at.
Question: Is there any existing web services integration with Drools Flow? Specifically:
1. ability to call a service (Similar to "Email" work item)
2. ability to trigger a flow based on web services input (listener)
I could write a web services wrapper around Drools Flow, but am wondering if there is an existing solution for it. A quick Google search did not reveal anything much.
PS: Not looking at jBPM - don't want to get into deploying and maintaining a J2EE container. For our (simple) purposes, something like tomcat would suffice.
Any pointers in the right direction would be greatly appreciated.
Thanks
Ajay
*****Please note that my email address may have changed. For all
future correspondence, please use this address*****
********************************************************************This
message (including any attachments) is confidential and/or
privileged. It is to be used by the intended recipients only. If
you have received it by mistake please notify the sender by return
e-mail and delete this message from your system. Any unauthorized
use or dissemination of this message in whole or in part is
strictly prohibited. Please note that e-mails are inherently
insecure and susceptible to change. The Royal Bank of Scotland
Group, plc ("RBS") and its US subsidiaries, and affiliates and
subsidiary undertakings, including but not limited to, RBS plc New
York and Connecticut Branches, RBS Securities Inc., ABN AMRO Bank
N.V. New York and Chicago Branches and, ABN AMRO Incorporated,
Citizens Financial Group, Inc. and RBS Citizens, N.A., shall not be
liable for the improper or incomplete transmission of the
information contained in this communication or Attachment nor for
any delay in its receipt or damage to your system. RBS does not
guarantee that the integrity of this communication has been
maintained nor that this communication is free of viruses,
interceptions or interference. RBS and its subsidiaries and
affiliates do not guarantee the accuracy of any email or
attachment, that an email will be received or that RBS or its
affiliates and subsidiaries will respond to an email.
RBS makes no representations that any information contained in this
message (including any attachments) are appropriate for use in all
locations or that transactions, securities, products, instruments
or services discussed herein are available or appropriate for sale
or use in all jurisdictions, or by all investors or counterparties.
Those who utilize this information do so on their own initiative
and are responsible for compliance with applicable local laws or
regulations.********************************************************************
15 years, 7 months
Re: Drools performance issue
by Mark Proctor
Please send these emails to the user list (in cc) so everyone can help,
not directly to me.
Mark
jayadevan m wrote:
>
> Hi
>
> We have one performance(memory) issue in drools-5
>
> Our Scenario
>
> We have 3 entities
>
> Trip - Entity representing details about trip
>
> Driver - Entity for driver , it contain details about driver
>
> Assignments - details about each assignments (one driver may assigned
> to many trip)
>
> The rule is to find ,"Find overlapping between trip assignments"
>
> For Implementing this we take the Trip ,Driver And Assignments
> entities from Data base and put it into working memory
>
> For Small number of records this rule work well ,
>
> But we want to check it against 15000 driver ,331176 assignments and
> 12745 trips
>
> In that case it take huge amount of time for execution (rule firing )
>
>
>
> Rule is
>
> rule "Assignment Check"
>
> when
>
> $creVo: DriverAssignVO($drId: driverId ,$tid: tripId);
>
> $tripAssignment: TripVO(
>
> $tpid: tripId,
>
> $startDtmUtc: startDtmUtc,
>
> $endDtmUtc: endDtmUtc)
>
> and
>
> $trvo: TripVO(
>
> tripId != $tpid,
>
> tripId in ($tid),
>
> ((startDtmUtc >= $startDtmUtc &&
> startDtmUtc <= $endDtmUtc) ||
>
> (endDtmUtc >= $startDtmUtc && endDtmUtc <=
> $endDtmUtc)));
>
> $crvo: DriverAssignVO($drvrId: driverId , driverId ==
> $drId , tripId != $tid, tripId == $tpid)
>
> then
>
> System.out.println("TRIP ID: " + $crvo.getTripId());
>
> end
>
>
>
> thanks and regards
>
15 years, 7 months