Wrong serialization for property loopMaximum in StandardLoopCharacteristics


#1

The property “loopMaximum” of “StandardLoopCharacteristics” is not serialized as per schema definition.
In bpmn.io it is defined as an Expression but the schema defines it as an Integer.

bpmn.io definition:

{
	"name": "StandardLoopCharacteristics",
	  "superClass": [
		"LoopCharacteristics"
	  ],
	  "properties": [
	{
	  "name": "testBefore",
	  "default": false,
	  "isAttr": true,
	  "type": "Boolean"
	},
	{
	  "name": "loopCondition",
	  "type": "Expression",
	  "xml": {
		"serialize": "xsi:type"
	  }
	},
	{
	  "name": "loopMaximum",
	  "type": "Expression",
	  "xml": {
		"serialize": "xsi:type"
	  }
	}
  ]
}

BPMN schema definition:

<xsd:element name="standardLoopCharacteristics" type="tStandardLoopCharacteristics"  substitutionGroup="loopCharacteristics"/>
	<xsd:complexType name="tStandardLoopCharacteristics">
		<xsd:complexContent>
			<xsd:extension base="tLoopCharacteristics">
				<xsd:sequence>
					<xsd:element name="loopCondition" type="tExpression" minOccurs="0"/>
				</xsd:sequence>
				<xsd:attribute name="testBefore" type="xsd:boolean" default="false"/>
				<xsd:attribute name="loopMaximum" type="xsd:integer" use="optional"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

#2

Version 1.3.2 bpmnjs still has this problem.
I cannot add a StandardLoopCharacteristics element with for example loopMaximum=3 to a UserTask element. The modeler throws an error “Cannot read property ‘isGeneric’ of undefined”


#3

This is an issue in bpmn-moddle. Please file a bug there and link this forum topic.


#4

Fixed with bpmn-js@1.3.3.