Process definition model and process scheduling for jBPM4 PVM

Source: Internet
Author: User

The complete jBPM4 PVM is published in the 8th phase of the programmer, where part of the interception means that PVM's process scheduling is very flexible, and PVM provides a set of token similar execution process scheduling mechanisms, through full control of execution, There is an infinite possibility of node run-time behavior.

The process definition model of PVM

The first thing to note is that the classes in the above diagram are all interfaces. At the top of the hierarchy is Observableelement, which provides the ability to process elements to attach event (events). In Observableelementimpl, it holds a collection property of events. For process elements, typical events are: Process start/end, node start/end, and transfer line execution (take).

Java code

Protected map<string, eventimpl> events;

And what did the event do? Eventimpl holds EventListener instances through a collection of eventlistenerreference instances. This makes it very easy to get event listeners through the process elements themselves and execute them when the engine executes the process scheduling.

Java code

protected list<eventlistenerreference> listenerreferences;

Consistent with the traditional observer pattern, the EventListener interface has and has only one method:

Java code

void Notify (Eventlistenerexecution execution) throws Exception;

The next observableelement is Compositeelement, which expands the Observableelement interface. Let's take a look at its approach:

Java code

List<? extends Activity> getActivities();

  boolean hasActivity(String activityName);

  Activity getActivity(String activityName);

Obviously, it holds a collection of activity, and for ProcessDefinition it's a natural thing to do: The process definition contains multiple node definitions. The important thing is that the activity itself is gorgeous: the node definition implements nesting, and the structure blocks appear. Look at the illustrated words:

This design is not in the jBPM3, but it must appear in the jBPM4, because the structure block is an important concept in BPEL and BPMN. Since it is known as PVM, it must salute Bpel and BPMN. We can see later that the introduction of structural blocks adds a great degree of complexity to engine process scheduling. In JPDL, the corresponding implementation is group. This is the most important change in the JBPM4 process definition model.

ProcessDefinition and activity respectively inherit from compositeelement,activity and transition to establish bidirectional association, these three are also standard models in workflow model.

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.