[rules-users] Flow with Rules (RuleFlowGroup): how to shareparameters/facts
Kris Verlaenen
kris.verlaenen at cs.kuleuven.be
Mon Apr 12 09:47:03 EDT 2010
Nol,
Process variables are local to your process instance. Rules work based on
data inserted in the session. So you should probably make sure your process
inserts the data in the session at the appropriate time (e.g. using an
action that does kcontext.getKnowledgeRuntime().insert(..).
Kris
----- Original Message -----
From: "Nol de Wit" <noldewit at gmail.com>
To: <rules-users at lists.jboss.org>
Sent: Wednesday, April 07, 2010 4:32 PM
Subject: [rules-users] Flow with Rules (RuleFlowGroup): how to
shareparameters/facts
> (using Flow and Rules 5.0)
>
> In a small pilot we are considering to replace part of the work in
> some of the subprocesses with rules. I can't seem to figure out how to
> transport the parameters within the flow to the data the rules should
> act upon.
>
> In the Flow-only model, parameters are added as a parametermap at the
> point the flow is started using:
>
> parameterMap.put("report", report);
> ksession.startProcess("myModule", parameterMap);
>
> A 'standalone' rule model is given its data by feeding it some 'facts'
> using:
> ksession.insert(report);
> ksession.fireAllRules();
> (..right? Haven't done to much of that, but I believe that is the way
> it is done)
>
> So if I combine Flows and Rules (using RuleFlowGroup), how do I make
> sure the rules are given the correct data? My data (report) first
> needs to go through a couple of flow actions, next through an XOR, of
> which each output is connectedand then after each XOR output contraint
> a
>
> Currently I still use the first option, but the rules don't get fired
> (the flow is started, and runs untill the RuleFlowGroup....). If I add
> a ksession.fireAllRules() I see no difference.
>
> Thanks,
> Nol
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the rules-users
mailing list