[rules-users] discrepency between drools eclipse editor and runtime

sam prar saprar10 at gmail.com
Sat Nov 12 19:44:53 EST 2011


Hi,
I have a simple drl written using the eclipse drools editor.
-----------
package com.x.workflow
import com.x.api.dto.User;
rule "validate_user"
    when
        userX : User(getName().equals("test123"))
    then
        userX.setDescription("changed in workflow)";
        System.out.println("user is test123");
end
--------
The editor does not flag any errors, but, when I run the workflow through
my webapp, I see the following error :
Rule Compilation error : [Rule name='validate_user']
    com/x/workflow/Rule_validate_user.java (7:439) : Syntax error, insert
")" to complete Expression

904224 [tomcat-http--51] ERROR
org.activiti.engine.impl.interceptor.CommandContext  - Error while closing
command context
java.lang.IllegalArgumentException: Could not parse knowledge.
    at
org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:67)
    at
org.activiti.engine.impl.rules.RulesDeployer.deploy(RulesDeployer.java:61)


the java file Rule_validate_user.java is not written by me, in fact I
cannot locate it in my source.
It appears it is generated by drools engine.
And, I cannot find what is wrong with my drl file from the error printed.

Appreciate any pointers.
thanks
sapra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111112/5884e0b2/attachment.html 


More information about the rules-users mailing list