Giter Site home page Giter Site logo

bpmn-demo's Introduction

  • trouver comment mettre chaque icon : dans son propre répertoire (forme d'héritage avec imports)
  • trouver comment les mettre les fleches : dans le bon sens, double-sens..
  • trouver comment faire un regroupement.. genre de cadre
  • plusieurs properties
  • generer le ID automatiquement pour les properties
  • modifier les propriétés générique, car pas nécessaire d'avoir Magic, sauf si je veux avoir plusieurs tabs
  • sauvegarder
  • importer

⚠️ Should custom elements be serialized within the BPMN 2.0 diagram? If that is the case, this example is not what you are looking for. Checkout our 📓 custom elements guide to learn how to build custom elements in a BPMN 2.0 compatible way.

bpmn-js example: Custom Shapes

This advanced example shows how to extend bpmn-js with new shapes and connections that are not part of the BPMN 2.0 diagram / incompatible with the BPMN 2.0 standard. Consult our 📓 custom elements guide to learn how to extend the toolkit in a BPMN 2.0 compliant way.

About

This example extends bpmn-js, creating a custom BPMN modeler that can display and add custom shapes and connections to BPMN 2.0 diagrams.

The renderer ships with custom rules that define which modeling operations are possible on custom shapes and connections. It can import custom shapes and connections from a JSON descriptor and updates their properties during modeling.

demo application screenshot

Usage Summary

The example provides a custom modeler. After instantiation, the modeler allows you to add and get custom shapes and connections.

// add custom elements
var customElements = [
  {
    type: "custom:triangle",
    id: "CustomTriangle_1",
    x: 300,
    y: 300
  },
  {
    type: "custom:connection",
    id: "CustomConnection_1",
    source: "CustomTriangle_1",
    target: "Task_1",
    waypoints: [
      // ...
    ]
 }
];

customModeler.addCustomElements(customElements);


// get them after modeling
customModeler.getCustomElements(); // all currently existing custom elements

The modeler ships with a module that provides the following bpmn-js extensions:

  • CustomContextPadProvider: A custom context pad that allows you to connect custom elements to BPMN elements
  • CustomElementFactory: A factory that knows about how to create BPMN and custom shapes
  • CustomOrderingProvider: A provider that ensures custom connections are always rendered on top
  • CustomPalette: A custom palette that allows you to create custom elements
  • CustomRenderer: A renderer that knows how to draw custom elements
  • CustomRules: A rule provider that defines the allowed interaction with custom elements
  • CustomUpdater: An updater that updates business data while the user interacts with the diagram

Run this Example

Fetch dependencies:

npm install

Build example and open in your browser:

npm run dev

Run tests:

npm test

License

MIT

bpmn-demo's People

Contributors

survivant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.