Thanks W,
From: laune [via Drools] [mailto:ml-node+s46999n4028466h89@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-tp4028463p40...
To start a new topic under Drools: User forum, email
ml-node+s46999n47000h43@n3.nabble.com<mailto:ml-node+s46999n47000h43@n3.nabble.com>
To unsubscribe from Drools, click
here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=...;.
NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=...
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-accumulate-Map-tp4028463p40...
Sent from the Drools: User forum mailing list archive at
Nabble.com.