flowable-cmmn-moddle
v1.1.0
Published
Flowable moddle extensions for CMMN 1.1
Maintainers
Readme
flowable-cmmn-moddle
Flowable moddle extensions for CMMN 1.1. This package provides Flowable-specific extensions for cmmn-moddle, enabling support for Flowable's custom CMMN elements and attributes in cmmn-js based applications.
Installation
npm install flowable-cmmn-moddleUsage
With cmmn-js
import CmmnModeler from 'cmmn-js/lib/Modeler';
import flowableDescriptor from 'flowable-cmmn-moddle/resources/flowable';
const modeler = new CmmnModeler({
container: '#canvas',
moddleExtensions: {
flowable: flowableDescriptor
}
});With cmmn-js Properties Panel
import CmmnModeler from 'cmmn-js/lib/Modeler';
import propertiesPanelModule from 'cmmn-js-properties-panel-flowable';
import propertiesProviderModule from 'cmmn-js-properties-panel-flowable/lib/provider/flowable';
import flowableDescriptor from 'flowable-cmmn-moddle/resources/flowable';
const modeler = new CmmnModeler({
container: '#canvas',
propertiesPanel: {
parent: '#properties-panel'
},
additionalModules: [
propertiesPanelModule,
propertiesProviderModule
],
moddleExtensions: {
flowable: flowableDescriptor
}
});Supported Flowable Extensions
This package extends the CMMN 1.1 meta-model with Flowable-specific elements and attributes:
Case Elements
flowable:historyTimeToLive- Set history time to live for casesflowable:initiatorVariableName- Define initiator variable nameflowable:candidateStarterGroups- Set candidate starter groups
Human Tasks
flowable:assignee- Task assigneeflowable:candidateUsers- Candidate usersflowable:candidateGroups- Candidate groupsflowable:dueDate- Task due dateflowable:followUpDate- Task follow-up dateflowable:priority- Task priorityflowable:formKey- Associated form keyflowable:formFieldValidation- Form field validation
Process Tasks
flowable:processBinding- Process binding typeflowable:processVersion- Process versionflowable:processTenantId- Process tenant IDflowable:fallbackToDefaultTenant- Fallback to default tenantflowable:sameDeployment- Use same deployment
Case Tasks
flowable:caseBinding- Case binding typeflowable:caseVersion- Case versionflowable:caseTenantId- Case tenant ID
Decision Tasks
flowable:decisionBinding- Decision binding typeflowable:decisionVersion- Decision versionflowable:decisionTenantId- Decision tenant IDflowable:mapDecisionResult- Result mappingflowable:resultVariable- Result variable
Listeners
flowable:caseExecutionListener- Case execution listenersflowable:taskListener- Task listenersflowable:variableListener- Variable listeners
Variable Mapping
flowable:in- Input variable mappingflowable:out- Output variable mapping
Repetition Rules
flowable:repeatOnStandardEvent- Repeat on standard eventflowable:counterVariable- Counter variableflowable:maxInstanceCount- Maximum instance count
Milestones
flowable:milestoneVariable- Milestone variable
CMMN XML Namespace
This extension uses the namespace http://flowable.org/cmmn with the prefix flowable:.
Example CMMN XML with Flowable extensions:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/CMMN/20151109/MODEL"
xmlns:flowable="http://flowable.org/cmmn"
targetNamespace="http://flowable.org/cmmn">
<case id="myCase" flowable:initiatorVariableName="initiator">
<casePlanModel id="casePlanModel" flowable:formKey="startForm">
<planItem id="humanTaskPlan" definitionRef="humanTask"/>
<humanTask id="humanTask"
flowable:assignee="${initiator}"
flowable:candidateGroups="managers"
flowable:formKey="taskForm"/>
</casePlanModel>
</case>
</definitions>Development
Prerequisites
- Node.js 16+
- npm or yarn
Setup
git clone https://github.com/jylups/flowable-cmmn-moddle.git
cd flowable-cmmn-moddle
npm installRunning Tests
npm testLinting
npm run lintContributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Projects
- cmmn-js - CMMN 1.1 modeling for the web
- cmmn-moddle - CMMN 1.1 meta-model
- Flowable - Open source business process engine
Acknowledgments
- Based on camunda-cmmn-moddle
- Built on top of the excellent bpmn.io toolkit
