Skip to main content

Business Processes

Business processes allow you to define business logic, including routing and message transformation. Business processes receive messages from other business hosts in the production for processing.

For general information related to all production components written in Java, see About Business Hosts and Adapters.

Developing a Business Process

To write business process in an external language, extend one of the following classes:

Language Class
Java com.intersystems.enslib.pex.BusinessProcess
.NET InterSystems.EnsLib.PEX.BusinessProcess

For information about sending messages between the business process and another business host, see Messaging.

Persistent Properties

Within InterSystems IRIS, business processes are persistent objects. For the lifespan of a Business Process, properties of the Business Process are stored and accessible during each callbacks. Within the PEX framework, you can save properties of the business process class saved by using @Persistent annotation in Java or the [Persistent] notation in .NET. Within InterSystems IRIS, persistent properties are saved in the corresponding instance of the business process. Persistent properties are restored before each callback and are saved after each callback. The @Persistent annotation only works for String, primitive types and their boxed types. The following is an example of using the @Persistent annotation:

public integer runningTotal = 0;

public string CurrentName = "temp";

Using the Business Process

When you want to integrate the business process into the production:

  1. Open the production in the Management Portal and add a business service based on the PEX class EnsLib.PEX.BusinessProcess.

  2. Define the remoteClassname setting of the new PEX business process as the Java class you created for the custom business process.

  3. Use the External Server setting to specify the external server for your language. For more details about external servers, see Running the External Server.

For example, suppose you have a business process written in a Java class called MyJavaBusinessProcess. To incorporate this custom business process into the production, you go to the Management Portal and add a business process based on the PEX class EnsLib.PEX.BusinessProcess. Once added, edit the RemoteClassname setting of the PEX business process to point to the Java classname MyJavaBusinessProcess.