[rules-users] Rule Compilation error

Michael Epstein mepstein at symark.com
Wed Oct 3 14:32:57 EDT 2007


Hi,

I have a JBRMS question. I have DSL that I am using, when I build a rule in
the guided editor that uses the DSL it works fine. When I use the business
rule text edit, the same [when] fails validation.

Here is the error:

	Rule Compilation error Expression "smcUnit" is not an rvalue Unknown
variable or type "smcUnit" Expression "smcUnit" is not an lvalue Unknown
variable or type "smcUnit" A method named "setSmcUnitId" is not declared in
any enclosing class nor any supertype, nor through a static import
Expression "smcUnit" is not an rvalue Expression "smcUnit" is not an rvalue
Expression "smcUnit" is not an rvalue Unknown variable or type "smcUnit"
Unknown variable or type "smcUnit" Expression "smcUnit" is not an rvalue
Expression "smcUnit" is not an rvalue Expression "smcUnit" is not an rvalue
Unknown variable or type "smcUnit" Exception:14 error(s) while compiling
unit "com/symark/smc/Rule_test2_0.java"

Here is the DSL:

[when]There is a Log=LogStartStop()
[when]- runUserId with a command run by user: '{id}'=runUserId == "{id}"
[when]- submitUserId with a command submitted by user: '{id}'=submitUserId
== "{id}"
[when]- runHostId with a command run on host: '{id}'=runHostId == "{id}"
[when]- submitHostId with a command submitted from host: '{id}'=submitHostId
== "{id}"
[then]Assign to unit with id: '{id}' =  smcUnit = new SmcUnit() ;
smcUnit.setSmcUnitId("{id}") ; insert(smcUnit ) ;

And finally here is the rule:

when
	There is a Log
		- runUserId with a command run by user: 'smc_app_elton'
then
Assign to unit with id: '1'

Any help would be greatly appreciated.

Thanks,
Mike




More information about the rules-users mailing list