Public feed #887734

kiuma

public text v1 · immutable
Raw Edit
·published 2008-02-01 15:52 UTC
rendered paste body
I have only one compliance in session, but when I check the SegnConforme the value is 4, but should be 1.
Why?

rule "Entro lim spesa"
	salience -100
	ruleflow-group "compCalc"
	no-loop
	when
		$reportingService : ReportingService()
		$rpt : Reporting (toInclude == 0)
		$compliance : Compliance ( coRegoleCompleiance == $rpt.coRegoleCompleiance,  pdGgDtSpesa >= $rpt.daysDtSpesa )
		$complianceCalc : ComplianceCalcolate ( 
			coCircuito ==$rpt.coCircuito, 
			coIstituto ==$rpt.coIstituto, 
			start ==$rpt.start,
			finish ==$rpt.finish)
	then
		$rpt.setToInclude(1);
		$complianceCalc.addSegnConforme(1);
		update ($rpt);
		update ($complianceCalc);
end

rule "Entro lim spesa new"
	salience -150
	ruleflow-group "compCalc"
	no-loop
	when
		$reportingService : ReportingService()
		$rpt : Reporting (toInclude == 0)
		$compliance : Compliance ( coRegoleCompleiance == $rpt.coRegoleCompleiance,  pdGgDtSpesa >= $rpt.daysDtSpesa )
	then
		$rpt.setToInclude(1);
		ComplianceCalcolate cc = new ComplianceCalcolate($rpt);
		cc.addSegnConforme(1);
		insert (cc);
		update ($rpt);
end