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))