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;
}