42

BPMN for Node.js

 4 years ago
source link: https://github.com/ralphhanna/bpmn-server
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

bpmn-server

Introduction

BPMN 2.0 Modeling, Execution and Persistence, an open source Workflow Server for Node.js

Table of Contents

Documentation

Process modeller

A web based modeler is included based on http://bpmn.io , models definitions are saved at your server

Process Execution

bpmn-server provides an bpmnEngine to execute your workflow definition supporting most of BPMN 2.0 elements

Process Server

provides an environment to presist execution Instances while running and communicate with your application.

Applications can monitor and communicate to Instances whether they are running or offline, allowing user interface to query and process Workflow steps

Data Queries

Since instances are saved in MongoDB you can easily query your instances (running or completed)

Sample Web App

Included is a sample web application (running Node.js and Express.js) to allow you to visualize your workflow

Installation

This package requires Node.js and an access to MongoDB

  1. Create new Folder $ mkdir myBPMN $ cd myBPMN
  2. npm:

$ npm install bpmn-server 3) copy WebApp folder

$ cp node_modules/bpmn-server/WebApp/. ./ -r

  1. Edit configuration file to have MongoDB point to your server or free cloud account

  2. run the app

node app

Demo

a full demo site is available @ http://bpmn.omniworkflow.com

Example

import { BPMNServer } from '../src/BPMNServer';

const config = require('../configuration.js').configuration;

test();
async function test() {
    let name = 'Buy Used Car';

    server = new BPMNServer(config);
    let execution = await server.execute(name, {user:'rhanna'}, { caseId: 999 });
    let instance = execution.instance;
    let items = execution.instance.items;
    console.log(items);

for more complete examples see Examples

Acknowledgments

The bpmn-server resides upon the excellent library bpmn-io/bpmn-moddle developed by bpmn.io

The bpmn-server is inspired by the library bpmn-engine


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK