[rules-users] Decision table call external method
Vincent LEGENDRE
vincent.legendre at eurodecision.com
Fri May 11 09:10:28 EDT 2012
Sorry, I read too fast ...
You have addNode(...) on XMLTool ?
So you have to get a XMLTool somewhere in CONDITION or make it a global variable, or a java singleton, or link it with your service.
If you can't do all previous, then you will have to find a trick to match it in your conditions, but it will be a trick ...
----- Mail original -----
De: "Vincent LEGENDRE" <vincent.legendre at eurodecision.com>
À: "Rules Users List" <rules-users at lists.jboss.org>
Envoyé: Vendredi 11 Mai 2012 15:06:35
Objet: Re: [rules-users] Decision table call external method
In ACTION, you can use :
- static methods
- non-static method on a previous matched objects
using "addNode(...)" like this is nonsense, even in plain java
If your addNode method applies to your matched Service object (which you binded to variable "s"), use "s.addNode(...)"
Otherwise, you have to get the object in which this method is defined in order to call it
----- Mail original -----
De: "SuperGG" <jerome-m.petit at thalesgroup.com>
À: rules-users at lists.jboss.org
Envoyé: Vendredi 11 Mai 2012 14:43:06
Objet: Re: [rules-users] Decision table call external method
http://drools.46999.n3.nabble.com/file/n3979822/Sans_titre.jpg
I have this decision table.
I have a Class XMLTool which contains static fields as SICF and some methods
(non static) as addNodes(String str);
I don't find the way to use the method addNodes in my decision table.
(I import all the good classes)
I tried several stuff but no success.
I'm sure there is one good way to do it.
Thx
--
View this message in context: http://drools.46999.n3.nabble.com/Decision-table-call-external-method-tp3976910p3979822.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list