You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yesamer (via GitHub)" <gi...@apache.org> on 2024/03/19 13:11:05 UTC
[I] Invalid DMN generated XML [incubator-kie-issues]
yesamer opened a new issue, #1017:
URL: https://github.com/apache/incubator-kie-issues/issues/1017
The DMN generated by the editor has a wrong order of tags, so it fails server-side validation. e.g.
```
<?xml version="1.0" encoding="UTF-8" ?>
<definitions xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:kie="https://kie.org/dmn/extensions/1.0"
expressionLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/"
namespace="https://kie.org/dmn/_2EB804A4-F189-4760-B5EE-958E8A9B0698"
id="_37767BAF-637D-4335-8B04-C49751F65C8B"
name="DMN_B927F160-91C2-4323-9D93-2786F1515F93">
<itemDefinition id="_F93DAF7C-EB5C-4B55-8AF7-93F8930FC1D7" name="tNumbers" isCollection="true" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">
<typeRef>number</typeRef>
</itemDefinition>
<itemDefinition id="_4C0B617F-B4B4-470F-8D25-352B776CD471" name="Insert a name" isCollection="false" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">
<typeRef>Any</typeRef>
</itemDefinition>
<decision name="listreplacenumbers" id="_C45AC76B-980D-4704-8A2D-F5F39C139A27">
<variable name="listreplacenumbers" id="_65D489B8-1B51-46AB-BD8D-AB6584F9984F" typeRef="tNumbers" />
<literalExpression id="_B11FC270-1577-48C0-BE1F-76C87937E921" label="listreplacenumbers" typeRef="tNumbers">
<text>list replace ( [2, 4, 7, 8], 3, 6)</text>
</literalExpression>
</decision>
<dmndi:DMNDI>
<dmndi:DMNDiagram id="_232368C2-CEDD-4012-9663-4534E8E377A6" name="Default DRD" useAlternativeInputDataShape="false">
<!-- <dmndi:DMNShape id="_90912CA8-C0FA-4C44-9253-AF12E4F81EBA" dmnElementRef="_C45AC76B-980D-4704-8A2D-F5F39C139A27" isCollapsed="false" isListedInputData="false">-->
<!-- <dc:Bounds x="300" y="240" width="160" height="80" />-->
<!-- </dmndi:DMNShape>-->
<di:extension>
<kie:ComponentsWidthsExtension>
<kie:ComponentWidths dmnElementRef="_B11FC270-1577-48C0-BE1F-76C87937E921">
<kie:width>190</kie:width>
</kie:ComponentWidths>
</kie:ComponentsWidthsExtension>
</di:extension>
<dmndi:DMNShape id="_90912CA8-C0FA-4C44-9253-AF12E4F81EBA" dmnElementRef="_C45AC76B-980D-4704-8A2D-F5F39C139A27" isCollapsed="false" isListedInputData="false">
<dc:Bounds x="300" y="240" width="160" height="80" />
</dmndi:DMNShape>
</dmndi:DMNDiagram>
</dmndi:DMNDI>
<!-- <itemDefinition id="_F93DAF7C-EB5C-4B55-8AF7-93F8930FC1D7" name="tNumbers" isCollection="true" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">-->
<!-- <typeRef>number</typeRef>-->
<!-- </itemDefinition>-->
<!-- <itemDefinition id="_4C0B617F-B4B4-470F-8D25-352B776CD471" name="Insert a name" isCollection="false" typeLanguage="https://www.omg.org/spec/DMN/20230324/FEEL/">-->
<!-- <typeRef>Any</typeRef>-->
<!-- </itemDefinition>-->
</definitions>
```
(commented tags: originally created by editor, wrong place)
[XSD](https://github.com/apache/incubator-kie-drools/blob/4004fe9bf745c5eae18223cd1d3a42d8efd4566e/kie-dmn/kie-dmn-validation/src/main/resources/org/kie/dmn/validation/org/omg/spec/DMN/20230324/DMN15.xsd) excerpt: the sequence definition dictate the order of the elements
```
<xsd:complexType name="tDefinitions">
<xsd:complexContent>
<xsd:extension base="tNamedElement">
<xsd:sequence>
<xsd:element ref="import" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="itemDefinition" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="drgElement" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="elementCollection" type="tElementCollection" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="businessContextElement" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="dmndi:DMNDI" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-issues]
Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento closed issue #1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON
URL: https://github.com/apache/incubator-kie-issues/issues/1017
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org