[
https://issues.redhat.com/browse/DROOLS-5973?page=com.atlassian.jira.plug...
]
Andrew K commented on DROOLS-5973:
----------------------------------
Thanks again [~tari_manga] for engaging with this.
I'd be very happy for any functionality that handles the mapping in a sensible way.
Your suggestion regarding toString() is a good one that would cover my use case well.
As you say it wouldn't handle DMN item restrictions that map to numbers, but I also
think that it's obvious enough that that situation wouldn't "just work"
- but for most use cases where the Enum can be considered equivalent to a string it should
"just work" and that's great!
Java enum values don't match DNM enumerations when input passed
as POJO
-----------------------------------------------------------------------
Key: DROOLS-5973
URL:
https://issues.redhat.com/browse/DROOLS-5973
Project: Drools
Issue Type: Feature Request
Components: dmn engine
Affects Versions: 7.48.0.Final
Reporter: Andrew K
Assignee: Matteo Mortari
Priority: Minor
Attachments: screenshot-1.png, screenshot-2.png, screenshot-3.png,
screenshot-4.png
When passing an input object into the DMN engine as a POJO, enumerations represented in
the POJO as Java enums do not correctly match DMN string enumerations.
This can be worked around by converting the input to a Map using Jackson:
{code:java}
new ObjectMapper().convertValue(pojo, Map.class){code}
but this should not be necessary.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)