[rules-users] accumulate Map()
Wolfgang Laun
wolfgang.laun at gmail.com
Mon Mar 3 15:33:18 EST 2014
Is there an
import java.util.Map
import java.util.HashMap
in the DRL?
-W
On 03/03/2014, Gopu Shrestha <gshrestha at tmghealth.com> wrote:
> Sorry, Here is the complete code:
>
> rule "map accumulate"
>
> when
> $headers : Map() from accumulate(RulesHeader($headerName : name in
> ("some_ErrorInfo"), $headerValue : valueAsString not in (null, "")),
> init(Map headers = new HashMap();)
> action(headers.put($headerName, $headerValue);)
> result(headers))
> then
> log.info("Executing rule map accumulate ....");
>
> end
>
> Error:-------------------------------
>
> Unable to resolve ObjectType 'Map'
> Error while executing rules ::: Errors encountered in rules package :
> Unable to resolve ObjectType 'Map' : [Rule name='map accumulate']
>
> Error while executing rules
> java.lang.RuntimeException: Errors encountered in rules package :
> Unable to resolve ObjectType 'Map' : [Rule name='map accumulate']
>
>
>
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Wolfgang Laun
> Sent: Monday, March 03, 2014 3:25 PM
> To: Rules Users List
> Subject: Re: [rules-users] accumulate Map()
>
> Guessing game time, huh?
>
>
> On 03/03/2014, Gopu Shrestha <gshrestha at tmghealth.com> wrote:
>> This accumulate is not working.. any advice?
>>
>> $headers : Map() from accumulate(RulesHeader($headerName : name in (
>> "some_ErrorInfo"), $headerValue : valueAsString not in
>> (null, "")),
>> init(Map headers = new HashMap();)
>> action(headers.put($headerName, $headerValue);)
>> result(headers))
>>
>>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list