节点不能有多个传入/传出边缘

时间:2014-04-02 08:15:06

标签: eclipse jbpm

我正在尝试开始使用jbpm,我正在学习本教程。 http://www.mastertheboss.com/jbpm5/jbpm-5-tutorial-first-example?start=1 在第二页上,我必须添加一个发散网关,聚合网关,约束,将类型更改为XOR,并创建一个变量" money"。当我尝试运行该程序时,我收到以下错误。

java.lang.IllegalArgumentException: This type of node cannot have more than one incoming connection!
    at org.jbpm.workflow.core.node.ActionNode.validateAddIncomingConnection(ActionNode.java:50)
    at org.jbpm.workflow.core.impl.NodeImpl.addIncomingConnection(NodeImpl.java:100)
    at org.jbpm.workflow.core.impl.ConnectionImpl.connect(ConnectionImpl.java:76)
    at org.jbpm.workflow.core.impl.ConnectionImpl.<init>(ConnectionImpl.java:71)
    at org.jbpm.bpmn2.xml.ProcessHandler.linkConnections(ProcessHandler.java:293)
    at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:145)
    at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:422)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
    at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:301)
    at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:180)
    at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:46)
    at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:262)
    at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:673)
    at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:709)
    at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
    at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
    at com.sample.ProcessMain.readKnowledgeBase(ProcessMain.java:31)
    at com.sample.ProcessMain.main(ProcessMain.java:20)
Exception in thread "main" java.lang.IllegalArgumentException: Could not parse knowledge.
    at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:79)
    at com.sample.ProcessMain.readKnowledgeBase(ProcessMain.java:32)
    at com.sample.ProcessMain.main(ProcessMain.java:20)
0    02/04 10:05:21,243[main] ERROR builder.impl.KnowledgeBuilderImpl.newKnowledgeBase  - ProcessLoadError: unable to parse xml : Exception class java.lang.IllegalArgumentException : This type of node cannot have more than one incoming connection!

我尝试通过删除节点/边缘进行调试,直到出现不同的错误。如果我删除整个分支,则错误将是网关需要1个边缘。如果我从其中一个分支删除边缘,则会说该脚本有多个传入/传出边缘。似乎第二个脚本具有不同的id和名称,与第一个相混淆或者有我看不到的边缘。

额外问题: 1.我如何知道它指的是哪个节点? (我正在使用eclipse,通常会将您发送到代码行的链接不会显示任何内容)

问题的屏幕截图: ![http://imgur.com/0gL5twY][1]

1 个答案:

答案 0 :(得分:1)

您可以分享您的流程图图片吗? 它引用了一个ActionNode,它通常是一个脚本节点。 我建议您使用Web流程设计器,它在功能和验证方面要好得多。

此致