The architecture of the JBPM4

Source: Internet
Author: User
Tags event listener

4.1. APIs

The process virtual machine contains 4 integrated APIs that cover complete process work in different execution modes. Each API has a specific purpose that satisfies the following schema.

4 APIs in the process virtual machine

Figure 4.1. 4 APIs in the process virtual machine

The service interface is used in the application code to interact with the process virtual machine, which runs in the persistence mode of the support transaction, and the backend is based on the database. This is the most common way for users to use PVM as a workflow engine.

If you do not want to execute the process in a persistent fashion, you can use the client API directly to process processes and execute objects. The client API exposes the methods of the core model objects externally.

The activity API is used to implement the behavior of an activity at run time. So an activity type is actually a component, and the core is the implementation of the Activitybehaviour interface. An active behavior implementation can control the flow of execution.

The event Listener API is used to write Java code that can be used to handle process events. It is similar to the active API, and the only difference is that the event listener does not control the executing process.

4.2. Activity API

The Activity API allows you to implement runtime activity behavior using Java.

Public interface Activitybehaviour extends Serializable { 
void execute (activityexecution execution) throws n; 
}

An activity is a behavior that is assigned to an activity. The delivery is performed to reach the execution of this activity. The Activityexecution interface exposes methods for controlling the execution process.

Public interface Activityexecution extends Openexecution { 

void waitforsignal (); 
void Take (String transitionname); 
void execute (String activityname); 

... 

}

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.