ExternalProcess Business Rule

Every transaction in OIPA can have business rules associated with it. These business rules are responsible for applying logic during the transaction lifecycle. Typical business rules will perform actions at a higher level than the transaction itself, such as generating a suspense account or writing data to fields (i.e. policy, role, client, etc.).

In order to facilitate greater flexibility, OIPA includes a special business rule that is capable of calling custom Java code called ExternalProcess.

Implementing ExternalProcess requires the following:

  1. A business rule named ExternalProcess attached to the transaction. The business rule will describe the Java class to be executed.
  2. The business rule name must exist in the TransactionBusinessRulePacket business rule in the order it should be executed relative to other attached business rules.
  3. An extension class that implements the IApeExtension interface.

Example XML Configuration

<ExternalProcess>      
<Namespace>com.example.extension</Namespace>  
<Object>ExternalProcessImpl</Object>      
<Parameters>          
<Parameter NAME="ParameterName">ParameterValue</Parameter>      
</Parameters> 
</ExternalProcess>

Java Implementation Details

The previous example requires that a class, com.example.extension.ExternalProcessImpl, implement the interface IApeExtension. This class must be present on the class path of the application's class loader. The IApeExtension interface is defined as follows:

public interface IApeExtension {
public void process( IActivityBll activityBll, Map <String, String> parameterCollection );
public void processUndo( IActivityBll activityBll, Map <String, String> parameterCollection );
}

The process(..) method is executed during forward processing. The processUndo(..) method is executed during reversal.

The activityBll parameter exposes the necessary surface area for extension. It's critical to understand that activities are executed as a single unit of work. That is, if any operation fails, then no changes will have been made to the system. To enable this, insert, change and delete operations are exposed by IActivityBll. All data changes should be made through these mechanisms, as they ensure proper transactional integrity.

Note: Direct modification of the database can lead to undesirable or inaccurate results.

 

 

 

 

 

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. About Oracle Insurance | Contact Us