Skip to main content
Version: 4.1

Export

Enables the BPMN export process within JointJS. Learn more about the BPMN export plugin.

Classes​

IdentifierFactory​

Default identifier factory for the BPMN export.

Methods​

generateXMLId()​
generateXMLId(type: string): string;

Generates an XML Id for the given type in the format process_1.

getCellXMLId()​
getCellXMLId(cell: dia.Cell): string;

Get the XML Id for the given cell. If the cell's id doesn't start with a id_ prefix, it will be prefixed with id_. This is done to ensure that the cell's id is a valid XML id.

Functions​

createExtensionElement()​

createExtensionElement(type: string): Element;

Creates XML element of a given type in the JointJS namespace.

toBPMN()​

toBPMN(paper: dia.Paper, options?: ExportOptions): ExportResult;

Exports paper to the BPMN XML format.

Types​

BPMN2Types​

type BPMN2Types =
"bpmn2.Activity" |
"bpmn2.Event" |
"bpmn2.Gateway" |
"bpmn2.DataObject" |
"bpmn2.DataAssociation" |
"bpmn2.Flow" |
"bpmn2.Annotation" |
"bpmn2.AnnotationLink" |
"bpmn2.Group" |
"bpmn2.Pool" |
"bpmn2.HeaderedPool" |
"bpmn2.HorizontalPool" |
"bpmn2.VerticalPool" |
"bpmn2.HeaderedHorizontalPool" |
"bpmn2.HeaderedVerticalPool" |
"bpmn2.DataStore";

DefaultFactory​

type DefaultFactory = () => exportableObjects.ExportableObject;

ExportOptions​

interface ExportOptions {
exportableObjectFactories: {
[type in BPMN2Types]?: (cellView: dia.CellView, defaultFactory: DefaultFactory) => exportableObjects.ExportableObject | null;
} | {
[type: string]: (cellView: dia.CellView) => exportableObjects.ExportableObject | null;
},
targetNamespace?: string;
identifierFactory?: IIdentifierFactory;
}

ExportResult​

interface ExportResult {
xml: XMLDocument;
}

IIdentifierFactory​

interface IIdentifierFactory {
generateXMLId(type: string): string;
getCellXMLId(cell: dia.Cell): string;
}