You can simplify the "ignore case" for the keyword:
    [keyword][](?i:func checkIfVia)=...

You should write the entire function as the right hand side. Take care to
escape '{' and '}':
...=function boolean checkIfVia(Route route, String locationCode) \{ if
(route != null) \{ Via[] viaArr = route.getViaArray();  for(int i=1; i <
viaArr.length; i++)   if (
viaArr[i].getLocationCode().equalsIgnoreCase(locationCode) ) return true;
\} return false; \}

5.2.0 permit line breaks on the right hand side of DSL definitions.
-W


On 31 May 2011 07:43, Bala <[email protected]> wrote:

> Thanks Wolfgang..
> Should it be the same way, i have splited the function into blocks in DSL
> Mapping??
> I am more concerned about writing the function mapping in DSL since writing
> these functions in java requires compilation and redeployment in server.
>
> -Bala
>
>
>
>
> -----
> Thanks,
> Bala
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Clarification-needed-in-writing-DSL-function-mapping-tp3002064p3004691.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to