jBpm API Introduction.

See:
          Description

Packages
org.jbpm START HERE - this is the central package that contains all the jBpm service interfaces.
org.jbpm.delegation is the package that contains all delegation interfaces and the ExecutionContexts.
org.jbpm.model.definition contains all classes to represent a process definition after deployment of a process archive.
org.jbpm.model.execution contains all classes that represent one execution of a process.
org.jbpm.model.log contains all classes that store the logs of a process execution.
org.jbpm.model.scheduler  

 

jBpm API Introduction

.

Services

The main package for using jBpm is org.jbpm This package contains all the service interfaces. jBpm has defined the services based upon the WfMC reference model. This means :

Configuration

To obtain these services you need a org.jbpm.JbpmServiceLocator. The easiest way to obtain a JbpmServiceLocator is by using the static org.jbpm.JbpmServiceLocator#getInstance() method.

A JbpmServiceLocator requires a JbpmConfiguration. The default constructor of JbpmServiceLocator will just use the JbpmConfiguration singleton instance. The JbpmConfiguration can be configured in different ways. The easiest way is to put a jbpm.properties in the root of your classpath. The content of the jbpm.properties file is explained in JbpmConfiguration.

Usage


// this code fragment shows how to use the jbpm execution service

// the next statement requires a jbpm.properties file in the root of the classpath
JbpmServiceLocator jbpmServiceLocator = JbpmServiceLocator.getInstance();

// the next line opens an execution service for user JohnDoe.
ExecutionService executionService = jbpmServiceLocator.openExecutionService("JohnDoe");
executionService.startProcessInstance("payraise");
executionService.close();
example of how to use the jBpm execution services



Version : jbpm-2.0