我已经通过Apache tomcat部署了Flowable 6.3.1。
尝试为以下模型建模Flowable BpmnJsonConverter
(顺便说一下,我不知道它与CMMN建模有什么关系)会抛出NullPointerException
。
CMMN 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>
我需要做什么来解决它?
P.S。我以前曾遇到过这个问题,当我尝试部署它的应用程序时,它经常抛出一个异常,提示有关extensionElement
标签以及它不应该带有子元素的事实!但是现在它毫无例外地部署了。
EDIT-1:我发现决策表引用为空,因此当我更改它以指出决策表时,我遇到了与P.S中先前提到的相同的异常。部分。这是CmmnXMLException。堆栈跟踪摘要如下。
错误19300 --- [nio-8090-exec-8] o.f.u.m.s.ModelImageService:创建缩略图时出错 cmmn图片073fbc3d-b36b-11e8-ae0a-005056c00008 java.lang.NullPointerException:在时为null org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.connectionPerfectionizer(DefaultCaseDiagramGenerator.java:393) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]在
org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.drawAssociation(DefaultCaseDiagramGenerator.java:369) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]在
org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateCaseDiagram(DefaultCaseDiagramGenerator.java:261) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]在
org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateImage(DefaultCaseDiagramGenerator.java:222) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]在
org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generateImage(DefaultCaseDiagramGenerator.java:227) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]在
org.flowable.cmmn.image.impl.DefaultCaseDiagramGenerator.generatePngImage(DefaultCaseDiagramGenerator.java:232) 〜[flowable-cmmn-image-generator-6.3.1.jar:6.3.1]
错误19300 --- [nio-8090-exec-8] o.f.c.e.i.i.CommandContext:关闭命令时出错 上下文
org.flowable.cmmn.converter.CmmnXMLException:cvc-complex-type.2.4.d: 发现无效的内容以元素“ extensionElements”开头。 此时,预计没有子元素。在
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]在
org.flowable.cmmn.engine.impl.parser.CmmnParserImpl.parse(CmmnParserImpl.java:67) 〜[flowable-cmmn-engine-6.3.1.jar:6.3.1]
原因: org.xml.sax.SAXParseException:cvc-complex-type.2.4.d:无效的内容 被发现以元素“ extensionElements”开头。没有子元素 预计在这一点上。在 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(未知 来源)〜[xercesImpl-2.10.0.jar:?]
错误19300-[[nio-8090-exec-2] o.f.u.m.s.AppDefinitionPublishService:无效的部署结果代码: HTTP / 1.1 500
EDIT-2:我试图逐步构建Case,发现向其中添加表单时,CasePlanModel在保存时崩溃。此外,建模者和引擎在集成决策任务参考方面也存在严重问题。
答案 0 :(得分:0)
定义标签的最后一个参数错误:
targetNamespace="http://www.flowable.org/casedef"
应为:
targetNamespace="http://www.flowable.org/processdef"