drools process flow not firing all rule flow group
by ravendra.gupta
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.
14 years
https://issues.jboss.org/browse/GUVNOR-579
by Sean Su
I see this case has been marked as resolved but without any comment. I am about to start a new project based on fusion but I need a UI such as guvnor. How are we supporting fusion in Guvnor? I could find reference documents on this topic.
Does anyone have experience here?
Thanks
Sean
Sent from my iPad
14 years
Using accumulate function
by sanal
Hi,
Iam trying to use the accumulate function of the drools.I need to
accumulate based on the result of a rule execution.
Eg: Suppose i have list of orders and another list of conditions
for a particular package.I need to check weather each of the order is part
of package or not.
Suppose a qty limit is set to 1 for a item in package definition and
the item is ordered 2 times.
While checking the condition, both of the item will go under package.
Actually for second record the rule should get executed based on result of
the 1 record's rule execution and so on.
So I require a looping rule execution.
How can i achive this using Drools.
Rule "Package Rate_21"
salience 65515
when
$objOrderedComponents:AccumulatedComponent()
$packageDefinition:PackageDefinition($packageId:packageId)
$accumulatedQty:Number()
from accumulate(
$accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty
: componentQty) from
$objOrderedComponents.getOrderedComponentList(),sum($AccQty ) )
$orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty)
from $objOrderedComponents.getOrderedComponentList() and
$pkgComps:PackageComponent(componentKey==$id1,(quantityLmt
>=($qty+$accumulatedQty.intValue()))) from
$packageDefinition.getPackageComponentList()
then
$orderedComponent.setIsComponentApplicable(true);
$orderedComponent.setPackageChargeRecordId($packageId);
end
Regards
Sanal.P
--
View this message in context: http://drools.46999.n3.nabble.com/Using-accumulate-function-tp3896078p389...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
Guvnor Uploads without Eclipse
by Amin Mohammed-Coleman
Hi
I am currently looking at building a custom maven task that uploads BPMN definitions from a project to a remote Guvnor installation. I was looking at the current Eclipse Guvnor plugin and noticed lots of code around Eclipse (which makes sense :)) . I was wondering whether there was any generic code that I could take a look at without using eclipse dependencies?
Any help would be appreciated.
Thanks
14 years
make the Guvnor interface into French
by freelance developpement
Hi every one,
For simplicity I must make the interface Guvnor for administration of
business rules, in French and not English under Internet Explorer or
Firefox.
Have you ant idea?
thanx in advance
14 years