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:
For information about sending messages between the business process and another business host, see Messaging.
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:
@Persistent public integer runningTotal = 0; @Persistent public string CurrentName = "temp";
Using the Business Process
When you want to integrate the business process into the production:
Open the production in the Management Portal and add a business service based on the PEX class EnsLib.PEX.BusinessProcess.
Define the remoteClassname setting of the new PEX business process as the Java class you created for the custom business process.
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.