[
https://issues.jboss.org/browse/DROOLS-4144?page=com.atlassian.jira.plugi...
]
Michael Anstis edited comment on DROOLS-4144 at 6/7/19 7:10 AM:
----------------------------------------------------------------
{{org.kie.workbench.common.dmn.api.factory.AbstractDMNDiagramFactory}} assumes the default
XML namespace prefix is _reserved_ for the namespace of the DMN model. This works fine in
most circumstances (all circumstances of models authored with our tooling) however in the
example files the default XML namespace is used to for DMN. This is overwritten by
{{AbstractDMNDiagramFactory}} when the file is opened. This is wrong.
Furthermore {{org.kie.dmn.backend.marshalling.v1_2.xstream.XStreamMarshaller}} attempts to
read the DMN namespace prefix from the NSContext entries where the URI matches the DMN
URI. If none is found it assumes it to be an empty {{String}} and adds a default namespace
entry to the resulting XML for DMN. A match is never found as
{{AbstractDMNDiagramFactory}} set the default XML namespace to be the DMN model namespace.
Consequentially {{XStreamMarshaller}} writes two default namespaces; one for DMN and one
for the DMN model namespace as set by {{AbstractDMNDiagramFactory}}.
Ideally {{AbstractDMNDiagramFactory}} should not assume the default XML namespace is for
its exclusive use.
A workaround is to ensure the files being used set the DMN namespace prefix to {{dmn}}.
e.g. <definitions
xmlns:dmn="http://www.omg.org/spec/DMN/20151101/dmn.xsd"
../>
This would also mean the DMN XML elements in the file would need their names prefixed with
the namespace e.g. <inputData> would need to become <dmn:inputData> etc.
was (Author: manstis):
{{org.kie.workbench.common.dmn.api.factory.AbstractDMNDiagramFactory}} assumes the default
XML namespace prefix is _reserved_ for the namespace of the DMN model. This works fine in
most circumstances (all circumstances of models authored with our tooling) however in the
example files the default XML namespace is used to for DMN. This is overwritten by
{{AbstractDMNDiagramFactory}} when the file is opened. This is wrong.
Furthermore {{org.kie.dmn.backend.marshalling.v1_2.xstream.XStreamMarshaller}} attempts to
read the DMN namespace prefix from the NSContext entries where the URI matches the DMN
URI. If none is found it assumes it to be an empty {{String}} and adds a default namespace
entry to the resulting XML for DMN. A match is never found as
{{AbstractDMNDiagramFactory}} set the default XML namespace to be the DMN model namespace.
Consequentially {{XStreamMarshaller}} writes two default namespaces; one for DMN and one
for the DMN model namespace as set by {{AbstractDMNDiagramFactory}}.
Ideally {{AbstractDMNDiagramFactory}} should not assume the default XML namespace is for
its exclusive use.
A workaround is to ensure the files being used set the DMN namespace prefix to {{dmn}}.
e.g. {{<definitions
xmlns:dmn="http://www.omg.org/spec/DMN/20151101/dmn.xsd"
../>}}
[DMN Designer] Imported model is broken after saving changes
------------------------------------------------------------
Key: DROOLS-4144
URL:
https://issues.jboss.org/browse/DROOLS-4144
Project: Drools
Issue Type: Bug
Components: DMN Editor
Affects Versions: 7.24.0.Final
Reporter: Jozef Marko
Assignee: Daniel José dos Santos
Priority: Major
Labels: drools-tools
Attachments: a-2.dmn, a.dmn, error.log
When user imports some dmn model (see the attahced a.dmn and a-2.dmn) then he do some
changes and save such imported model. He is unable to reopen such model. There is error in
the server log.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)