As an update, MVEL author fixed this and will do an MVEL release soon.
When he does, we will test here and let you know, but you should be able to
simply replace MVEL jar and it will work.
[]s
Edson
2008/7/29 Edson Tirelli <[EMAIL PROTECTED]>
>
>Hi Thomas and all,
>
>Drools d
Hi Thomas and all,
Drools delegates most of the complex expression evaluation to MVEL and it
seems that it currently does not support variables as indexes in the
map/collection simplified syntax. So, it will not work for now.
The good news is that we work very close with MVEL's author and
Thanks,
but I've still Problems if I try to use
io: InputObject ( stringParameters[InputObject.Parameter.ParameterName] ==
"something")
=>Field/method 'InputObject' not found for class 'com.rules.InputObject'Rule
Compilation error
Parameter is an enum witch contains all allowed Parameters of Inp
Hi,
you can try using "eval"
when
$io:InputObject()
eval($io.getStringPropertyValue("propertyname")=="something")
then
..
2008/7/23 thomas kukofka <[EMAIL PROTECTED]>:
> Hello,
>
> I want to use a generic Input-Object for drools which can i.g. access String
> properties:
>
If you make your map available through a get, you can use simplified Map
syntax like this:
public Map getStringParameters() {
return stringParameter;
}
io: InputObject ( stringParameters["propertyname"] == "something")
[]s
Edson
2008/7/23 thomas kukofka <[EMAIL PROTECTED]>
Hello ,
I just recognized, that this doesn't work. But it is possible to use plain
Java code in the rule, also if-conditions and for and while-loops etc..
However more Java code makes the rule less readable and elegant.
Is there another possibility to use generic input objects?
Thomas
___
Hello,
I want to use a generic Input-Object for drools which can i.g. access String
properties:
private HashMap stringParameter;
with methods:
public String getStringPropertyValue(Parameter parameter) {
return stringParameter.get(parameter);
}
public void setStringPropertyVa