【问题标题】:DMN-02003 Unable to transform decisions Caused by: org.xml.sax.SAXException: cvc-elt.1.a: Cannot find the declaration of element 'definitions'DMN-02003 无法转换决策原因:org.xml.sax.SAXException:cvc-elt.1.a:找不到元素“定义”的声明
【发布时间】:2021-11-28 05:01:44
【问题描述】:

我正在部署由 camunda modeller (4.2.0) 创建的简单 dmn 文件:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" id="Definitions_0sib65s" name="DRD" namespace="http://camunda.org/schema/1.0/dmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
  <decision id="Decision_1qnsi7h" name="Decision 1">
    <informationRequirement id="InformationRequirement_1n68q12">
      <requiredInput href="#InputData_0cvdsfu" />
    </informationRequirement>
    <decisionTable id="DecisionTable_1o6i63n">
      <input id="Input_1">
        <inputExpression id="InputExpression_1" typeRef="string">
          <text></text>
        </inputExpression>
      </input>
      <output id="Output_1" typeRef="string" />
    </decisionTable>
  </decision>
  <inputData id="InputData_0cvdsfu" />
  <dmndi:DMNDI>
    <dmndi:DMNDiagram>
      <dmndi:DMNShape dmnElementRef="Decision_1qnsi7h">
        <dc:Bounds height="80" width="180" x="160" y="100" />
      </dmndi:DMNShape>
      <dmndi:DMNShape id="DMNShape_0cj7rh9" dmnElementRef="InputData_0cvdsfu">
        <dc:Bounds height="45" width="125" x="198" y="298" />
      </dmndi:DMNShape>
      <dmndi:DMNEdge id="DMNEdge_17tvn8k" dmnElementRef="InformationRequirement_1n68q12">
        <di:waypoint x="261" y="298" />
        <di:waypoint x="250" y="200" />
        <di:waypoint x="250" y="180" />
      </dmndi:DMNEdge>
    </dmndi:DMNDiagram>
  </dmndi:DMNDI>
</definitions>

但它失败并出现错误:

java.lang.RuntimeException: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'Deployment of Process Application application' => 'Deployment of process archive 'null': ENGINE-22004 Unable to transform DMN resource 'bpmn/diagram_1.dmn'.
...
Caused by: org.xml.sax.SAXException: Error: URI=null Line=2: cvc-elt.1.a: Cannot find the declaration of element 'definitions'.

通过具有依赖关系的标准 Spring Boot 项目中的资源进行部署:

<dependency>
    <groupId>org.camunda.bpm.springboot</groupId>
    <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
    <version>3.4.0</version>
</dependency>

这个错误确实在网上多次出现:

  • camunda forum itself 上,用户不知道他如何/是否解决了这个问题。
  • 其他搜索result也没有答案。
  • 一般查看“找不到元素声明”错误 (fe here on SE) 我没有看到 dmn 文件有任何问题 - 它具有默认 xmlns="https://www.omg.org/spec /DMN/20191111/MODEL/" 以及 namespace="http://camunda.org/schema/1.0/dmn" 正确声明 AFAIK。
  • Here 建议更改命名空间,所以我使用

以相同方式创建和部署的 BPMN 文件可以正常工作!它们有点不同 - ...

【问题讨论】:

    标签: spring-boot camunda camunda-modeler


    【解决方案1】:

    DMN 标准已升级到 1.3 版,因此命名空间有所不同。您使用的是相当旧的模型/版本。尝试升级。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多