JBPM's table structure and six major services

Source: Internet
Author: User
Tags jbpm

For the development of JBPM, you should have the basic knowledge of the table structure of the understanding, as well as the familiarity of the API, I will take you to summarize these two aspects of knowledge:


First, JBPM table structure introduction
1. resource pool and runtime table structure (10 tables) jbpm4_deployment, jbpm4_deployprop, jbpm4_lob storage Flow definition related deployment information . jbpm4_execution is mainly to store JBPM4 execution information, execution mechanism instead of JBPM3 token mechanism . Jbpm4_task Store A activities (activity) that requires a person to complete, and activities that require a person to participate in the completion are called Tasks . jbpm4_participation Participant table, the participant information, the types of participants are candidate, Client, Owner, replaced assignee and viewer. The specific participant can be either a single user or a user group . jbpm4_swimlane swimlane table. Swimlane is a runtime Process Role. With Swimlane, multiple tasks can be assigned to the same actor at once . jbpm4_job stores the definition of a timer . jbpm4_variable is the temporary variable at the time of the occurrence.  jbpm4_property engine parameter table

2. Historical database table Structure (5 tables) jbpm4_hist_procinst and jbpm4_hist_actinst store The history of process instance and activity instance respectively . jbpm4_hist_detail Process History Detail table, save variable change record . Jbpm4_hist_var The historical information of the Jbpm4_hist_task TASK to save the historical variables . Jbpm4_hist_task The Task History table, the historical information of the tasks.

3. Authentication table Structure (3 sheets) jbpm4_id_group , jbpm_id_membership , jbpm4_id_user These three sheets are common, basic permissions control, Regarding the user authentication aspect suggestion or the own development one set, the component self-contained function is too simple, the use has many requirements to be difficult to satisfy
processengine is the source of all service APIs for JBPM4
the various services in JBPM are interdependent, but all service APIs are derived from Processengine, which is built by the configuration class, which is generated by the workflow engine.  Processengine is thread-safe, so it can be stored in static variables, even in Jndi naming services or other important locations. In an app, all threads and requests can use the same Processengine object, and the following code tells you how to get Processengine:
[Java]View Plaincopyprint?
    1. Processengine Processengine=configuration.getprocessengine ();
   the configuration in the code above uses the default profile under the Classpath root directory jbpm.cfg.xml create a processengine. If you want to customize the location, you can do this:
[Java]View Plaincopyprint?
    1. Processengine processengine=New Configuration (). Setresource ("Myjbpm.xml")
    2. Buildprocessengine ();


then, the 6 service can be obtained directly with processengine.getxxx (). Here's a description of the 6 service:
Similarly, we compare the table structure of the database to differentiate these services 1. Operating resource pool and runtime Services (4)
repositoryservice-Interface of the source service of the process. Provides operations for the deployment, query, and deletion of process definitions.   executionservice-interface of the Process Execution service. Provides start-up process instances, "execute" push, set process variables , etc. managementservice-interface of the process management Control service that provides asynchronous job-related execution and query operations.   taskservice-the interface of the human task service. Provides operations for creating, submitting, querying, saving, deleting tasks (Task).
2. Operation History Database service (1 ) historyservice-interface of the process history service. Provides query operations for historical process instances, historical activity instances, and so on in the process History library (that is, the completed process instance is classified). It also provides data analysis services such as the average duration of all activities in a process definition , the number of elapsed times of a transition in a process definition.  
3. Operational Identity Authentication Service (1 )
identityservice-The interface of the authentication service. Provides services related to process users, user groups, and group memberships
third, the current use of workflow issues:
1, the current task of the condition query:JBPM does not provide a flexible API for conditional queries and, if needed, can customize Hibernate queries to query task data from JBPM corresponding data tables. However, it is necessary to know more about the jbpm mechanism, and some complicated conditions are difficult to find with the information of JBPM itself.
2, statistics of the status of each process instance:You can use the process instance to query the JBPM system table, or you can add a status column to the corresponding data on the business table to count. The previous one is more troublesome, but the latter one is more intuitive, but does not reduce the amount of work due to the use of jbmp.
3. Combining workflow data with business data:It is generally associated by adding the identity of the corresponding data in the process instance as a variable. It is also possible to have a targeted extension of the JBPM system tables to achieve relevance to the business.
4. Historical data compatibility issues after the process has been modified:The JBPM workflow process defines the concept of a version, which is republished after the process is modified, not the same version as the old process. The system can differentiate between new and old processes.
Summary: data on business data and jbpm itself

In theory, if you use JBPM, you can put all your business data in the context of JBPM and no longer maintain business data tables. But the result is that business data cannot be easily obtained in environments outside the process, such as in statistical reports. So it's common to build business data tables that I don't use as a workflow, and then let Jbmp get business data from the Business data table and not keep business data in jbpm. Therefore, after using JBPM, there is basically no reduction in business data.

JBPM's table structure and six major services

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.