deploy jbpm to database

here is just the simplest way:

1. download and install jbpm(please google it if you wanna know);

2. use eclipse to create flow names myworkflow;

3. copy jbpm.cfg.xml,,  jbpm.hibernate.cfg.xml which are under myworkflow src folder to my project myproj src folder. (the myproj project is in MyEclipse IDE);

attention:  if myproj has it’s own DataSource definition file(eg: applicationContext.xml has connection setting), the  jbpm.hibernate.cfg.xml need not to copy.

4. copy your design wf.jpdl.xml and wf.png to myproj(in this example:  src/

5.  create a java class in a suitable place:


import org.jbpm.api.Configuration;

import org.jbpm.api.ProcessEngine;

import org.jbpm.api.RepositoryService;

public class Test {

public void deploy() {

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

RepositoryService repositoryService = processEngine.getRepositoryService();

String deployid = repositoryService.createDeployment()


System.out.println(“generated deploymentId: ” + deployid);


public static void main(String[] args) {

System.out.println(“********** deploy ******************”);

try {

Test test = new Test();


} catch (Exception e) {

// TODO: handle exception





6. Run the class as Java Application.

if there’s no error, it’s done!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s