Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DW migration does not account for Mule 3 bindings migration #492

Closed
holiday-sunrise opened this issue Apr 20, 2021 · 2 comments
Closed

DW migration does not account for Mule 3 bindings migration #492

holiday-sunrise opened this issue Apr 20, 2021 · 2 comments
Labels

Comments

@holiday-sunrise
Copy link
Contributor

The Example DataWeave Script 1.0

%dw 1.0
%output application/json
---
{
	code: outboundProperties."http.status" as :string,
	message: inboundProperties."http.reason"
}

is migrated to

%dw 2.0
output application/json  
---
{
  code: outboundProperties."http.status" as String,
  message: inboundProperties."http.reason"
}

fails at Runtime with.

<ee:message>
<ee:set-payload resource="dw/error-response.dwl"></ee:set-payload>
</ee:message>
</ee:transform>
Error type            : MULE:EXPRESSION
FlowStack             : at get:\base-articles\(articleID):api-config(get:\base-articles\(articleID):api-config/processors/4/route/0/processors/1 @ companion-articles-api-mule4:companion-articles-api.xml:195 (Transform Message))
at api-main(api-main/processors/2 @ companion-articles-api-mule4:companion-articles-api.xml:54 (APIkit Router))

  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************


********************************************************************************
Message               : "Script '%dw 2.0
output application/json  
---
{
  code: outboundProperties."http.status" as String,
  message: inboundProperties."http.reason"
} ' has errors: 
	Unable to resolve reference of outboundProperties. at 5 : 5
	Unable to resolve reference of inboundProperties. at 6 : 6" evaluating expression: "%dw 2.0
output application/json  
---
{
  code: outboundProperties."http.status" as String,
  message: inboundProperties."http.reason"
}".
Element               : (None)
Element DSL           : (None)
Error type            : MULE:EXPRESSION
FlowStack             : (None)

  (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
@afelisatti
Copy link

Hi, @holiday-sunrise. Thanks for reporting this and the clear example shared. It looks like the DataWeave migrant is not considering that outboundProperties and inboundProperties are no longer valid bindings in Mule 4 and should be referenced as vars.compatibility_outboundProperties and vars.compatibility_inboundProperties. We will review this and evaluate a fix.

@afelisatti afelisatti added the bug label Jul 15, 2021
@afelisatti afelisatti changed the title DW 1.0 is not migrated. Blocker DW migration does not account for Mule 3 bindings migration Jul 21, 2021
@holiday-sunrise
Copy link
Contributor Author

Any News

@holiday-sunrise holiday-sunrise closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants