Rule Orchestration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rule Orchestration

swaroop
This post was updated on .
Hi,

Iam using Drools 5.6 , developing rules on guvnor. I have a scenario where i have two decision tables , One is supposed to execute after the other.

I want to ensure that DT Two should be executed only after all the executions in DT one happen . Because IN DT Two the list is being checked if set of values are not present, currently when i have two Customer objects in Working memory each having matching rows in Decision Table One .Once the match is found for a customer object then as per the action a Product fact is inserted which leads to fire the DT Two and the list is evaluated if set of d are not present , the rule is fired in DT Two as the list is not populated for the other customer object and matching rows which is being checked in DT Two eval list column. Which is not desired . I tried with salience , ruleflow group with not much of a help

Is there a way to can handle this



Decision Table One

Condition     Condition           Condition                 Action
c:Customer
a==$param   b in ($param)         c == $param "list(Global Variable).add(d);
                                                                         insert(Product())"
Decision Table Two

Condition     Condition                         Condition                 Action
p:Product
a==$param   eval(list doesnt not contain ($param))         c == $param response.setMessage($param);

Any input is highly appreciated

Regards
Oggu

                                                                         
Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Rule Orchestration

manstis
Can you provide screen shots of both DT's, including their data?

It's quite difficult to understand their content from the pasted text.


On 28 April 2014 15:35, swaroop <[hidden email]> wrote:
Hi,

Iam using Drools 5.6 , developing rules on guvnor. I have a scenario where i
have two decision tables , One is supposed to execute after the other.

I want to ensure that DT Two should be executed only after all the
executions in DT one happen . Because IN DT Two the list is being checked if
set of values are not present, currently when i have two Customer objects in
Working memory each having matching rows in Decision Table One .Once the
match is found for a customer object then as per the action a Product fact
is inserted which leads to fire the DT Two and the list is evaluated if set
of d are not present , the rule is fired in DT Two as the list is not
populated for the other customer object and matching rows which is being
checked in DT Two eval list column. Which is not desired . I tried with
salience , ruleflow group with not much of a help

Is there a way to can handle this

<http://drools.46999.n3.nabble.com/file/n4029371/DTIssue.png>

*Decision Table One*

Condition            Condition             Condition                     Action
c:Customer
a==$param          b in ($param)                 c == $param    "list(Global
Variable).add(d);

insert(Product())"
*Decision Table Two*

Condition            Condition                           Condition
Action
p:Product
a==$param          eval(list doesnt not contain ($param))                c == $param
response.setMessage($param);

Regards
Oggu





--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|

Re: Rule Orchestration

swaroop
In reply to this post by swaroop
Hi ,

Please find the screen shots attached
DT One


DT Two


Let me know if this works else i will share the spreadsheets
Reply | Threaded
Open this post in threaded view
|

Re: [rules-users] Rule Orchestration

manstis
Is "prodList" a global? 

I'd be tempted to make it a regular fact inserted into Working Memory and have DT1's action update the fact after inserting the product.



On 28 April 2014 17:24, swaroop <[hidden email]> wrote:
Hi ,

Please find the screen shots attached
DT One
<http://drools.46999.n3.nabble.com/file/n4029375/1.png>

DT Two
<http://drools.46999.n3.nabble.com/file/n4029375/2.png>

Let me know if this works else i will share the spreadsheets




--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371p4029375.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users