cmmn-js is the CMMN 1.1 diagram rendering toolkit that powers bpmn.io.
the project is still in an early stage. Documentation may be missing and examples may be broken.
Get the library via npm or bower and use it in your web applications to display CMMN 1.1 diagrams.
var CmmnViewer = require('cmmn-js');
var xml; // my CMMN 1.1 xml
var viewer = new CmmnViewer({ container: 'body' });
viewer.importXML(xml, function(err) {
if (err) {
console.log('error rendering', err);
} else {
console.log('rendered');
}
});bower install cmmn-js
Make sure to include the library + all dependencies into the website.
npm install --save cmmn-js
Make sure you use browserify or the like to bundle your project and cmmn-js for the browser.
cmmn-js builds on top of a few additional powerful tools
- cmmn-moddle: Read / write support for CMMN 1.1 XML in the browsers
- diagram-js: Diagram rendering and editing toolkit
As long as the project is in alpha stage, you must make sure you setup the whole development environment, including a number of project dependencies according to our development setup.
Use under the terms of the cmmn-js license.