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

[variable mediator] Issue in variable type casting #3880

Open
GDLMadushanka opened this issue Jan 20, 2025 · 0 comments
Open

[variable mediator] Issue in variable type casting #3880

GDLMadushanka opened this issue Jan 20, 2025 · 0 comments
Labels

Comments

@GDLMadushanka
Copy link
Contributor

Description

When we specify the data-type of the variable mediator to INTEGER and give an expression. which results in a double value, variable mediator cast the type of value to integer which is expected.
But, even for a value like 8.99 its giving 8 as output.
We need to decide a proper type casting method and stick to it. Even converting 8.99 -> 8 is OK if we officially state that in docs.
If we are sticking to the existing behaviour, consider this as a doc issue and add it to the docs.

Steps to Reproduce

<variable name="book2price" type="INTEGER" expression="${payload.store.book[1].price}"/>
<log category="WARN">
     <message>${vars.book2price}</message>
</log>

Version

4.4.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant