[rules-users] How to update facts in Script task (RuleFlow)

joeyoungkc joeyoungkc at yahoo.ca
Wed Aug 10 12:42:25 EDT 2011


Hi, 

I'm trying to update the facts before a flowgroup and after a script
task(written in java).  I was thinking of calling update(myFact) inside the
script task, but how do I call it?

Do I need to press in the session to the parameter map and call
session.update(FactHandle handle,           Object object)??
--------------------------------------------------
StatefulKnowledgeSession session = getKnowledgeAgent("abc")
				.getKnowledgeBase().newStatefulKnowledgeSession();
Map<String, Object> parameterMap = new HashMap<String,
Object>();
parameterMap.put("myFact",myFact);
session.insert(myFact);
session.startProcess("rruleflow", parameterMap);
session.fireAllRules();
--------------------------------------------------

I'm new to drool, please help!


--
View this message in context: http://drools.46999.n3.nabble.com/How-to-update-facts-in-Script-task-RuleFlow-tp3243175p3243175.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list