Jbpm development: configure the Eclipse IDE development environment

Source: Internet
Author: User
Tags jbpm

The preceding section describes how to publish the jbpm console application to the WebLogic Server. The following describes how to configure the eclipse development environment to improve the efficiency of subsequent jbpm development.

 

JBoss provides eclipse-based plug-in tools for jbpm. Therefore, developers can use native Eclipse IDE or integration tools such as myeclipse.

I use myeclispe as the development tool. Therefore, this article uses myeclipse as the configuration environment.

 

1. Configure development tools

 

1. Install eclipse designer to myeclipse6

Copy the files and folders under the jbpm-jpdl-suite-3.2.3/DESIGNER/Eclipse/Plugins directory to the eclipse/Plugins directory under the myeclipse installation directory, and then restart myeclipse.

 

2. Install eclipse designer to myeclipse7

First, copy the files and folders under the jbpm-jpdl-suite-3.2.3/DESIGNER/Eclipse/Plugins directory to a specific directory,

Such as: D: \ genuitec \ myplugins \ jbpm-jpdl-designer-3.1.5;

In createpluginsconfig. JavaCode: New createpluginsconfig ("D: \ genuitec \ myplugins \ jbpm-jpdl-designer-3.0.11"). Print ();

Change the path to the directory of the jbpm designer plug-in and use the double slash (\) instead of the single slash (\). After running it, the console will output the result.

Then, copy the output result and add it to the Configuration \ org. Eclipse. Equinox. simpleconfigurator \ bundles.info file under the myeclipse7 installation directory.

Run the following command to start myeclipse in clean mode:Myeclipse.exe-clean

For details about createpluginsconfig, refer to the previous blog post myeclipse7 to install the plug-in.

 

3. Add a jbpm design and runtime environment

After myeclipse is startedWindows> preferences> JBoss jbpmAdd a jbpm runtime environment where the path points to the jbpm-jpdl-suite-3.2.3.

 

 

2. Configure the development environment

 

1. Create a jbpm process project

After installing the jbpm designer, you can find JBoss jbpm-> process project in the myeclipse new Wizard and create a jbpm process project according to the wizard.

The jbpm project structure after creation is as follows:

 

2. Modify database connection information

Modify the database connection information in the hibernate. cfg. xml file. You can select a connection method: JDBC driver and JNDI datasource.

JDBC driver method:

?[Copy to clipboard] View code XML

12345
Org. hibernate. dialect. oracle9dialectoracle. JDBC. Driver. oracledriverjdbc: oracle: thin: @ localhost: 1521: xegdcmsgdcms1

JNDI datasource method:

?[Copy to clipboard] View code XML

1
Java: COMP/ENV/jdbc/jbpmdb

To use JNDI, You need to define datasource on the WebLogic Server.

 

3. Add the jar Library File

Path: <Project>-> properties-> JAVA build path-> libraries-> Add external jars

Add the following library files:
Ojdbc14.jar
C3p0-0.9.0.jar: If you enable c3p0 connection pool in hibernate. cfg. xml configuration
Hibernate3.jar
Jbpm-webapp-3.1.2.jar

 

 

3. Configure the local release Environment

 

During jbpm workflow development, developers can publish the process definition to the database in the jbpm Management Console;

You can also configure a web application in myeclipse to publish the process definition. This section describes how to use myeclipse in the Development Environment

Configure the Web application to publish the process definition and view the execution flowchart.

 

1. Create a WEB Project

Use the myeclipse WEB Project Creation Wizard to create a web project.

 

2. copy configuration and tag library files

Copy the configuration files created in the preceding jbpm project to the new web application project. Copy the src/config. Files directory under the jbpm project to the web project.

Copy the jbpm. TLD file from the downloaded jbpm suite to the WEB-INF directory

Add a jar file. For more information, see 2.3.

 

3. Modify the Web. xml configuration

When a jbpm file is uploaded, the flowchart (JPG) file is uploaded to the database table jbpm_bytearray. Therefore, you need to add a servlet to process the image.

?[Copy to clipboard] View code XML

1234567891011121314
Uploadservletorg. jbpm. webapp. servlet. uploadservlet processimageservletorg. jbpm. webapp. servlet. processimageservlet uploadservlet/upload processimageservlet/processimage

 

4. Add the weblogic. xml configuration file.

AddWeblogic. xmlFile to the WEB-INF directory, the main content includes:

?[Copy to clipboard] View code XML

1234
True/jbpmweb

 

5. Add the release process page.

Deploy.html of the jbpmworkflow workflow page under webroot.zip the code of the page is as follows:

?[Copy to clipboard] View code html4strict

12345678910
 <Title> Deploy a process archive file</Title>  <H2> Let's deploy a process </H2>     <Form Action="Upload" Enctype="Multipart/form-Data" Method="Post" /> Select the file you want to upload: <BR>  </Form> 

Running effect:

 

6. added the process execution Status display page.

 

Add the jbpm process running page showdiworkflow. jsp In the webroot path. After the process is run, provide the task instance id to query the process execution status,

The Code on the page is as follows:

?[Copy to clipboard] View code html4strict

123456789101112131415
 <Title> Provides the task instance id Query Process Execution Diagram</Title>  <Form Method="Post" Action="Showdiworkflow. jsp">  <P> Task instance ID: <BR>  </P>  </Form> 

:

 

 

Next articleArticleAnd then officially enters the development of the jbpm workflow.

Related Article

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.