[rules-users] Importing existing .dslr + .dsl to Guvnor

Esteban Aliverti esteban.aliverti at gmail.com
Tue Mar 15 15:52:17 EDT 2011


I think you can create an interface for your DslHelper class and upload it
to Guvnor. You will need to make its methods non-static, of course.
Then you can define a global of the interface type in your packages and use
that global in your DSLR.
In runtime you can set the implementation class as global.

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Tue, Mar 15, 2011 at 11:24 AM, wantastic <wantastic at gmail.com> wrote:

> Hello everyone,
>
>  I am a newbie to Guvnor. I have a set of .dslr files with .dsl to
> translate
> them.
> I know I can just copy and paste .dslr file and .dsl file. However, the
> problem is that
> I call external function within .dsl file and when I try to validate the
> dsl, it complains for not having the method.
>
> ex)
>
> [condition][Trade]xpathMatch "{xpath}"=trade : Trade( type ==
> Trade.TRADE_TYPE ) and eval( DslHelper.xmlContentMatches(trade, "{xpath}")
> )
>
> This is my condition and it has all models like Trade. However, it
> complains
> about not having DslHelper function. This function has so many dependencies
> that I cannot upload through POJO jar.
>
> Is there any elegant way to solve this problem?
>
>
> Thanks in advance :)
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Importing-existing-dslr-dsl-to-Guvnor-tp2681597p2681597.html
> Sent from the Drools - User 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/20110315/2cd3d87f/attachment.html 


More information about the rules-users mailing list