Tutorial: JBPM4.4 learning path (1): setting up a damn Hello World Environment

Source: Internet
Author: User
Tags jbpm
Tutorial: JBPM4.4 learning path (1): Introduction to setting up a damn Hello World Environment

I can't remember how many types of Hello World I have written, or even I can't remember how many things I have stayed at the level of Hello World, so I am deeply blaming myself for this.

Workflow: automation of part of a business process or the entire computer environment.

Concept. Briefly describe this profound problem. How do you ask for leave from your teacher? In the most primitive way, you ran to the teacher and said, "Teacher, I have a stomachache and want to go to the hospital ". The teacher said, "OK ". Formally, fill out a leave application form and hand it over to the teacher. The teacher gives instructions on the form. All of them are in the paperless office era. What should I do with my computer? Fill in the application form on the webpage, and click apply. The instructor will approve the application after seeing the application on another computer. Asking for leave is a business process. automation saves you the trouble of handing in to your teacher.

Development Environment Construction

Install the JBPM plug-in. As we all know, the installation files for offline plug-ins are:

  1. Install \ src \ gpd \ jbpm-gpd-site.zip

Of course, you 'd better add Schema validation. The process is not easy to say, the file is in.

  1. Src> jpdl-4.0.xsd
Project Configuration

Add the core reporting jbpm. jar and add all the packages under the lib directory, except for these.

Then add the junit 4 test package.

Copy the configuration file in the example/src directory.

Modify jbpm. hibernate. cfg. xml

  1. <Hibernate-configuration>
  2. <Session-factory>
  3.  
  4. <Property name = "dialect"> org. hibernate. dialect. MySQLDialect </property>
  5. <Property name = "connection. url"> jdbc: mysql: // localhost: 3306/jbpm </property>
  6. <Property name = "connection. username"> root </property>
  7. <Property name = "connection. password"> gaopeng </property>
  8. <Property name = "connection. driver_class"> com. mysql. jdbc. Driver </property>
  9. <Property name = "myeclipse. connection. profile"> mysql </property>
  10. <Property name = "show_ SQL"> true </property>
  11. <Property name = "hbm2ddl. auto"> update </property>
  12.  
  13. <Mapping resource = "jbpm. repository. hbm. xml"/>
  14. <Mapping resource = "jbpm.exe cution. hbm. xml"/>
  15. <Mapping resource = "jbpm. history. hbm. xml"/>
  16. <Mapping resource = "jbpm. task. hbm. xml"/>
  17. <Mapping resource = "jbpm. identity. hbm. xml"/>
  18.  
  19. </Session-factory>
  20. </Hibernate-configuration>

Do not forget to create a database jbpm. UTF-8 encoding format.

Automatic database creation
  1. Public class CreateDB {
  2.  
  3. @ Test
  4. Public void test (){
  5. // Obtain the configuration object
  6. Configuration configuration = new Configuration ();
  7. // Non-standard configuration, which must be specified
  8. Configuration. configure ("jbpm. hibernate. cfg. xml ");
  9. Configuration. buildSessionFactory ();
  10. }
  11. }

Test Run: the database is as follows.

In the eyes of many programmers, the program operates the database, so almost every step of the operation needs to correspond to the database.

 

 

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.