[
https://issues.jboss.org/browse/DROOLS-2950?page=com.atlassian.jira.plugi...
]
Guilherme Carreiro commented on DROOLS-2950:
--------------------------------------------
[~jomarko],
This ticket was created because of this comment:
https://github.com/kiegroup/kie-wb-common/pull/2079#discussion_r214376324
..the _QName_ was being instantiated like this: {{new QName(FEEL.getUri(),
record.getType(), FEEL.getPrefix());}}
However, [~manstis] alerted me regarding the importance of looking-up the real prefix. So,
the proposed pull request introduces the `ItemDefinitionUtils#normaliseTypeRef` method to
solve the issue (that's based on this method
https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-dmn/k...).
One thing you can do to check if the prefix is being correctly fetched is to change it in
the {{definitions}} tag, by replacing the attribute from:
{{xmlns:feel="http://www.omg.org/spec/FEEL/20140401"}}
to:
{{xmlns:cheese="http://www.omg.org/spec/FEEL/20140401"}}
Then, you can update a Data Type (like {{tCity.uuid}}) from {{String}} to {{Number}}.
You're going to notice that the DMN file will be change from:
{{<dmn11:typeRef>feel:string</dmn11:typeRef>}}
to:
{{<dmn11:typeRef>cheese:number</dmn11:typeRef>}}
..because the new prefix was fetched ;-)
[DMN Editor] Custom data-types - ItemDefinitionRecordEngine - The
QName instance should lookup the real prefix from the URI
---------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-2950
URL:
https://issues.jboss.org/browse/DROOLS-2950
Project: Drools
Issue Type: Bug
Components: DMN Editor
Affects Versions: 7.11.0.Final
Reporter: Guilherme Carreiro
Assignee: Guilherme Carreiro
Labels: drools-tools
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)