This package has been deprecated

Author message:

WARNING: This module has been renamed to @camunda/execution-platform. Please install it instead. See https://github.com/bpmn-io/execution-platform/issues/1 for more information.

@bpmn-io/execution-platform

0.2.0 • Public • Published

@bpmn-io/execution-platform

CI

Set executionPlatform and executionPlatformVersion in your BPMN diagrams.

Usage

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

import ExecutionPlatformModule from '@bpmn-io/execution-platform';
import ModelerModdleExtension from 'modeler-moddle/resources/modeler.json';


// extend the BPMN editor with the module and moddle extension
var modeler = new BpmnModeler({
  additionalModules: [
    ExecutionPlatformModule
  ],
  moddleExtensions: {
    modeler: ModelerModdleExtension
  }
});

var executionPlatformHelper = modeler.get('executionPlatform');

executionPlatformHelper.setExecutionPlatform({ name: 'Camunda Cloud', version: '1.3.0' });

var executionPlatform = executionPlatformHelper.getExecutionPlatform();

// { name: 'Camunda Cloud', version: '1.3.0' }
console.log(executionPlatform);

// see the meta-data appear on save
modeler.saveXML(function(err, xml) {

  xml; // ... <bpmn:Definitions ... modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="1.3.0">...
});

You can also configure the extension so that the execution platform details are set imperatively each time you save the diagram:

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

import ExecutionPlatformModule from '@bpmn-io/execution-platform';
import ModelerModdleExtension from 'modeler-moddle/resources/modeler.json';

// extend the BPMN editor with the module and moddle extension together with configuration
var modeler = new BpmnModeler({
  additionalModules: [
    ExecutionPlatformModule
  ],
  moddleExtensions: {
    modeler: ModelerModdleExtension
  },
  executionPlatform: {
    name: 'Camunda Cloud',
    version: '1.3.0'
  }
});

// see the meta-data appear on save
modeler.saveXML(function(err, xml) {

  xml; // ... <bpmn:Definitions ... modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="1.3.0">...
});

License

MIT

Package Sidebar

Install

npm i @bpmn-io/execution-platform

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

7.3 kB

Total Files

6

Last publish

Collaborators

  • vsgoulart
  • skaiir-camunda
  • marstamm
  • bpmn-io-admin
  • nikku
  • barmac
  • philippfromme
  • maxtru