[rules-users] separating .drl declare type from actual .drl rule into each own file

Michael Anstis michael.anstis at gmail.com
Thu Dec 19 03:16:07 EST 2013


You'd need the include the package header in the rule file.



On 19 December 2013 07:54, wtang <wtang at kana.com> wrote:

> Thanks David, but I am not at the code level yet.  I am using latest
> version
> 6.0.
>
> In the declares.drl I have:
>
> package com.sample
>
> declare Person
>         first : String;
>         last : String;
>         address: Address
> end
>
> in the userDeclare.drl I have a rule using Person in the when clause but it
> does not compile on the drools Ecliple plugin saying it can no resolve the
> person object.
>
> import com.sample.*
>
> rule "Hello World"
>     when
>         Person(first == "Wing")
>     then
>         System.out.println("hello");
> end
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359p4027363.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131219/17dacc4b/attachment.html 


More information about the rules-users mailing list