Giter Club home page Giter Club logo

bpmn-visualization-js's Introduction

bpmn-visualization TypeScript library


bpmn-visualization is a TypeScript library for visualizing process execution data on BPMN diagrams, with simplicity.

Based on the customization capability, it provides a set of diagram visualization features that includes additional display options for execution data (highlighting of some elements, adding customizable overlays, and more) as well as personalized interactive capabilities (mouse hover, click, and more).

We hope it will help you to create applications for process visualization and analysis ๐Ÿ™‚

๐ŸŽฎ Demo and examples

Please check the โฉ live environment.

You will find there basic usage as well as detailed examples showing possible rendering customizations.

๐Ÿ”† Project Status

bpmn-visualization is actively developed and maintained.

Before the release of version 1.0.0, there may be some breaking changes. We avoid these as much as possible, and carefully document them in the release notes. As far as possible, we maintain compatibility for some minor versions.

๐Ÿคฉ Why using bpmn-visualization?

  • โœจ True opensource license without watermark display
  • โšก๏ธ Strong identity: the only BPMN viewer with a woman icon in the User Tasks
  • ๐ŸŽธ Fully documented and with a lot of integration examples
  • ๐Ÿ‘“ Highly customizable rendering in a simple way
  • ๐Ÿ”ฅ TypeScript support
  • ๐ŸŽฏ Battle tested: high test coverage, thousands of tests, including tests on all supported browsers for Linux, macOS and Windows

๐ŸŽจ Features

Already available features:

๐Ÿ”ฅ Some add-on features are available through a dedicated package: โฉ bpmn-visualization add-ons

Planned new features:

  • Additional BPMN styling capabilities
  • Library extension points

๐ŸŒ Browsers Support

Chrome Chrome Firefox Firefox Safari Safari Edge Edge
โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ

Notes:

  • Chromium based browsers should work (automatic tests are run with Chromium canary releases). In particular, the following desktop browsers are known working with [email protected]:
    • Brave 1.66.118
    • Chromium 125.0.6422.147
    • Opera 110.0.5130.66
  • Support Chromium Edge but not Legacy Edge
  • The library may work with the other browsers. They must at least support ES2015.

โ™ป๏ธ Usage

The library is available from NPM.
We support various module formats such as:

  • ESM: dist/bpmn-visualization.esm.js
  • IIFE: dist/bpmn-visualization.js and its minified companion dist/bpmn-visualization.min.js

๐Ÿ“Œ Usage in applications and projects

Install bpmn-visualization:

npm i bpmn-visualization

Then use this snippet to load your BPMN diagram in a page:

import { BpmnVisualization } from 'bpmn-visualization';

// initialize `bpmn-visualization` and load the BPMN diagram
// 'bpmn-container' is the id of the HTMLElement that renders the BPMN Diagram
const bpmnVisualization = new BpmnVisualization({ container: 'bpmn-container' });
let bpmnContent; // your BPMN 2.0 XML content
try {
  bpmnVisualization.load(bpmnContent);
} catch (error) {
  console.error('Error loading BPMN content', error);
}

You can set the BPMN content using one of the following ways:

  • Copy/Paste directly the XML content in a variable
  • Load it from an url, like this example
  • Load from your computer, like the demo example

๐Ÿ“œ TypeScript Support

The bpmn-visualization npm package includes type definitions, so the integration works out of the box in TypeScript projects. bpmn-visualization requires TypeScript 4.0 or greater. Past versions had the following requirements:

  • 0.21.0 to 0.27.1: TypeScript 4.5
  • 0.17.1 to 0.20.1: TypeScript 4.3

โ„น๏ธ If you are looking for examples of projects integrating bpmn-visualization with TypeScript, see the bpmn-visualization-examples repository.


NOTE

Prior version 0.27.0, bpmn-visualization required extra configuration for TypeScript projects as explained in the v0.26.2 README.


๐Ÿ’  Browser usage

In the HTML page:

  • Load bpmn-visualization (replace {version} by the recent version)
  • Define the container that displays the BPMN diagram, here bpmn-container
  • Load your BPMN diagram in a page
<script src="https://cdn.jsdelivr.net/npm/bpmn-visualization@{version}/dist/bpmn-visualization.min.js"></script>
...
<div id="bpmn-container"></div>
...
<script>
  // initialize `bpmn-visualization` and load the BPMN diagram
  // 'bpmn-container' is the id of the HTMLElement that renders the BPMN Diagram
  const bpmnVisualization = new bpmnvisu.BpmnVisualization({ container: 'bpmn-container'});
  let bpmnContent; // your BPMN 2.0 XML content
  try {
    bpmnVisualization.load(bpmnContent);
  } catch (error) {
    console.error('Error loading BPMN content', error);
  }
</script>

๐Ÿ‘ค User documentation

The User documentation (with the feature list & the public API) is available in the documentation site.

โš’๏ธ More

๐Ÿ’ก Want to know more about bpmn-visualization usage and extensibility? Have a look at the โฉ live examples site.

For more technical details and how-to, go to the bpmn-visualization-examples repository.

๐Ÿ”ง Contributing

To contribute to bpmn-visualization, fork and clone this repository locally and commit your code on a separate branch.
Please write tests for your code before opening a pull-request:

npm test  # run all tests

You can find more detail in our Contributing guide. Participation in this open source project is subject to a Code of Conduct.

โœจ A BIG thanks to all our contributors ๐Ÿ™‚

๐Ÿ“ƒ License

bpmn-visualization is released under the Apache 2.0 license.
Copyright ยฉ 2020-present, Bonitasoft S.A.

Some BPMN icons used by bpmn-visualization are derived from existing projects. See the BPMN Support documentation for more details:

โšก Powered by

statically.io logo

statically.io (demo and examples live environments)

surge.sh logo

surge.sh (demo and documentation preview environments)

bpmn-visualization-js's People

Contributors

aibcmars avatar assynour avatar benjaminparisel avatar brendanlaschke avatar csouchet avatar dependabot[bot] avatar nathaliec avatar process-analytics-bot avatar tbouffard avatar vickypicky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpmn-visualization-js's Issues

[FEAT] Manage BPMN input source parsing warnings/errors

Is your feature request related to a problem? Please describe.
The lib should provide feedback and/or callbacks for any parsing errors/warnings that occurs on BPMN source input load.

Describe the solution you'd like
In the 1st implementation (#22), we skip this part as we only managed the happy path. As a consequence, some TODO remain in the code.
As for #21, we must manage all runtime parsing errors/warnings to provide feedback to the end user or allow the developer who integrates our lib to detect them.

Describe alternatives you've considered
N/A

Additional context
N/A

[FEAT] Display Catch Message Intermediate Event

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Message Intermediate Event.

Describe the solution you'd like
Manage all Catch Message Intermediate Events declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Catch Message Intermediate Event won't be done as part of this issue and will be managed later.

BPMN specification

Message Intermediate Event

A Message Intermediate Event can be used to either send a Message or receive a Message.
The actual Participant from which the Message is received can be identified by connecting the Event to a Participant using a Message Flow within the definitional Collaboration of the Process โ€“ see Table 10.1. See page 91 for more details onMessages.

Message

An ItemDefinition is used to specify the Message structure.

Attribute Name Description/Usage
name: string Name is a text description of the Message.
itemRef : ItemDefinition [0..1] An ItemDefinition is used to define the โ€œpayloadโ€ of the Message.

Validate that Bonita could use the library for process and case visualization - Monitoring of all process instances / cases for a defined process

The purpose of this issue is to ensure that the lib can replace the current Bonita Enterprise (7.11.0) visualization capabilities that are presented in #12 (comment)

Display the BPMN diagram

โœ”๏ธ see #361 and see #428

  • BPMN source retrieved by fetching an url
  • the diagram fit the whole viewport on load
  • zoom in/out with mouse wheel and a html slider element (which also allow to reset the zoom)
  • panning can be done by holding and draging the diagram
  • the viewport dimension don't change when the diagram outside the viewport (no scrollbars)

Overlays

โœ”๏ธ see mxGraph out of the box capabilities and poc with mxGraph

  • display the cardinality of current active nodes with all states we know of. see #429
  • highlight on elements in progress see #430

mxGraph overlay capabilities examples

POC tbouffard/mxgraph-js-playground#1

  • overlays on mouse click and highlight on mouse over
  • path detection on mouse over

Rendering

The lib should provide BPMN parsing and rendering extensions to cover the following. Notice that the extensions won't be managed in first milestones

  • Bonita generates BPMN with extensions, for instance for Bonita Connectors, which are rendered with a extra plug marker. see #431
  • Bonita has its own BPMN look&feel. For instance, event in red, gateway in yellow/orange, dedicated user task icon. It will use the extension provided in #424

โœ”๏ธ The following capabilities will be available in the future to cover Bonita needs

  • BPMN shape extension/redefinition: custom icon and colors. we currently don't know how this will be customizable, at least with JS/TS code. See #424
  • Later support for BPMN extensions in parsing and model

[FEAT] Display Throw Message Intermediate Event

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Throw Message Intermediate Event.

Describe the solution you'd like
Manage all Throw Message Intermediate Events declared in the bpmn input source

Depends on #213

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Throw Message Intermediate Event won't be done as part of this issue and will be managed later.

BPMN specification

Message Intermediate Event

A Message Intermediate Event can be used to either send a Message or receive a Message.
The actual Participant from which the Message is received can be identified by connecting the Event to a Participant using a Message Flow within the definitional Collaboration of the Process โ€“ see Table 10.1. See page 91 for more details onMessages.

Message

An ItemDefinition is used to specify the Message structure.

Attribute Name Description/Usage
name: string Name is a text description of the Message.
itemRef : ItemDefinition [0..1] An ItemDefinition is used to define the โ€œpayloadโ€ of the Message.

Validate that Bonita could use the library with interactivity to called cases

This seems to be related to collapsed call activities: click on the call activity and be able to navigate to the current instance of the called case/process instance
for process and case visualization: Enhance Bonita current case/process visu capabilities with interactivity to called cases
Bonita case/process visu is translated as: Monitoring of all process instances / cases for a defined process

[FEAT] Display a None Start Event after reading a bpmn input source

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the none start event

Describe the solution you'd like

As part of this 1st feature, we are going to setup the whole infrastructure allowing us to render other bpmn elements

  • load the xml bpmn input source and transform it into an internal model
  • display the none start event regarding the internal model information
  • simple display configuration to render the none start event
  • add test frameworks
  • update the test section of the CONTRIBUTING GUIDE

Describe alternatives you've considered
N/A

Additional context
We use the start event to build the fundation of the lib, bpmn pool and lane whose it belongs will be managed later
The final shape rendering none start event of the won't be done as part of this issue and will be managed later

contributors help: add usage advices

  • TypeScript usage (sum up its pros and cons, how to use and how not to use it)
  • IDE Tips (IDEA IntelliJ at least):
    • eslint (settings + apply ESLint code style rules)
    • mocha test template (add env variables)

[FEAT] Display Sequence flow

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the sequence flow

Describe the solution you'd like
As we are able to render a none start event and an user task, let render the sequence flow between this two kind of elements.

As part of this 1st feature aboutsequence flow , we are going to setup the whole infrastructure allowing us to render other sequence flow elements

Describe alternatives you've considered
N/A

Additional context
N/A

[FEAT] Display Exclusive gateway

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Exclusive gateway.

Describe the solution you'd like
Manage all Exclusive gateways declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Exclusive gateway won't be done as part of this issue and will be managed later

[FEAT] Handle case where the BPMN elements have no Id

Is your feature request related to a problem? Please describe.
In the BPMN standard, all the elements of the Semantic can have no Id.

Describe the solution you'd like
If there is no id on a model object, use its name as id on MxGraph.

Describe alternatives you've considered
If there is no id on a model object, use the id of its Shape/Edge as id on MxGraph.

Additional context
https://www.omg.org/spec/BPMN/20100501/Semantic.xsd

<xsd:complexType name="tBaseElement" abstract="true">
   <xsd:sequence>
      <xsd:element ref="documentation" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="extensionElements" minOccurs="0" maxOccurs="1" /> 
   </xsd:sequence>
   <xsd:attribute name="id" type="xsd:ID" use="optional"/>
   <xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>

[FEAT] Display Message Start Event

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Message start event.

Describe the solution you'd like
Manage all Message start events declared in the bpmn input source.
Check if the attribute trigger of Start Event is equals to Message.

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Message start event won't be done as part of this issue and will be managed later.

BPMN specification
The trigger for a Start Event is designed to show the general mechanisms that will instantiate that particular Process. There are seven (7) types of Start Events for top-level Processes in BPMN (see Table 10.84): None, Message, Timer, Conditional, Signal, Multiple, and Parallel.

[FEAT] Detect Send task

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Send task.

Describe the solution you'd like
Manage all Send tasks declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Send task won't be done as part of this issue and will be managed later

BPMN specification
Depends on #142.

A Send Task object shares the same shape as the Task, which is a rectangle that has rounded corners. However, there is a filled envelope marker (the same marker as a throw Message Event) in the upper left corner of the shape that indicates that the Task is a Send Task.

A Send Task is a rounded corner rectangle that MUST be drawn with a single thin line and includes a filled envelope marker that distinguishes the shape from other Task types (as shown in Figure 10.13).

image

[FEAT] Display Parallel gateway

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Parallel gateway.

Describe the solution you'd like
Manage all Parallel gateways declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Parallel gateway won't be done as part of this issue and will be managed later

[FEAT] Display Call activity

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Call activity.

Describe the solution you'd like
Manage all Call activities declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Call activity won't be done as part of this issue and will be managed later

Project build tool

When Marcin is back, discuss the webpack / rollup question in our use case: a few libs and not a big project.

Learn the basics of mxGraph: display two human tasks linked by a transition

Without using any back end, with no file to parse, try and create the JS model of human tasks and transitions, and display a human task followed by a transition followed by a human task.

As a team: Thomas + Marcin + Cรฉline, then only Thomas, then only Cรฉline.

Then we meet for demo to share the lessons learnt.

[FEAT] Have a graph in Visualization mode

Is your feature request related to a problem? Please describe.
Actually, we can move/modify all elements in the graph, when it displays.

Describe the solution you'd like
Disable all the MxGraph's features to edit the graph.

Describe alternatives you've considered

Additional context
See the different POCs that we done.

[FEAT] Implement an "exception handler" mechanism

A generic system that permits treatment for the exceptions.

  • parsing exception,
  • rendering,
  • etc...

The load BPMN content function should

  • return warnings/errors (sync or async), and not only throw an Error with generic message.
    • See #35.
    • The parsing code introduced a mecanism to collect warnings with #1479
  • not call the window.alert: fixed in 0.21.3. See #1761

[FEAT] Display Timer start event

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Timer start event.

Describe the solution you'd like
Manage all Timer start events declared in the bpmn input source.
Check if the attribute trigger of Start Event is equals to Timer.

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Timer start event won't be done as part of this issue and will be managed later.

BPMN specification
The trigger for a Start Event is designed to show the general mechanisms that will instantiate that particular Process. There are seven (7) types of Start Events for top-level Processes in BPMN (see Table 10.84): None, Message, Timer, Conditional, Signal, Multiple, and Parallel.

[INFRA] xml bpmn to json: do we keep namespace in json model attribute names or not?

As of #22, our first implementation do not keep namespace from the xml node, mainly to simplify the implementation.
For now, especially as we do not manage bpmn extensions, we are not expecting node name collisions because AFAIK, bpmn standard schemas do use different names.

To be discussed to decise whether or not, we can continue like this or if we need to keep the namespace in the json model attribute names
TODO: provide an example to make the situation more explicit (bpmn xml and related json model)

[FEAT] Display Event Sub-Process

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Event Sub-Process.

An Event Sub-Process is a specialized Sub-Process that is used within a Process (or Sub-Process). A Sub-Process is defined as an Event Sub-Process when its triggeredByEvent attribute is set to true.

image

Describe the solution you'd like
Manage all Event Sub-Processes declared in the bpmn input source

Depends on #304

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Event Sub-Process won't be done as part of this issue and will be managed later

[FEAT] Render start event as Marker of Collapsed Event Sub-Processes

Describe the solution you'd like
Update the MxGraph shape for Collapsed Event Sub-Processes, to render the start event marker.

What it's already done
All the elements of a sub process are parsed (in ProcessConverter), but not displayed if the sub process is collapsed (bpmn-model-registry.ts & BpmnRenderer).
To add a new style on a BPMN element, see StyleComputer.
For more information, see the developpement documentation.

BPMN specification
The Start Event of an Event Sub-Process MUST have a defined trigger.
The trigger for a Start Event is designed to show the general mechanisms that will instantiate that particular Process.

A Start Event can also initiate an inline Event Sub-Process (see page 174).
In that case, the same Event types as for boundary Events are allowed (see Table 10.86), namely: Message, Timer, Escalation, Error, Compensation, Conditional, Signal, Multiple, and Parallel.

If the Event Sub-Process is collapsed, then its Start Event will be used as a marker in the upper left corner of the shape (see Figure 10.30).

image

Note for implementation
See the development documentation for details.

At parsing time, we already know that we have a collapsed event subprocess and we know the inner elements. It will probably easier for the rendering part that we compute the start event kind in this case during parsing.
This will make the rendering easier: get the information and do the display.

Please start a discussion with a implementation proposal prior starting the actual implementation.

โš ๏ธ Check the contribution guidelines for BPMN support

[FEAT] Detect Start Signal Event on Top-Level

Is your feature request related to a problem? Please describe.
Given a bpmn input source, detect the bpmn Signal start event.

Describe the solution you'd like
Manage all Signal start events declared in the bpmn input source.
Check if the attribute trigger of Start Event is equals to Signal.

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Signal start event won't be done as part of this issue and will be managed later.

BPMN specification
The trigger for a Start Event is designed to show the general mechanisms that will instantiate that particular Process. There are seven (7) types of Start Events for top-level Processes in BPMN (see Table 10.84): None, Message, Timer, Conditional, Signal, Multiple, and Parallel.

image

image

Add more labels to issues and pull requests

Because it's a very open project, can we still use those labels?

  • WIP
  • Review needed
  • Review done
  • Change needed
  • Feedback integrated
  • Rebase needed
  • Merge only on release
  • Ready to merge
  • External contribution

You may need more that I don't use. So go ahead.
I was wondering if you had considered and discarded that or if this can still be done.

[infra] 'npm run lint-check' missing plugin error on MacOS

Describe the bug
lint-check npm scripts fails because of missing pluing on MacOS Catalina (v10.15)

To Reproduce
See https://github.com/bonitasoft-labs/bpmn-visu-js/runs/479745740 from #19
Run npm run lint-check

Additional context

Error logs

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the plugin "eslint-plugin-node".

(The package "eslint-plugin-node" was not found when loaded as a Node module from the directory "/Users/runner/runners/2.165.2/work/bpmn-visu-js/bpmn-visu-js".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-node@latest --save-dev

The plugin "eslint-plugin-node" was referenced from the config file in "node_modules/prettier-linter-helpers/.eslintrc.js".

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

[FEAT] Display Inclusive gateway

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Inclusive gateway.

Describe the solution you'd like
Manage all Inclusive gateways declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Inclusive gateway won't be done as part of this issue and will be managed later

[FEAT] Display Waypoints of an Edge

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Waypoint.

Describe the solution you'd like
Manage all Waypoints declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context

[DOC] Start project architecture documentation

  • choose documentation markup (markdown, asciidoctor, .....): asciidoctor in the docs folder of the repository
  • bpmn xml parsing
  • internal bpmn model
  • choose a solution for schema. Draw.io for source + svg for display?

[FEAT] display Lane

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpm lane and elements which belong to it.

Describe the solution you'd like
Manage all lanes declared in the bpmn input source.
Lane may be associated to the pool is needed.

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the lane won't be done as part of this issue and will be managed later.

When the child of a lane is not parsed, we just log an message, and continue the parsing. The error will be managed later.

[FEAT] Display Service task

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Service task.

Describe the solution you'd like
Manage all Service tasks declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Service task won't be done as part of this issue and will be managed later

[FEAT] display a user task

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the `enrich the 1st implementation #22

Describe the solution you'd like
Enrich the 1st implementation (#22) to be able to manage this new bpmn element in the bpmn input source.

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the user task won't be done as part of this issue and will be managed later

[FEAT] Detect Bonita Actor

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Actor.

Describe the solution you'd like
Manage all Actors declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Actor won't be done as part of this issue and will be managed later

[FEAT] Validate the BPMN input source

Is your feature request related to a problem? Please describe.
An invalid (aka invalid regarding xml syntax and XSD) bpmn input source (file, string, stream, ....) should be rejected

Describe the solution you'd like
The bpmn source a valid xml source and should conform to the set of XSD it references. So conformance check must first be done prior interpretation to ensure the defined model is valid.
This will prevent subsequent parsing errors or incomplete renderings.

Don't forget the error cases, when a field is not mandatory, and is empty, when we parse it !!!

Validation may be made optional and performance tests should be conducted to measure the overhead introduced by the validation.

Describe alternatives you've considered
N/A

Additional context
https://www.omg.org/spec/BPMN/2.0/About-BPMN
We could generate xml parsing error with the following guidance message: The file is not a BPMN file. see <BPMN spec link>

โš ๏ธ Check the contribution guidelines for BPMN support

[FEAT] Define the strategy for theming BPMN Elements (STYLE)

The library must not be restricted in terms of styling. It should

  • permit an easy change in the interface layer.
  • give the possibility to parametrize STYLE by default either by configuring the lib programmatically or by CSS

Details

With CSS

Programmatically

[FEAT] Display Receive task

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpmn Receive task.

Describe the solution you'd like
Manage all Receive tasks declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the Receive task won't be done as part of this issue and will be managed later

BPMN specification
Depends on #142.

Attribute Name Description/Usage
messageRef: Message [0..1] A Message for the messageRef attribute MAY be entered. This indicates that the Message will be received by the Task. The Message in this context is equivalent to an in-only message pattern (Web service). One (1) or more corresponding incoming Message Flows MAY be shown on the diagram. However, the display of the Message Flows is NOT REQUIRED. The Message is applied to all incoming Message Flows, but can arrive for only one (1) of the incoming Message Flows for a single instance of the Task.
instantiate: boolean = false Receive Tasks can be defined as the instantiation mechanism for the Process with the instantiate attribute. This attribute MAY be set to true if the Task is the first Activity (i.e., there are no incoming Sequence Flows). Multiple Tasks MAY have this attribute set to true.
operationRef: Operation This attribute specifies the operation through which the Receive Task receives the Message.
implementation: string = ##webService This attribute specifies the technology that will be used to send and receive the Messages. Valid values are "##unspecified" for leaving the implementa-tion technology open, "##WebService" for the Web service technology or a URI identifying any other technology or coordination protocol A Web service is the default technology.

A Receive Task object shares the same shape as the Task, which is a rectangle that has rounded corners. However, there is an unfilled envelope marker (the same marker as a catch Message Event) in the upper left corner of the shape that indicates that the Task is a Receive Task.

A Receive Task is a rounded corner rectangle that MUST be drawn with a single thin line and includes an unfilled envelope marker that distinguishes the shape from other Task types (as shown in Figure 10.15). If the instantiate attribute is set to true, the envelope marker looks like a Message Start Event (as shown in Figure 10.16).

image

image

[FEAT] display Pool

Is your feature request related to a problem? Please describe.
Given a bpmn input source, display the bpm pool and elements which belong to it.

Describe the solution you'd like
Manage all pools declared in the bpmn input source

Describe alternatives you've considered
N/A

Additional context
The final shape rendering of the pool won't be done as part of this issue and will be managed later

[infra] 'npm run lint-check' && 'npm run lint' try to use "strict/es5" config on MacOS bug infra

Describe the bug

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the config "strict/es5" to extend from. Please check that the name of the config is correct.

The config "strict/es5" was referenced from the config file in "/Users/csouchet/Source/Process Analytics/BPMN-Js/node_modules/check-error/package.json".

To Reproduce
Steps to reproduce the behavior:
Execute the comands :

  • npm run lint-check
  • npm run lint

Expected behavior
The commands run with no problem.

Screenshots

Desktop (please complete the following information):

  • OS: MacOs

Additional context

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.