Skip to content

Define the priorities of BPMN activities via size and color

Notifications You must be signed in to change notification settings

bpmn-io/bpmn-js-task-priorities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This extension was written once as an April Fool's day demonstration.

Have a look, learn, get inspired. Do not use it, even though you could 🙏.

Visual Task Priorities for bpmn-js

Extend bpmn-js to define tasks priorities while modeling.

Task priorities in bpmn-js

Features

Usage

Fetch it as a dependency via npm:

npm install bpmn-js-task-priorities

Use the modeler as part of your application:

var PriorityAwareModeler = require('bpmn-js-task-priorities/lib/PriorityAwareModeler');

var modeler = new PriorityAwareModeler();

modeler.importXML(annotatedBpmnXml, ...);

Or use the provided extension module with bpmn-js:

var Modeler = require('bpmn-js/lib/Modeler');

var prioritiesModule = require('bpmn-js-task-priorities/lib/priorities');

var modeler = new Modeler({
  additionalModules: [
    prioritiesModule
  ]
});

Specify tasks colors in XML and read the serialized tp:color and tp:priority extension attributes:

<definitions ... xmlns:tp="http://tp">
  <process>
    <task id="Task_1" tp:color="green" />
    <task id="Task_2" tp:color="red" tp:priority="100041" />
    ...
  </process>
</definitions>

Building

npm install
npm run test:watch

License

MIT

About

Define the priorities of BPMN activities via size and color

Resources

Code of conduct

Security policy

Stars

Watchers

Forks