asd26269546 af5ce1c10f 7-1 | 2 years ago | |
---|---|---|
.. | ||
app | 2 years ago | |
resources | 2 years ago | |
styles | 2 years ago | |
.gitignore | 2 years ago | |
.npmrc | 2 years ago | |
Gruntfile.js | 2 years ago | |
README.md | 2 years ago | |
package.json | 2 years ago |
This example uses bpmn-js and bpmn-js-properties-panel. It implements a BPMN 2.0 modeler that allows you to edit execution related properties via a properties panel.
This example is a node-style web application that builds a user interface around the bpmn-js BPMN 2.0 modeler.
Add the properties panel to your project:
npm install --save bpmn-js-properties-panel
Additionally, if you'd like to use Camunda BPM execution related properties, include the camunda-bpmn-moddle dependency which tells the modeler about camunda:XXX
extension properties:
npm install --save camunda-bpmn-moddle
Now extend the bpmn-js modeler with two properties panel related modules, the panel itself and a provider module that controls which properties are visible for each element. Additionally you must pass an element via propertiesPanel.parent
into which the properties panel will be rendered (cf. app/index.js
for details).
var propertiesPanelModule = require('bpmn-js-properties-panel'),
// providing camunda executable properties, too
propertiesProviderModule = require('bpmn-js-properties-panel/lib/provider/camunda'),
camundaModdleDescriptor = require('camunda-bpmn-moddle/resources/camunda');
var bpmnModeler = new BpmnModeler({
container: '#js-canvas',
propertiesPanel: {
parent: '#js-properties-panel'
},
additionalModules: [
propertiesPanelModule,
propertiesProviderModule
],
// needed if you'd like to maintain camunda:XXX properties in the properties panel
moddleExtensions: {
camunda: camundaModdleDescriptor
}
});
You need a NodeJS development stack with npm and installed to build the project.
To install all project dependencies execute
npm install
Build the example using browserify via
npm run all
You may also spawn a development setup by executing
npm run dev
Both tasks generate the distribution ready client-side modeler application into the dist
folder.
Serve the application locally or via a web server (nginx, apache, embedded).