Git Product home page Git Product logo

flowable-mongodb's Introduction

Flowable MongoDB

More information about Flowable: see http://www.flowable.org/ and https://github.com/flowable/flowable-engine

This repository contains the source code for using MongoDB as a persistent data store for the Flowable process engine (support for the other engines (CMMN/DMN) are not yet implemented).

It is currently considered in alpha state as not all features have been implemented. Once the default test suite runs fully against this implementation, it will be deemed stable.

Requirements

  • MongoDB 4.0+
  • Flowable 6.4.0+

Usage

Add the flowable-process-engine-mongodb and flowable-engine dependency to your Maven pom.xml (or a similar operation when not using Maven).

<dependency>
    <groupId>org.flowable</groupId>
    <artifactId>flowable-engine</artifactId>
    <version>6.4.0</version>
</dependency>
<dependency>
    <groupId>org.flowable</groupId>
    <artifactId>flowable-process-engine-mongodb</artifactId>
    <version>6.4.0.alpha1</version>
</dependency>

Create a ProcessEngine instance as follows (changing the server url as needed):

ProcessEngine processEngine = new MongoDbProcessEngineConfiguration()
    .setServerAddresses(Arrays.asList(new ServerAddress("localhost", 27017)))
    .setDisableIdmEngine(true)
    .buildProcessEngine();

Development

Single server

To set up a local MongoDB server that can be used to execute the unit tests against:

(Following instructions have been tested on OS X only. PR's for other systems appreciated!)

ulimit -n 4096
./mongod --port 27017 --bind_ip_all --dbpath ../data/ --replSet rs0
  • Now execute ./mongo from the bin folder
  • In this shell, execute
rs.initiate()

Notes:

  • The ulimit is needed or otherwise executing the unit tests quickly leads to the 'too many open files' exception.
  • Transactions are currently supported on replicasets only, hence the use of the replSet parameter.

Multiple servers

To set up a cluster of MongoDB servers that share the same replicaset and that can be used to execute the unit tests against:

  • Download the latest MongoDB community server from https://www.mongodb.com/download-center#community

  • Unzip and create data1, data2 and data3 folders in the unzipped folder

  • Start the MongoDB instances as follows through separate terminal windows

ulimit -n 4096
./mongod --port 27017 --bind_ip_all --dbpath ../data1/ --replSet rs0
ulimit -n 4096
./mongod --port 27018 --bind_ip_all --dbpath ../data2/ --replSet rs0 
ulimit -n 4096
./mongod --port 27019 --bind_ip_all --dbpath ../data3/ --replSet rs0
  • Now execute ./mongo from the bin folder
  • In this shell, execute
rsconf = {_id: "rs0", members: [ {_id: 0, host: "localhost:27017"}, {_id: 1,host: "localhost:27018"}, {_id: 2,host: "localhost:27019"}]}

rs.initiate(rsconf)

flowable-mongodb's People

Contributors

jbarrez avatar tijsrademakers 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.