Disabling strict mode in 5.4
by Joe White
How do you disable strict mode in 5.4? We are using the code below and
getting strict mode exceptions. It worked in prior versions. Do you have
to use the new APIs to disable strict mode?
PackageBuilderConfiguration pkgBuilderCfg = new
PackageBuilderConfiguration();
MVELDialectConfiguration mvelConf = (MVELDialectConfiguration)
pkgBuilderCfg.getDialectConfiguration( "mvel" );
mvelConf.setStrict(false);
mvelConf.setLangLevel(5);
PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);
builder.addPackageFromDrl(new StringReader(drlString));
An example exception:
1.
19:17:51,137|ERROR|drools.DroolsMgr|DroolsMgr.java|159|deployRulesFromMo
delForScope|org.apache.camel.spring.Main.main()|smf-rcp-SNAPSHOT|Failed
to deploy rules from model
2. com.recondotech.hre.rules.management.HRERulesManagmentException:
org.drools.rule.InvalidRulePackage: Unable to Analyse Expression
$existingValue.toLowerCase():
3. [Error: unable to resolve method using strict-mode:
java.lang.Object.toLowerCase()]
4. [Near : {... $existingValue.toLowerCase() ....}]
5. ^ : [Rule
name='PEL_CHANGELIST_RES.AUTH.Actual First Name']
Thanks
Joe
12 years, 6 months
referencing the incoming objects vs the matching object
by Ben Cuthbert
All
If I have an object say
class TestObject {
private String type;
private String name;
}
And I want to match opposite types so I fire in the following
insert(new TestObject("TYPE_1", "This is our type 1 object");
insert(new TestObject("TYPE_2", "This is our type 1 object");
So I want to say only match again opposite types
would this work?
rule "#999 Match"
dialect "mvel"
when
$incoming : TestObject($type: type)
$current : TestObject( type != $type)
then
insert(new String("LOGGING: incoming:" + $incoming.getType() + " current:" + $current.getType() ));
end
12 years, 6 months
Is it possible to select multiple enumerations?
by online.regos@gmail.com
I am using version 5.3.0.Final and would like to know if anyone knows of a way to select multiple enumerations in a guided decision table.
Using the <SHIFT> or <CNTL> keys when trying to select multiple enumerations from a drop down list does not work either.
If anyone has found a way to do this, your advice would be appreciated?
12 years, 6 months
Want to host IntelliFest (previously RuleFest)?
by Mark Proctor
IntelliFest (previously RuleFest) is currently trying to find premises
on the west coast of USA, with near by accomodation, to host 150 people
for 4 days. Interested in hosting?
If so contact me on mproctor at codehaus d0t org
12 years, 6 months
Persist JPA Entity fact in session
by Alberto R. Galdo
Hi,
We are in a fireUntilHalt during a persistent StatefulKnowledgeSession
using JTA & JPA with Hibernate ... Our session consists in a series of
facts ( well, we are not different of anyone else for that matter ... xD )
but some of our facts are also JPA @Entity . What we want is to persist
those entities on their own database tables as well as the SessionInfo each
time Drools considers the knowledge session needs to be persisted.
We are aware that Drools uses
org.drools.persistence.jpa.persist(SessionInfo) .... What would be the best
approach to get certain facts that are JPA Entities persisted along with
the Session taking advantage of the Drool's SessionInfo persistence loop?
Best regards,
Alberto R. Galdo
argaldo(a)gmail.com
12 years, 6 months