5 Understanding the Business Services Framework

This chapter contains the following topic:

5.1 Business Services Framework

JD Edwards EnterpriseOne provides interoperability with other Oracle applications and third-party systems by natively producing and consuming web services. A web service is a standardized way for disparate systems and applications to exchange information. JD Edwards EnterpriseOne web services are called published business services. A published business service is an Object Management Workbench (OMW) object consisting of one or more classes, one of which publishes methods. Each method performs a business process. You create a web service by creating a published business service and identifying the published class.

JD Edwards EnterpriseOne business services are classes that enable JD Edwards EnterpriseOne to expose a business transaction as a basic web service. A JD Edwards EnterpriseOne business service is an OMW object consisting of one or more classes that expose public methods. Each method performs a business process. These public methods can be called from other business service classes or from published business service classes. Business services are created for internal use. A business service calls a business function or database operation to perform a specific task. Business services are called by a published business service. JD Edwards EnterpriseOne provides reference implementations that you can use as a model for creating your published business services and business services. The reference implementations are for reference only; they are not intended to be used in a production environment.

If you require a feature that is not in a JD Edwards EnterpriseOne published business service, you can extend the existing published business service class by adding functionality before or after the call to the service, or you can create a new published business service. You extend a published business service by creating a new business service and calling the existing published business service from the new service. Oracle recommends that you create a new OMW object (published business service or business service) instead of modifying an existing JD Edwards EnterpriseOne object. This recommendation takes into consideration JD Edwards EnterpriseOne updates and upgrades. During an update or upgrade, any modifications that you made to a JD Edwards EnterpriseOne object will be replaced by the updated or upgraded JD Edwards EnterpriseOne code.

The JD Edwards EnterpriseOne business services framework provides a set of foundation packages. Each foundation package contains a set of interfaces and related classes that provide building blocks that you use to create the published business service or business service.

The JD Edwards EnterpriseOne business services framework includes these packages:

  • oracle.e1.bssvfoundation.base

  • oracle.e1.bssvfoundation.connection

  • oracle.e1.bssvfoundation.exception

  • oracle.e1.bssvfoundation.http

  • oracle.e1.bssvfoundation.services

  • oracle.e1.bssvffoundation.util

The base package contains classes upon which all published business services and business services depend. Key classes and their purposes are described briefly here. The code is commented so that you can generate a Javadoc that provides details of the packages. Appendix C discusses Javadoc.

Each published business service class extends from the PublishedBusinessService class. Processing for a published business service takes place between startPublishedMethod and finishPublishedMethod. When a published business service class is started, the Context class is created. The Context class provides access to properties related to a specific service request as well as resources and behaviors shared between requests. Context is returned from the startPublishedMethod and passed to any called business service. When a published business service class is finished, the finishPublishedMethod commits transactions, handles system logging, and releases the Context class.

To be compliant with Document/Literal SOAP message format, all published business service methods are designed to have only one parameter. This parameter is referred to as the value object. Value object is a class that holds values but has little or no business logic. Published business services receive a value object as a parameter and return another value object with the results of a successful call. A value object used in a published method is referred to as exposed. All value objects extend from the ValueObject class of the base package.

If an error occurs during processing, the published business service method returns an exception message to the caller. This exception message describes the source of the problem. If less severe problems occur (such as ones that issue warnings or informational messages), the call returns successfully, and problems are reported back to the caller in the return value object.

All internal business service classes extend from the BusinessService class. Business service methods should be static and should not contain state information. Business service methods begin processing with a call to the startInternalMethod and complete processing with a call to finishInternalMethod. Unlike published business service methods, business service methods have more than one parameter. Business services methods are passed a Context object, a Connection object, and a ValueObject on which to operate. Also unlike a published business service method, business service methods use the passed value object both for input and to return results. In addition to the values contained within the value object, a business service method conditionally returns an array of E1Message objects, which contains application error messages, warnings, and informational messages to the caller.

The generated Javadoc provides a list and description of the interfaces and classes that are grouped within each of the business service foundation packages. Other pertinent information, such as method and constructor information, is also documented. Appendix C provides more information about Javadoc.

In addition to the business services framework, sample business services that you can use as a reference for creating a new business service are included with the JD Edwards EnterpriseOne software package. You view the sample business services by adding them to an OMW project and opening JDeveloper.