[rules-dev] mismatched token error.

Edson Tirelli tirelli at post.com
Fri Apr 27 10:57:04 EDT 2007


   This is a keyword clash and was fixed in trunk and in the 3.0.7 version
(still not released, so you need to download the 3.0.x branch and build it
if you want it).

    The only workaround while you don't update to one of these versions is
to refactor your package name to NOT use keywords (like 'rule').

    []s
    Edson


2007/4/18, Kolla, Sandeep <Sandeep.Kolla at gs.com>:
>
>  Hi All,
>
> *This is the DRL***
>
> package com.gs.fw.intauto.entitle.rule.facts
> import com.gs.fw.intauto.entitle.rule.facts.PersonFacts;
> expander entitlement.dsl
>
> rule "Black Berry Rule 1"
>
> salience 1
> when
> Employee with attribs
>         - Type is 'Worker'
>         - Department is 'Internal Automation'
>
>
>
> then
> Log : "Entitled"
>
> *This is The DSL*
>
> [when]Employee with attribs=PersonFacts()
> [when]- Type is '{type}'=type=='{type}'
> [when]- Department is '{department}'=department=='{department}'
> [when]- Division is '{division}'=division=='{division}'
> [when]- City is '{city}'=city=='{city}'
> [when]- User is '{kebrosId}'=kebrosId=='{kebrosId}'
> [then]Log : "{message}"=System.out.println("{message}");
>
> I am getting the following error
> org.drools.rule.InvalidRulePackage: unknown:1:34 mismatched token:
> [@12,34:37='rule',<30>,1:34]; expecting type ID
> unknown:2:33 mismatched token: [@28,79:82='rule',<30>,2:33]; expecting
> type ID
> unknown:9:0  Unable to expand: Employee with attribs. Due to Expression
> was not expandable: Employee with attribs
> unknown:10:0  Unable to expand: - Type is 'Worker'. Due to Expression was
> not expandable: - Type is 'Worker'
> unknown:11:0  Unable to expand: - Department is 'Internal Automation'. Due
> to Expression was not expandable: - Department is 'Internal Automation'
>
> unknown:10:2 Unexpected token ','
> unknown:16:0  Unable to expand: Log : "Entitled". Due to Expression was
> not expandable: Log : "Entitled"
> unknown:23:0  Unable to expand: Employee with attribs. Due to Expression
> was not expandable: Employee with attribs
> unknown:26:0  Unable to expand: - Division is 'Financial Division'. Due to
> Expression was not expandable: - Division is 'Financial Division'
>
> unknown:27:0  Unable to expand: - City is 'New York'. Due to Expression
> was not expandable: - City is 'New York'
> unknown:24:2 Unexpected token ','
> unknown:30:0  Unable to expand: Log : "Not Entitled". Due to Expression
> was not expandable: Log : "Not Entitled"
> I don't see any thing wrong with the DRL and DSL
>
> Can someone help mw with this..
>
> Thanks in advance
> Sandeep.
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20070427/2994c0d0/attachment.html 


More information about the rules-dev mailing list