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

Mario Fusco (JIRA) issues at jboss.org
Mon Jun 5 12:26:00 EDT 2017


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

Mario Fusco commented on DROOLS-1576:
-------------------------------------

I put your sources in a project (having all of them in a flat archive is not very helpful) and attached it here. When I run this project I always obtain the same following result:

{code}
OUTPUT_OUTFACTS
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=PM, chargeType=Fee, chargeRate=2.5, chargeQuantity=70, chargeAmount=175.0]
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=TM, chargeType=Fee, chargeRate=3.5, chargeQuantity=30, chargeAmount=105.0]
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=TM, chargeType=Ded, chargeRate=1, chargeQuantity=-100, chargeAmount=-100]
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=PM, chargeType=Ded, chargeRate=1, chargeQuantity=-100, chargeAmount=-100]
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=CR, chargeType=Fee, chargeRate=-50, chargeQuantity=1, chargeAmount=-50]
	Charge [chargeID=null, busSoldID=null, feeID=null, chargeCode=PQ, chargeType=Fee, chargeRate=30, chargeQuantity=1, chargeAmount=30]
OUTPUT_INFACTS
	Fee [feeID=null, feeAgreeID=1, busSoldID=null, feeCode=PM, fundCode=null, feeSource=null, freq=null, payMethod=null, isAutoAdjust=null, calcType=RPER, feeRate=2.5, applyTo=null]
	Fee [feeID=null, feeAgreeID=1, busSoldID=null, feeCode=TM, fundCode=null, feeSource=null, freq=null, payMethod=null, isAutoAdjust=null, calcType=RPER, feeRate=3.5, applyTo=null]
	Fee [feeID=null, feeAgreeID=2, busSoldID=null, feeCode=CR, fundCode=null, feeSource=null, freq=null, payMethod=null, isAutoAdjust=null, calcType=FLAT, feeRate=-50, applyTo=null]
	Stats [busSoldID=null, statCode=PM, fundCode=null, statSource=null, statType=Fee, Qty=70, MEA=null, AQA=null, AMA=null]
	Stats [busSoldID=null, statCode=PM, fundCode=null, statSource=null, statType=Ded, Qty=-100, MEA=null, AQA=null, AMA=null]
	Stats [busSoldID=null, statCode=TM, fundCode=null, statSource=null, statType=Fee, Qty=30, MEA=null, AQA=null, AMA=null]
	Stats [busSoldID=null, statCode=TM, fundCode=null, statSource=null, statType=Ded, Qty=-100, MEA=null, AQA=null, AMA=null]
OUTPUT_RULESFIRED
	CreateRPERFeeCharges
	CreateRPERFeeCharges
	CreateDedCharges
	CreateDedCharges
	CreateFLATFeeCharges
	CreatePSRLCreditCharges
{code}

I have no clue if this is the correct/expected result, but however it is consistent at each run. Please modify my project and reattach it in order to make the error evident.

> 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