Skip to main content
Version: 4.1

ExportableObject

Base abstract class for all exportable objects.

constructor​

constructor(cellView: dia.CellView);

Methods​

defineExtensionElements()​

protected defineExtensionElements(): Element[];

Override this method to add custom extension elements to the BPMN2 XML element. The elements will be placed in the right place in the XML markup during export. To create an extension element in JointJS namespace, use the createExtensionElement() function.

getBounds()​

protected getBounds(): dia.BBox;

Returns the bounds for the BPMNShape XML element. By default uses cell's bounding box.

getLabelNode()​

protected getLabelNode(): SVGElement;

Returns the label node which is used to create BPMNLabel XML element. By default uses the bode with label selector.

getLabelText()​

protected getLabelText(): string;

Returns the text of the label. By default uses the text presentation attribute of the element with label selector.

init()​

init(): void;

This method runs during the export process after the constructor call. Override this method to perform additional initialization which requires identifierFactory.

setUpShapeXMLElement()​

protected setUpShapeXMLElement(shapeXMLElement: Element): void;

Set ups the BPMNShape XML element.

Properties​

cell​

cell: dia.Cell;

Cell of the exportable object.

cellView​

cellView: dia.CellView;

Cell view of the exportable object.

identifierFactory​

identifierFactory: IIdentifierFactory;

Identifier factory used to generate XML IDs. Injected after the constructor call during the toBPMN() function execution. Uses default factory if identifierFactory option is not provided.

Static methods​

sortElement()​

static sortElement(element: Element, order: string[]): void;

Sorts the XML element children by the given order.