Skip to main content
Previous sectionNext section

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.

Java and .NET Classes

A business service written in Java extends com.intersystems.enslib.pex.BusinessProcess.

A business service written in .NET extends 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";
Copy code to clipboard

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 gatewayHost and gatewayPort settings of the PEX business process to define the values of the Java Gateway.

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.