09-27-2010 11:39 AM
10-14-2010 02:18 PM
from a first incomplete glance, i would be concerned with 1) i don't think your proposal is valid bpmn. it's not allowed to define custom activities like that.
10-15-2010 03:02 AM
<serviceTask activiti:type="someTypeOrAClassName">
<extensionElements>
<field name="cfgParam1">stringValue</field>
<field name="cfgParam2"><integer value="293" /></field>
10-15-2010 04:33 AM
10-15-2010 05:13 AM
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://my/custom/namespace"
xmlns:tns="http://my/custom/namespace"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
elementFormDefault="qualified">
<!–
This is a schema-valid BPMN extension, which is invalid with respect
to the meta model as described in section "8.2.3 Extensibility" of the
BPMN specification.
–>
<import namespace="http://www.omg.org/spec/BPMN/20100524/MODEL" />
<!– <io:readFile id="readFromSource" sourceFile="D:\new.txt" targetVariable="fileContent" /> –>
<element name="readFile" type="tns:tReadFile" substitutionGroup="bpmn:flowElement" />
<complexType name="tReadFile">
<complexContent>
<extension base="bpmn:tTask">
<attribute name="sourceFile" type="string" />
<attribute name="targetVariable" type="string" />
</extension>
</complexContent>
</complexType>
</schema>
However, after reading section "8.2.3 Extensibility" of the BPMN specification again, I learned that the BPMN Meta Model only allows custom XML elements that are contained in extensionElements elements. This means that the direct children of the process element can only be elements from the official BPMN XML schema.10-15-2010 07:46 AM
10-15-2010 04:58 PM
10-18-2010 08:21 AM
We're don't think its a good idea to switch our BpmnParser to JAXB.
I agree with not using JAXB. The current parser, in my opinion, is both more flexible and more efficient, than if you'd used JAXB. (except the long list of if .. else if … else if … comparisons in the parser, which can be made more efficient using a lookup map)
10-18-2010 09:28 AM
What other considerations make you both feel that its not a good fit for parsing BPMN2?
10-18-2010 10:05 AM
What other considerations make you both feel that its not a good fit for parsing BPMN2?
Maybe if I wanted to write the BPMN Parser from scratch, I might have used JAXB. Specially provided that we have an XSD ready for generating JAXB classes. So, I'm not saying that JAXB is not a good fit. Anyway, here's why I felt I'm not comfortable with JAXB in here:
(Note that none of these are concrete reasons, just generally the way I feel about the issue)
1. BpmnParser does two things. One is parsing the XML, and one is generating PVM objects based on what is read from XML. So if we use JAXB, most of the current code will remain, not replaced.
2. Using JAXB means strict conformance of the XML to the object model. In the current implementation, it's rather easier to handle errors in custom ways.
3. It's easier to change / extend the current parser, than if the parser have used JAXB. For example, in JAXB code you need to specify possible sub-classes of a super class user @XmlSeeAlso. So if you want the parser to handle a new element, you'll either have to change the library code, or re-implement the whole JAXB class hierarchy that is bound to BPMN. In the current parser, it's a matter of comparing strings.
All of the above items can be considered a positive point for JAXB too, depending on your point of view.
Even for the performance, since there is many string comparisons and string lookups in the current code, we can't be sure that using JAXB means lower performance.
I think the concrete reason for not changing it would be: there's no (special) gain for the user of Activiti to do so.
From your point of view, as a user of Activiti, what can be better if Activiti uses JAXB or not internally?
10-18-2010 02:36 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.