bpmn-js-transaction-boundaries 简介

1、什么是 bpmn-js-transaction-boundaries ?

扩展 BPMN 2.0 建模器,增加事务边界可视化功能。
It implements a BPMN 2.0 modeler that allows you to visualize transaction boundaries in the diagram.

https://github.com/bpmn-io/bpmn-js-examples/tree/master/transaction-boundaries

2、使用指导

添加 bpmn-js-transaction-boundaries 到你的项目:

npm install --save bpmn-js-transaction-boundaries

通过bpmn-js对象加载 transaction-boundaries 模块:

import BpmnModeler from 'bpmn-js/lib/Modeler';

import transactionBoundariesModule from 'bpmn-js-transaction-boundaries';

var canvas = $('#js-canvas');

var bpmnModeler = new BpmnModeler({
  container: canvas,
  additionalModules: [
    transactionBoundariesModule
  ]
});

bpmnModeler.importXML(xml, function(err) {

  if (err) {
      console.error(err);
    } else {
      var transactionBoundaries = bpmnModeler.get('transactionBoundaries');

      transactionBoundaries.show();
    }
  });
作者:Jeebiz  创建时间:2020-03-22 00:11
 更新时间:2024-08-05 18:41