EnterpriseOne application logic can take any of three forms:
The ApplicationLogic_JAR.jar file contains the small set of Java business functions. This document describes the structure of ApplicationLogic_JAR.jar file and provides instructions for configuring and customizing Java application logic.
The ApplicationLogic_JAR.jar file's contents include the following artifacts:
| Artifact | Description | Location |
|---|---|---|
| Java class files | Java business function and supporting classes | / |
| BusinessMethodCatalog.xml | Maps business function names to Java class names. This catalog contains an entry for every business function for which a Java implementation exists. See Configuration for details. | / |
| ApplicationLogicSource.zip | Contains the Java source files and API documentation required to customize Java application logic. See Customization for details. | / |
There are two configuration files that affect what application logic form runs for a particular business function:
The presentation server loads LocalLogicCatalog.xml using the Java class path. Normally, this file is located in the WEB-INF folder where the WebClient.war web application is deployed.
LocalLogicCatalog.xml contains an entry for each business function that the EnterpriseOne development team has certified to run locally on the presentation server. These business functions are selected primarily to optimize the performance of frequently called table triggers and typically come in two varieties. First there are business functions written using Table Event Rules (TER) that are traditionally generated into C business functions that run on the enterprise server. Designating these to run locally tells the presentation server to interpret them locally rather than invoking their corresponding remote implementation. The second variety are business functions originally written in C but also have a Java implementation that lives in ApplicationLogic_JAR.jar.
Each entry in LocalLogicCatalog.xml is defined using the following form:
<business-logic module="B0000095" function="FormatCompany" run-local="true"/>
If analysis has determined that a business function described in LocalLogicCatalog.xml will perform better as a remote call to the enterprise server, change the run-local attribute to "false" and restart the presentation server.
The presentation server also loads BusinessMethodCatalog.xml using the Java class path. This file is usually deployed as part of ApplicationLogic_JAR.jar.
BusinessMethodCatalog.xml contains an entry for every business function for which a corresponding Java implementation exists. Each entry in this file is defined using the following form:
<business-method module="B0000095" methodName="FormatCompany" implClassName="com.peoplesoft.e1.bsfn.b0000095.FormatCompany"/>
If you extend or re-implement the Java implementation for a business function,
change the implClassName attribute to refer to the qualified class name for the
new implementation. The implementation class must extend
com.peoplesoft.e1.appsdk.bsfn.BusinessFunction.
Most of the logic that ApplicationLogic_JAR.jar contains implements granular, low-maintenance business functions that table triggers invoke. Consequently, it rarely requires customization. If you have customized the corresponding C implementations for any of these business functions, it is highly recommended that you change LocalLogicCatalog.xml to redirect the presentation server to call them remotely. In the event that you absolutely need to extend or change one of the Java business functions that ApplicationLogic_JAR.jar contains, follow the instructions in this section.
| Artifact | Description | Location |
|---|---|---|
| readme.html | This document; describes the structure of ApplicationLogic_JAR.jar and provides instructions for configuring and customizing Java application logic. | /doc |
| index.html | Javadoc for application APIs that Java business logic can invoke | /javadoc |
| Java source files | Java business functions and supporting classes | /src |
| build.bat | A batch file that builds ApplicationLogic_JAR.jar | / |
executeBsfn method and invoke the superclass's
executeBsfn method in turn. Add your custom logic
before and/or after the call to the superclass.Here is an example:
public class MyConvertDescriptiontoAN8 extends ConvertDescriptiontoAN8
{
public void executeBsfn(BsfnRequest request, BsfnResponse response)
throws BusinessMethodException
{
// Invoke the superclass application logic.
super.executeBsfn(request, response);
// Implement additional application logic here. This
// can come before AND/OR after invoking the superclass
// logic.
}
}
ORcom.peoplesoft.e1.appsdk.bsfn.BusinessFunction. Your
class must implement both the executeBsfn and
getDataStructureFactory methods. executeBsfn
houses your application logic and normally begins by getting the
data structure object from the request. getDataStructureFactory
returns a factory that creates the appropriate type of data structure
instances. You will normally utilize an existing data structure class
from the com.peoplesoft.e1.datastructures package. Refer
to the Javadoc for the application APIs for details.Here is an example:
public class MyConvertDescriptiontoAN8 extends BusinessFunction
{
public void executeBsfn(BsfnRequest request, BsfnResponse response)
throws BusinessMethodException
{
D03B0108 bsfnData = (D03B0108)request.getDataStructure();
// Implement application logic here.
}
public DataObjectFactory getDataStructureFactory()
{
return D03B0108Factory.getInstance();
}
}
In either of the cases where you create a new class, whether you extend another business function class or not, you must update the appropriate BusinessMethodCatalog.xml entry accordingly. For example:
<business-method module="D03B0108" methodName="ConvertDescriptiontoAN8" implClassName="mypackage.MyConvertDescriptiontoAN8"/>
If you neglect this step, then the presentation server will not invoke your customized implementation.
| Environment Variable | Description |
|---|---|
| JAVA_HOME | The directory where your Java installation is located. This build script uses this for compiling and creating the jar file. It must be Java 2 Standard Edition 1.3 or later. |
| E1_JARS | The directory where the EnterpriseOne Jars are located. This typically refers to the WebClient.war's WEB-INF/lib directory. |
This batch file invokes javac (the Java compiler) and jar (the Jar tool). If you prefer another build process or technology, or are working in a non-Windows environment, create an analogous script.