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 an external language, 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
Python iris.pex.BusinessProcess

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

Persistent Properties

Within InterSystems IRIS, native business processes are persistent objects. For the lifespan of these business processes, properties are stored and are accessible during each callback. By default, a PEX business process lacks this characteristic; each method is called in a separate instance and the values of variables are not preserved. However, you can mimic the persistence of a native business process by making the properties of the PEX business process persistent. Use the following syntax to persist a property of a PEX business process:

// Use annotation to create a persistent property
// Strings, primitive types, and their boxed types can be persisted

@Persistent
public integer runningTotal = 0;
// Use attribute to create a persistent property
// Strings, primitive types, and their boxed types can be persisted

[Persistent]
public int runningTotal = 0;
#Set class variable to create persistent property
#Only variables of types str, int, float, bool and bytes can be persisted

PERSISTENT_PROPERTY_LIST=["myVariable1","myVariable2"]

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.

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 external 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.

Feedback