gpt4 book ai didi

java - Flowable:CMMN 建模器转换 CasePlanModel 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 10:11:34 31 4
gpt4 key购买 nike

我已经通过 Apache tomcat 部署了 Flowable 6.3.1。尝试对以下模型进行建模时,Flowable BpmnJsonConverter(顺便说一句,我不知道它与 CMMN 建模有什么关系)会抛出 NullPointerExceptionCMMN model

生成的xml如下。

    <?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/CMMN/20151109/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:flowable="http://flowable.org/cmmn" xmlns:cmmndi="http://www.omg.org/spec/CMMN/20151109/CMMNDI" xmlns:dc="http://www.omg.org/spec/CMMN/20151109/DC" xmlns:di="http://www.omg.org/spec/CMMN/20151109/DI" targetNamespace="http://www.flowable.org/casedef">
<case id="holidayRequest" name="HolidayRequest" flowable:initiatorVariableName="initiator">
<casePlanModel id="casePlanModel" flowable:formKey="requestHoliday">
<planItem id="planItem1" name="checkRequest" definitionRef="sid-0F1F1EF4-7661-4CC8-9AD7-4F2566DF989C">
<entryCriterion id="sid-43F0EC01-FD2F-417C-9CC7-46F0F3141D40" sentryRef="sentry1"></entryCriterion>
</planItem>
<planItem id="planItem2" name="isCheckNeeded" definitionRef="sid-C7C05BD3-1D12-4060-9AE8-FD5E4CB9DF94">
<itemControl>
<requiredRule></requiredRule>
</itemControl>
</planItem>
<sentry id="sentry1">
<ifPart>
<condition><![CDATA[${decisionNeeded == "true"}]]></condition>
</ifPart>
</sentry>
<humanTask id="sid-0F1F1EF4-7661-4CC8-9AD7-4F2566DF989C" name="checkRequest" flowable:candidateUsers="admin,boss" flowable:formKey="checkHoliday"></humanTask>
<decisionTask id="sid-C7C05BD3-1D12-4060-9AE8-FD5E4CB9DF94" name="isCheckNeeded" isBlocking="false">
<extensionElements>
<flowable:field name="decisionTaskThrowErrorOnNoHits">
<flowable:string><![CDATA[false]]></flowable:string>
</flowable:field>
</extensionElements>
</decisionTask>
</casePlanModel>
</case>
<cmmndi:CMMNDI>
<cmmndi:CMMNDiagram id="CMMNDiagram_holidayRequest">
<cmmndi:CMMNShape id="CMMNShape_casePlanModel" cmmnElementRef="casePlanModel">
<dc:Bounds height="424.0" width="580.0" x="40.0" y="40.0"></dc:Bounds>
<cmmndi:CMMNLabel></cmmndi:CMMNLabel>
</cmmndi:CMMNShape>
<cmmndi:CMMNShape id="CMMNShape_planItem1" cmmnElementRef="planItem1">
<dc:Bounds height="80.0" width="100.0" x="300.0" y="180.0"></dc:Bounds>
<cmmndi:CMMNLabel></cmmndi:CMMNLabel>
</cmmndi:CMMNShape>
<cmmndi:CMMNShape id="CMMNShape_sid-43F0EC01-FD2F-417C-9CC7-46F0F3141D40" cmmnElementRef="sid-43F0EC01-FD2F-417C-9CC7-46F0F3141D40">
<dc:Bounds height="22.0" width="14.0" x="292.58765691867626" y="227.54247101841793"></dc:Bounds>
<cmmndi:CMMNLabel></cmmndi:CMMNLabel>
</cmmndi:CMMNShape>
<cmmndi:CMMNShape id="CMMNShape_planItem2" cmmnElementRef="planItem2">
<dc:Bounds height="80.0" width="100.0" x="105.5" y="183.0"></dc:Bounds>
<cmmndi:CMMNLabel></cmmndi:CMMNLabel>
</cmmndi:CMMNShape>
<cmmndi:CMMNEdge id="CMMNEdge_sid-BDE0FC41-0461-4EAB-93E8-4E3E19709E7B" cmmnElementRef="sid-C7C05BD3-1D12-4060-9AE8-FD5E4CB9DF94" targetCMMNElementRef="sid-0F1F1EF4-7661-4CC8-9AD7-4F2566DF989C">
<di:waypoint x="205.44999999999806" y="222.2287917737789"></di:waypoint>
<di:waypoint x="299.99999999999847" y="220.77043701799485"></di:waypoint>
<cmmndi:CMMNLabel></cmmndi:CMMNLabel>
</cmmndi:CMMNEdge>
</cmmndi:CMMNDiagram>
</cmmndi:CMMNDI>
</definitions>

我需要做什么来修复它?

附注我以前遇到过这个问题,当我尝试部署它的应用程序时,它常常抛出一个异常,说明 extensionElement 标签以及它不应该有子项的事实!但现在它部署无任何异常。

EDIT-1:我发现决策表引用为空,因此当我更改它以指出决策表时,我得到了我之前在 P.S. 中提到的相同异常。部分。这是一个 CmmnXMLException。堆栈跟踪摘要如下。

ERROR 19300 --- [nio-8090-exec-8]o.f.u.m.s.ModelImageService : Error creating thumbnailcmmn image 073fbc3d-b36b-11e8-ae0a-005056c00008java.lang.NullPointerException: null atorg.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.connectionPerfectionizer(DefaultCaseDiagramGenerator.java:393)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1] at

org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.drawAssociation(DefaultCaseDiagramGenerator.java:369)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1] at

org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateCaseDiagram(DefaultCaseDiagramGenerator.java:261)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1] at

org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateImage(DefaultCaseDiagramGenerator.java:222)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1] at

org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateImage(DefaultCaseDiagramGenerator.java:227)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1] at

org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generatePngImage(DefaultCaseDiagramGenerator.java:232)~[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]

ERROR 19300 --- [nio-8090-exec-8]o.f.c.e.i.i.CommandContext: Error while closing commandcontext

org.flowable.cmmn.converter.CmmnXMLException: cvc-complex-type.2.4.d:Invalid content was found starting with element 'extensionElements'.No child element is expected at this point. at

org.flowable.cmmn.converter.CmmnXmlConverter.convertToCmmnModel(CmmnXmlConverter.java:173)~[flowable-cmmn-converter-6.3.1.jar:6.3.1] at

org.flowable.cmmn.engine.impl.parser.CmmnParserImpl.parse(CmmnParserImpl.java:89)~[flowable-cmmn-engine-6.3.1.jar:6.3.1] at

org.flowable.cmmn.engine.impl.parser.CmmnParserImpl.parse(CmmnParserImpl.java:67)~[flowable-cmmn-engine-6.3.1.jar:6.3.1]

Caused by:org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid contentwas found starting with element 'extensionElements'. No child elementis expected at this point. atorg.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(UnknownSource) ~[xercesImpl-2.10.0.jar:?]

ERROR 19300 --- [nio-8090-exec-2]o.f.u.m.s.AppDefinitionPublishService : Invalid deploy result code:HTTP/1.1 500

EDIT-2:我尝试逐步构建案例,发现在添加表单时 CasePlanModel 在保存时崩溃。此外,建模器和引擎在集成决策任务引用时存在严重问题。

最佳答案

定义标签的最后一个参数是错误的:

targetNamespace="http://www.flowable.org/casedef"

应该是:

targetNamespace="http://www.flowable.org/processdef"

关于java - Flowable:CMMN 建模器转换 CasePlanModel 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52235958/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com