Giter VIP home page Giter VIP logo

camunda-engine-hazelcast's Introduction

camunda-engine-hazelcast

Hazelcast Persistence for Camunda (Community Extension)

Example Process

Getting Started

In order to get started with Camunda and Hazelcast, you need to setup a Java Project which has the camunda-engine-hazelcast in the classpath. If you use Apache Maven this would include the following dependencies:

<dependencies>
  <dependency>
    <groupId>org.camunda.bpm.ext</groupId>
    <artifactId>camunda-engine-hazelcast</artifactId>
    <version>1.0.0-alpha1</version>
  </dependency>
</dependencies>

Next, you create a Java Class with a Main Method configure and start Camunda:

public class Server {

  public static void main(String[] args) {

    ProcessEngine processEngine = new HazelcastProcessEngineConfiguration()
      .buildProcessEngine();

    try {

      // your code goes here...

    }
    finally {
      processEngine.close();
    }

  }

}

This starts up the Camunda Process Engine with an embedded Hazelcast Instance.

Once you have this set up, you can deploy a bpmn process:

// repository service allows managing deployments
final RepositoryService repositoryService = processEngine.getRepositoryService();

// create a new deployment of a simple workflow
repositoryService.createDeployment()
  .addModelInstance("test-process.bpmn",
    Bpmn.createExecutableProcess("testProcess")
      .startEvent()
      .receiveTask("waitForMessage")
      .endEvent()
    .done())
  .deploy();

In the code example above, the BPMN process is created using the fluent dsl. Resulting process consists of a start event, a message receive task and an end event:

Example Process

This process can be started like this:

final RuntimeService runtimeService = processEngine.getRuntimeService();

// start the process
ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess");

// signal the process instance to continue
runtimeService.signal(pi.getId());

Read the Camunda Documentation.

camunda-engine-hazelcast's People

Contributors

meyerdan avatar

Watchers

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