concept process engine in category esb

appears as: process engine, process engines, process engine, The process engine
Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix

This is an excerpt from Manning's book Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix.

In the integration market, these stateful flows are often implemented in process engines. Process engines are designed and implemented to be able to preserve state between message invocations by using transactions and database persistency by default. Within a process engine, stateful flows are often called processes; you can implement these processes with a process-definition language, such as the Web Services Business Process Execution Language (WS-BPEL) OASIS standard.

In this chapter, you implement a case study in which hotel guests book scuba diving trips using WS-BPEL. This example shows the added value of a process engine. Multiple service invocations are required to book a scuba diving trip: a taxi reservation service, a lunch reservation service, and a booking service for the trip at a diving agency. Implementing such a case study with just ESB message flows would lead to a complex, difficult-to-maintain integration solution. By using a process engine, you can implement the service invocations with one process definition that takes care of the service orchestration.

A process manager is often implemented by a process engine, which is a product that executes in its own environment and is solely focused on the execution of processes. Examples of process engines include IBM WebSphere Process Server, Oracle BPEL Process Manager, Microsoft BizTalk, ActiveBPEL Engine, and two engines that we use in this chapter: JBoss jBPM and Apache ODE.

The process manager maintains the state of a sequence. A process implementation involves multiple steps or activities that need to be processed. The process manager or process engine makes sure that the state of the process (think of variables and correlation) is maintained between the steps or activities.

The next processing step is determined based on intermediate results. The process logic sometimes involves a choice between two or more activities to be executed. The process manager or process engine can evaluate this choice based on the execution path and the variables of the process’s current state.

As we said, a process involves multiple steps or activities. These steps or activities can also involve the invocation of external services or applications. Considering that the process engine that provides the runtime environment for the processes executes in its own environment, how are these invocations implemented? Does the process engine invoke the external service or application? Technically, the process engine could perform the invocation of a service or application. But in the context of an organization’s integration landscape, the process engine shouldn’t implement this invocation or mediation logic. This is the task of the ESB.

In earlier chapters, you didn’t use a process engine; the integration logic was implemented by Mule and ServiceMix. These two integration platforms provide the functionality needed to, for example, route, transform, and log a message. The introduction of a process manager or process engine doesn’t change this. The added value of a process engine consists of the functionality to execute and monitor processes and to interact with the ESB. Figure 11.1 provides a schematic overview of an integration architecture with both a process engine and an ESB.

Figure 11.1. Integration architecture that includes a process engine and an ESB. The process engine is responsible for managing the state of the process, and the ESB is responsible for technical integration aspects like routing, transformation, and connectivity.

As figure 11.1 shows, the process engine provides an execution environment for processes. This example shows two different processes; process 1 has two instances running, and process 2 has one instance. It’s important to notice that for process 1, each instance has its own state maintained by the process engine. For each invocation to an external service or application, the process engine uses the ESB for the integration logic.

The figure shows a number of patterns that can be implemented in the ESB environment. The ESB communicates with the external services and applications, and does the actual invocation. The optional response message is then routed back to the correct process instance in the process engine.

Figure 11.1. Integration architecture that includes a process engine and an ESB. The process engine is responsible for managing the state of the process, and the ESB is responsible for technical integration aspects like routing, transformation, and connectivity.