[rules-users] accumulate Map()

grules gshrestha at tmghealth.com
Mon Mar 3 15:36:54 EST 2014


Thanks W,

From: laune [via Drools] [mailto:ml-node+s46999n4028466h89 at n3.nabble.com]
Sent: Monday, March 03, 2014 3:34 PM
To: Gopu Shrestha
Subject: Re: [rules-users] accumulate Map()

Is there an
   import java.util.Map
   import java.util.HashMap
in the DRL?
-W

On 03/03/2014, Gopu Shrestha <[hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=0>> 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: [hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=1>
> [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=2>] 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 <[hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=3>> 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
> [hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=4>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> [hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=5>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=4028466&i=6>
https://lists.jboss.org/mailman/listinfo/rules-users

________________________________
If you reply to this email, your message will be added to the discussion below:
http://drools.46999.n3.nabble.com/rules-users-accumulate-Map-tp4028463p4028466.html
To start a new topic under Drools: User forum, email ml-node+s46999n47000h43 at n3.nabble.com<mailto:ml-node+s46999n47000h43 at n3.nabble.com>
To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=46999&code=Z3NocmVzdGhhQHRtZ2hlYWx0aC5jb218NDY5OTl8LTQ5MTIwOTgwMg==>.
NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-accumulate-Map-tp4028463p4028467.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140303/c97b980d/attachment-0001.html 


More information about the rules-users mailing list