Giter Club home page Giter Club logo

react-bpmn's Introduction

react-bpmn

CI

Use bpmn-js to display BPMN 2.0 diagrams in a React application.

Usage

import ReactBpmn from 'react-bpmn';


function App(props) {

  function onShown() {
    console.log('diagram shown');
  }

  function onLoading() {
    console.log('diagram loading');
  }

  function onError(err) {
    console.log('failed to show diagram');
  }

  return (
    <ReactBpmn
      url="/public/diagram.bpmn"
      onShown={ onShown }
      onLoading={ onLoading }
      onError={ onError }
    />
  );
}

Development

To get the development setup make sure to have NodeJS installed. As soon as you are set up, clone the project and execute

npm install
npm run all

Example

To run the example, execute npm run start and open http://localhost:5000/public in your Webbrowser.

Resources

License

MIT

react-bpmn's People

Contributors

dependabot[bot] avatar gilesbradshaw avatar joey-kwl avatar nikku avatar renovate[bot] avatar smbea 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

react-bpmn's Issues

Running the example doesn't work for me

Describe the Bug
When I run the example using the instructions, I see an empty web page instead of the viewer.

Steps to Reproduce

[~/react-bpmn/example]$ npm install

up to date, audited 36 packages in 354ms

1 high severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

[~/react-bpmn/example]$ npm start

> [email protected] start
> sirv . start --dev

  Your application is ready~! 🚀

  - Local:      http://localhost:5000
  - Network:    Add `--host` to expose

────────────────── LOGS ──────────────────

  [09:15:39] 404 ─ 1.25ms ─ /
  [09:15:39] 404 ─ 0.14ms ─ /favicon.ico

Expected Behavior

I expect to see the bpm viewer.

Environment

  • Host Firefox 104.0.1 (64-bit), npm v8.11.0
  • OS: NixOS 22.05.2889.67e45078141
  • Library version: 0.0.0

Screenshot from 2022-09-11 09-17-59

supplied diagram likely outdated

Great little project you have put together here. Found it to be a very good starting point, so i appreciate the work you have done.

Noticed a slight hicky in your example that caused me some headaches in the start.

Was getting this error:

js failed to show diagram Error: failed to parse document as <bpmn:Definitions> at ai (bpmn-navigated-viewer.production.min.js:2) at bpmn-navigated-viewer.production.min.js:2 at new Promise (<anonymous>) at gi.fromXML (bpmn-navigated-viewer.production.min.js:2) at Li.fromXML (bpmn-navigated-viewer.production.min.js:2) at bpmn-navigated-viewer.production.min.js:23 at new Promise (<anonymous>) at Sr.<anonymous> (bpmn-navigated-viewer.production.min.js:23) at Sr.importXML (bpmn-navigated-viewer.production.min.js:2) at ReactBpmn.displayDiagram (index.esm.js:163) ...

Seems as if the referenced bpmn diagram in your example might be outdated as it breaks during parsing. From an earlier issue i found a sandbox where you referenced some other file

Seems like the diagram simply needs to be updated or swapped out for something else

Module not found:Can't resolve 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js'

Failed to compile
./node_modules/react-bpmn/dist/index.esm.js

Module not found: Can't resolve 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js' in '/home/React/location/node_modules/react-bpmn/dist'

Describe the Bug

Module not Found 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js'

Steps to Reproduce

1. npm install react-bpmn in react app
2. Followed the steps mentioned in README.md
3. On running the app, i get this error

Expected Behavior

Environment

  • Host (Browser/Node version), if applicable: Chrome 79/node:10.16
  • OS: Ubuntu 18.04
  • Library version: 0.1.1

Doesn't work

I did follow steps:

  • npm install --save react-bpmn
  • done exactly the same steps which described in "Usage" section of readme.md
  • but i couldn't to see the graph editor and getting the error like on screenshot below:

image

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.