[jboss-user] [jBPM] - Re: How does a sub-process work?

stellina_rosa do-not-reply at jboss.com
Thu Jun 16 09:11:51 EDT 2011


stellina_rosa [http://community.jboss.org/people/stellina_rosa] created the discussion

"Re: How does a sub-process work?"

To view the discussion, visit: http://community.jboss.org/message/610572#610572

--------------------------------------------------------------
Hi Esteban! thank you for your answer!
I'm using jbpm5 and, reading the user guide, I thought that the solution for my problem was to use an embedded sub-process... but maybe I don't understand the difference between embedded and reusable sub-process!
BTW I read your example and I tried to do the same, so:
1) I create a new .bpmn file with a Reusable Sub-Process node, with ProcessId parameter set to: com.sample.bpmn.hello (is the id of the process that I want to reuse);
2) I added the new resource to the kbuilder;

Now: I should start the new process, but I didn't do because I wanted to test if something was wrong... infact!... 


java.lang.NullPointerException
          at org.jbpm.bpmn2.xml.di.BPMNPlaneHandler.end(BPMNPlaneHandler.java:75)
          at org.drools.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:420)
          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 javax.xml.parsers.SAXParser.parse(Unknown Source)
          at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:295)
          at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:174)
          at org.jbpm.compiler.xml.XmlProcessReader.read(XmlProcessReader.java:45)
          at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:249)
          at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:430)
          at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:470)
          at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
          at com.sample.ProcessTest.createKSession(ProcessTest.java:77)
          at com.sample.ProcessTest.main(ProcessTest.java:42)

java.lang.RuntimeException: Error building kbase!
          at com.sample.ProcessTest.createKSession(ProcessTest.java:89)
          at com.sample.ProcessTest.main(ProcessTest.java:42)

I'm sure that the processTest.java class is correct because if I delete the instruction :
kbuilder.add(ResourceFactory.newClassPathResource("myProcess.bpmn"), ResourceType.BPMN2);

I have no error...!  :( 

I can't understand  :( 

please help me
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/610572#610572]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110616/42ef7685/attachment.html 


More information about the jboss-user mailing list