How to update facts in Script task (RuleFlow)
by joeyoungkc
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-Rule...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
How to rethrow Exceptions from Drools 5 functions
by Matthew Erler
I would like to write a utility function that works with java.text.SimpleDateFormat and several more date-related Java classes. The classes can throw Exceptions that the function caller should know about. Is it possible for a function to be declared such that it can throw any Exception back to the caller?
13 years, 3 months
How to deal with Set inside another Set?
by joeyoungkc
I have three classes
Master()
private Set<Header> Headers;
----------------------------
Header()
private Set<Line> Lines;
----------------------------
Line()
private String name;
----------------------------
Master() is the facts. In my spreadsheet I would like to check the line
name == "abc". How do I do that.
Here is what I got but it cause type mismatched error!! please help.
Master()
$h: Headers
$L : $h.Lines
m: Line(<generated by condition header>) from $L
Please help!!
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-deal-with-Set-inside-another-Set...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
RuleAgent - loading rules help ?
by Ivan Peshev ( M-Tel )
Hello,
Is there a way to tell RuleAgent to load rules not only from remote URL ?
i.e. some rules from URL and some rules from LOCAL path on my computer.
(e.g.: c:\some\folder\rule.drl)
Or if it's not possible exactly that way is there another way to have some rules loaded from URLs and some rules loaded from local path ?
Best Regards
Ivan
13 years, 3 months