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" <[email protected]> To: <[email protected]> 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 > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
