[jboss-jira] [JBoss JIRA] (DROOLS-1576) Intermittently Rule getting executed Twice while using Agenda Groups and Order

Anjali Patil (JIRA) issues at jboss.org
Mon Jun 5 12:44:00 EDT 2017


    [ https://issues.jboss.org/browse/DROOLS-1576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416406#comment-13416406 ] 

Anjali Patil commented on DROOLS-1576:
--------------------------------------

Hi [~mfusco],
As mentioned by Siyad "Intermittently Rule getting executed Twice while using Agenda Groups".  

Couple of rule executions may be needed to duplicate this issue.
You will have to change the "FeeRate" value for the fact listed below
    fee = new Fee();
    fee.setFeeAgreeID(new BigDecimal(2));
    fee.setFeeCode("CR");;
    fee.setCalcType("FLAT");
    fee.setFeeRate(new BigDecimal(-50));

If you notice "OUTPUT_RULESFIRED" in the “First Execution Result.txt” the "CreatePSRLCreditCharges " rule was executed/fired twice.

[~siyadmhd]

> Intermittently Rule getting executed Twice while using Agenda Groups and Order
> ------------------------------------------------------------------------------
>
>                 Key: DROOLS-1576
>                 URL: https://issues.jboss.org/browse/DROOLS-1576
>             Project: Drools
>          Issue Type: Bug
>            Reporter: Siyad Theyparambil Mohammed
>            Assignee: Mario Fusco
>         Attachments: CreateDedCharges-Rule.txt, CreateFLATFeeCharges-Rule.txt, CreatePSRLCreditCharges-Rule.txt, CreateRPERFeeCharges-Rule.txt, Drools-1576.zip, Drools-1576_Mario.zip, First Execution Result.txt, Second Execution Result.txt
>
>
> Hi,
> We have 4 rules which are divided into 2 agenda groups 
> ||Rule||Agenda Group||
> |CreateRPERFeeCharges|createcharges|
> |CreateFLATFeeCharges|createcharges|
> |CreateDedCharges|createcharges|
> |CreatePSRLCreditCharges|postrule|                  	
> 	
> Focus is set on the agenda group in the following order,
> 1.	postrule
> 2.	createcharges 
> The Rule “CreatePSRLCreditCharges” has named consequences.  Based on the accumulated Charge amount we want one of the two consequence to be executed.  If you notice the “First Execution Result.txt” this rule was executed twice once for the “IF” and second for “ELSE” but during the second trigger of the rule execution it fired the rule only once with the same data. Could you please look/check and let us know if we have an issue with the rule or is this a bug in drools?
>                 
> We have attached the all the 4 drls and the results of the 2 execution that was triggered.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jboss-jira mailing list