Package org.imixs.workflow.bpmn
Class BPMNModelHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.imixs.workflow.bpmn.BPMNModelHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
The Imixs BPMNDefaultHandler is used to extract the Imixs Task and Event
Elements of a Imixs BPMN model.
A BPMN file can either be a simple diagram with one process or a
collaboration diagram with a bpmn2:collaboration definition. For
collaboration diagrams the currentWorkflowGroup is read from the
bpmn2:collaboration element. For a simple BPMN diagram type the
currentWorkflowGroup is read from the bpmn2:process element.
#issue 113: The parser connects pairs of catch and throw link events with a
virtual SequenceFlow to support the same behavior as if the link events were
connected directly.
- Author:
- rsoika
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method builds the model from the information parsed by the handler.void
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) void
startElement
(String uri, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
BPMNModelHandler
public BPMNModelHandler()
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
buildModel
This method builds the model from the information parsed by the handler. First all task elements were adds as unique process entities into the model. In the second step the method adds the Activity elements to the assigned Task. We look also for activities with no incoming SequenceFlow. The builder verifies the ProcessIDs for each task element to guaranty that the numProcessID is unique The build connects pairs of Catch and Throw LinkEvents with a virtual SequenceFlow to support the same behavior as if those elements where connected directly in the model. The method tests the model for bpmn2:message elements and replace links in Activity elements attribute 'rtfMailBody'- Throws:
ModelException
-