[rules-users] DSL Build Problem

Wolfgang Laun wolfgang.laun at gmail.com
Wed Feb 8 02:09:56 EST 2012


The error is raised during DRL compilation - so it is not a DSL build problem.

If you use the resulting DRL line instead of the DRL phrase "Write
qualifyingPoints..."
by prefixing it with '>' you should see the same error.

Do you have the same Drools runtime in the classpath for RSA and Eclipse,
especially the MVEL jar?

Not causing your problem, but it would be healthier to call the setter:
modify (Result){ setQualifyingPoints($var01 * $var02) };

-W

On 07/02/2012, John Peterson <john.peterson.gv3k at statefarm.com> wrote:
> I'm looking for a little help on a problem we can't figure out with some DSL
> errors during a build.  We're working with version 5.3.0.Final on RSA 7.5.5.
>
> The offending line of DSL is on the rule is:
>
> Write qualifyingPoints on Result as $var01 * $var02
>
> $var01 and $var02 are variables set in the WHEN part of this rule.
>
> The offending line of code is translating to:
>
> modify (Result){qualifyingPoints = $var01 * $var02};
>
> When I execute the program that calls this rule, if fails during the build
> process with the following:
>
> Unable to Analyse Expression @Modify with (Result){qualifyingPoints = $var01
> * $var02 };
>  [Error: java/lang/String.isEmpty()Z]
> [Near : {... @Modify with (Result){qualifyingPt ....}]
>                      ^
> [Line: 1, Column: 9] : [Rule name=Qualifying Points rule 1']
>
> If I modify the code to use an assignment and update instead of modify, it
> will build without an error:
>
> Result.setQualifyingPoints(  $var01 * $var02 );update (Result);
>
> Note that we only see this behavior on RSA.  We do not see it on Eclipse
> (but we need to use RSA).
>
> I didn't find anything online so I thought I'd check to see if this is
> something someone has seen before.
>
> Thanks!
>
>
>



More information about the rules-users mailing list