I have segregated my rules in two ruleflow-groups 1. mandatoryRulesGroup and
2. businessRulesGroup, and I want to use them in same given order.
details is below
-------------------------------------------------------------------------------------------
1. #business rule: 09
rule "Earth Station attached to uplinked carriers"
ruleflow-group "mandatoryRulesGroup"
when
$es: EarthStation($esId: id, $esPolarizationId:
earthStationType.feedPolarisationTypeUUIDRef.id)
$cxr: Carrier( $cxrId: id, $cxrPtxpId: potentialTransponderUUIDRef.id)
CarrierCarrierTransmitEarthStationCrossAggregateUUIDAssociation(earthStationId
== $esId)
from $cxr.carrierTransmitEarthStationAssociations
then
insert(new EsLinkedUplinkCxr($es, $cxr)); //
end
--------------------------------------------------------------------------------------------------
2. Rule "Carriers transmitted to transponders on same satellite"
ruleflow-group "businessRulesGroup"
when
$cxr: Carrier()
then
System.out.println("Carriers transmitted fired");
end
-------------------------------------------------------------------------
the problem is if I add only carriers fact then second group execute, but if
I add earth station and Carriers fact second group doesn't execute. looks
like only one group executes
my test file is like below
-------------------------------------------------------------------------------------------------
kbuilder.add(ResourceFactory.newClassPathResource("mandatoryRules.drl"),
ResourceType.DRL);
kbuilder.add(ResourceFactory.newClassPathResource("businessRules.drl"),
ResourceType.DRL);
kbuilder.add(ResourceFactory.newClassPathResource("ruleFlowProcess.bpmn"),
ResourceType.BPMN2);
kSession.insert(testData.cxrRxesTxpSatCons003); //Carrier1
kSession.insert(testData.cxrHpaLimitCons1004); // Carrier2
kSession.insert(testData.esRxesTxpSatCons001);// EarthStation(If I
add this businessRulesGroup not fired!!)
kSession.startProcess("ruleFlowProcess");
kSession.fireAllRules(new AgendaFilter() {........});
-----------------------------------------------------------------------------------------
ruleFlow.bpmn:
<process processType="Private" isExecutable="true"
id="ruleFlowProcess"
name="ruleFlowProcess" tns:packageName="ruleFlowProcess" >
<startEvent id="_1" name="Start" />
<businessRuleTask id="_2" name="graphBuilderRuleTask"
g:ruleFlowGroup="graphBuilderRulesGroup" >
</businessRuleTask>
<businessRuleTask id="_4" name="mandatoryRuleTask"
g:ruleFlowGroup="mandatoryRulesGroup" >
</businessRuleTask>
<businessRuleTask id="_5" name="businessRuleTask"
g:ruleFlowGroup="businessRulesGroup" >
</businessRuleTask>
<endEvent id="_6" name="End" >
<terminateEventDefinition/>
</endEvent>
<businessRuleTask id="_7" name="filterRulesTask"
g:ruleFlowGroup="filterRulesGroup" >
</businessRuleTask>
---------------
------------------------------------
I am not able to figure out why both groups not are not being executed even
after I am inserting data to satisfy all of the rules.
I would be grateful, if someone could help me to get the clue.
Thanks very much.
-Ravi
--
View this message in context:
http://drools.46999.n3.nabble.com/drools-process-flow-not-firing-all-rule...
Sent from the Drools: User forum mailing list archive at
Nabble.com.