Analysis of jbpm and spring Integration

Source: Internet
Author: User
Tags jbpm

1. Create object classes related to document flow and create database tables

2. Based on the analysis of use cases, initially establish interfaces related to document flow

3. Implementation Interface

-Integrate jbpm into the OA system (step 1: Create a database table)

◆ Copy the relevant dependency package to the WEB-INF/lib (bsh. Jar/jcr-1.0.jar/jbpm-identity.jar/jbpm-jpdl.jar)

◆ Modify hibernate. cfg. XML, add the ing configuration of jbpm, and configure cache attributes.

◆ Because the user object in jbpm conflicts with the user object name in the OA system, you need to modify the auto-import attribute mapped to "false" in the OA system ". (See user. HBM. XML)

◆ After modifying the auto-import = "false" of the user ing, you need to use the full path class name when querying the user object (see usermanagerimpl. Java)

◆ Start Tomcat and properly create all database tables of jbpm

-Integrate jbpm into the OA system (step 2: integrate with spring)

◆ Jbpm and spring integration, need to use third-party integration package: spring-modules-0.8.zip

◆ Copy the spring-modules-jbpm31.jar to the WEB-INF/lib.

◆ The jbpm and spring integration methods are as follows: The jbpmconfiguration object is created by spring.

◆ Therefore, jbpm and spring integration require jbpmconfiguration object creation in the spring configuration file.

Configure jbmp Configuration

<bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">      <property name="configuration" value="classpath:jbpm.cfg.xml"> </property> </bean>

◆ At this time, jbpm is required. cfg. XML. This is the configuration file of jbpm. We can copy default from the directory jbpm_home \ SRC \ jpdl \ org \ jbpm. jbpm. cfg. and rename it jbpm. cfg. XML

-Integrate jbpm into the OA system (Step 3: How to Implement the business logic class, see workflowmanagerimpl. Java)

◆ Injection is required when the jbpmconfiguration object is used

◆ When jbpmcontext object is used to manipulate jbpm, we need to set the hibernatesession object of jbpmcontext to the current hibernatesession object.

private JbpmContext getContext(){       JbpmContext context = jbpmConfiguration.createJbpmContext();       context.setSession(getSession());       return context;  } 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.