@camunda/ linting (帮助)
Camunda桌面和Web建模公司使用的 BPMN 接口 。 电池也包括在内
特征
- 捆绑 bpmnlint (英语) 财务报告和审定财务报表 bpmnlint-plugin-camunda-compat 双相机
- 基于
modeler:executionPlatform财务报告和审定财务报表modeler:executionPlatformVersion - 创建要在桌面和网络建模中显示的错误消息
- 创建要在属性面板中显示的错误
- 创建要在画布上显示的错误覆盖
使用量
import Modeler from 'bpmn-js/lib/Modeler';
import { Linter } from '@camunda/linting';
import lintingModule from '@camunda/linting/modeler';
import '@camunda/linting/assets/linting.css';
const modeler = new Modeler({
additionalModules: [
lintingModule
]
});
// configure to be used with desktop or web modeler
const linter = new Linter({
modeler: 'web', // `desktop` or `web` modeler, defaults to `desktop`
type: 'cloud' // `cloud` or `platform` diagrams, defaults to `cloud`
});
// lint by passing definitions
const reports = await linter.lint(definitions);
// or passing XML
const reports = await linter.lint(xml);
...
// update errors on canvas and in properties panel (requires bpmn-js-properties-panel >= 1.3.0)
modeler.get('linting').setErrors(reports);
// show error by selecting element and properties panel entry
modeler.get('linting').showError(report);
// activate and deactivate errors on canvas
modeler.get('linting').activate();
modeler.get('linting').deactivate();
发展
# install
npm i
# run tests
npm t
# run tests in watch mode
npm run test:watch
# run example
npm start
许可证
麻省理工学院