1.0.1 • Published 4 years ago

bpmn-js-xml-templater v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

bpmn-js-xml-templater

Basic templater for bpmn-js

Getting Started

For create a bpmn template you need to make few simple steps.

Installation

This will add bpmn-js-xml-templater in your project

npm i bpmn-js-xml-templater

Then import it to your file

const xmlTemplate = require("bpmn-js-xml-templater");

Now you have a templater in your project!

Usage

Create few shapes

let template = new xmlTemplate();

let firstShape = template.addShape(80, 100, 100, 150, "First element");
let secondShape = template.addShape(80, 100, 350, 150, "Second element");
let thirdShape = template.addShape(80, 100, 560, 350, "Third element");
let fourthShape = template.addShape(80, 100, 560, 150, "Fourth element");

Then connect them

template.connect(firstShape, secondShape);
template.connect(secondShape, thirdShape);
template.connect(thirdShape, fourthShape);

For get result use

console.log(template.xml);