6 Working with Business Services

This chapter contains the following topics:

6.1 Understanding Business Services

Business services are JD Edwards EnterpriseOne business function objects that are used for interoperability between JD Edwards EnterpriseOne and other applications or systems. Business services are written in the Java programming language and provide business service operations that access the business logic in JD Edwards EnterpriseOne for many supported business transactions, such as journal entries, exchange rates, accounts payable vouchers, inventory look-ups, pricing, sales orders, and so on. You use Oracle's JDeveloper tool and the Java programming language to create a business service. The JD Edwards EnterpriseOne web services framework provides a set of foundation packages that helps you create a business service. Each foundation package contains a set of interfaces and related classes. All business service classes extend from ServiceBusinessFunction.

See "JD Edwards EnterpriseOne Tools Business Services Development Overview" in the JD Edwards EnterpriseOne Tools Business Services Development Guide.

6.2 Creating Business Service Objects

You create business services in OMW.

Access JD Edwards EnterpriseOne OMW.

  1. Select an open OMW project and press the Add button.

  2. Select the Business Function radio button on the Add EnterpriseOne Object form and click OK.

  3. On the Add Object form, complete the following fields:

    • Object Name

      The naming convention for business services is J*******. If the business service is going to be published, the naming convention is JP*****.

    • Description

      The description of a record in the Software Versions Repository file. The member description is consistent with the base member description.

    • Product Code

      A user defined code that identifies a system.

    • Product System Code

      A user defined code that specifies the system number for reporting and jargon purposes.

    • Object Use

      Object Use Designates the use of the object. For example, the object may be used to create a program, a master file, or a transaction journal.

  4. Select the BSSV radio button.

    The Package Prefix field becomes available.

  5. In the Package Prefix field, click the Visual Assist in the Source Language group.

    The Package Prefix is the parent Java package for all of the classes contained in the Business Service object. OMW will only allow the selection of administrator configured package prefixes. Oracle recommends that you click the Visual Assist for specifying the package prefix.

  6. On the BSSV Package Prefix Search & Select screen, click Find.

  7. Click the package prefix you want associated with your business service and then click Select.

  8. Click OK.

    From here, you can click the Design Tools tab, and click Invoke JDeveloper to design artifacts for the business service. See Designing Business Services.

6.3 Searching for Business Service Objects

Access JD Edwards EnterpriseOne OMW.

  1. In JD Edwards EnterpriseOne OMW, click the Search tab.

  2. Complete the following fields, and then click the button next to the Search field:

    • Category: Select Object Librarian.

    • Search Type: Select Object Name.

    • Search: If you know the business service object name, type it in the Search field. If you do not, type J* to search for business services, and JP* to search for published business services.

  3. Click the Search button locate to the right of the Search field.

    OMW returns all of the objects that match your search criteria.

    See JD Edwards EnterpriseOne Tools Business Services Development Methodology Guide

6.4 Viewing the OMW HTML Status Page

The News/Status tab indicates the select object's status in OMW. For business services, the News/Status tab shows you the following information about the business service you have selected:

  • Object Name

  • Description

  • Object Type

  • BSFN Type

  • Javadoc

  • Product Code

  • Object Status

  • Manager

  • Supervisor

  • Pathcode

  • User

  • Machine Key

  • Date

  • Time

  • Project that holds the token for this object

  • Is this project inheriting the token for this object

Additionally, you can view token information from the News/Status tab. This tab displays the following information about the token:

  • If the current project holds the token

  • How many projects are waiting for the token

  • If this project is inheriting it's token

  • If this project is in the token queue

  • What the projects' place is in the queue

Access JD Edwards EnterpriseOne OMW.

  1. Select the business service on which you want to view News/Status.

  2. Click the New/Status tab located to the right of the object tree.

  3. On the Select Tab drop-down menu, select one of the following:

    • Summary: Select this option if you want to view the Object Librarian/Object Status information of the selected business service.

    • Token: Select this option if you want to view the token information of the selected business service.

6.5 Designing Business Services

You create business services in OMW and add Java code to them through JDeveloper. The Java code is contained in.java files, called artifacts, and make up the functionality of the business service. From JDeveloper, you add Java code to the business service. Artifacts contain business service operations that Java code uses to interact with EnterpriseOne. These artifacts and business service operations display in OMW after you have checked them out, and then checked them in.

6.5.1 Pointing EnterpriseOne to JDeveloper Installation Path

You can access JDeveloper through OMW to design your business services after you have created them. Use JDeveloper to create artifacts in Java for your business services.

See JDeveloper Installation guide for more information about installing JDeveloper.

Access JD Edwards EnterpriseOne OMW.

  1. Open the project in which the business service object resides, and select the business service object.

  2. Click the Design button.

  3. On the Business Function Design form, click the Design tab.

  4. Click JDeveloper Install Path.

    In the blank field located at the bottom of the screen, specify your client install folder where your JDeveloper application resides. OMW launches the JDeveloper application specified on this form when you click the Invoke JDeveloper button. Use the visual assist button located to the right of the field to help you browse to the specific folder in which your JDeveloper resides.

Note:

With JD Edwards EnterpriseOne Tools Release 9.1 Update 4, both JDeveloper 11g and 12c are supported for creating Java artifacts for business services. Typically the installation path for JDeveloper 11g is C:\Oracle\Middleware\, and the installation path for JDeveloper 12c is C:\Middleware\Oracle_Home\.

6.5.2 Invoking JDeveloper

Once a business service has been added to OMW, you can use OMW to launch JDeveloper if you want to add or make changes to the business service artifacts.

Note:

Using OMW to launch JDeveloper installs the EnterpriseOne integration components into JDeveloper. Only after JDeveloper installs these integration components will you be able to use the EnterpriseOne wizard to create projects in JDeveloper, to call EnterpriseOne business functions, to create Value Objects, and so forth. Additionally, invoking JDeveloper from OMW creates a workspace for EnterpriseOne objects and the JDeveloper project for the business service, if these two items do not already exist. A check will occur every time JDeveloper is invoked. Configuration only happens if the check fails.

With JDeveloper 12c, extensions and plugins are not loaded during JDeveloper startup. Plugins and extensions are loaded in JDeveloper 12c only when you use a feature provided by the extension. For loading EnterpriseOne development extensions on JDeveloper 12c, select the option Initialize E1 Workspace under the Tools menu after launching JDeveloper 12c from OMW.

Access JD Edwards EnterpriseOne OMW.

  1. Open the project in which the business service object resides, and then select the business service object for which you want to invoke JDeveloper.

  2. Click the Design button.

  3. On the Business Function Design form, click the Design tab.

  4. Click Invoke JDeveloper.

    When developing business services using JDeveloper 12c, you must select the Initialize E1 Workspace option after JDeveloper is launched from OMW.

  5. Click the Tools menu and select Initialize EOne Workspace.

6.5.3 Adding Artifacts to a Business Service

You add artifacts to a business service through JDeveloper. For more information about adding artifacts, see the JDeveloper online documentation.

Access JD Edwards EnterpriseOne OMW.

  1. From the OMW Design tab, click Invoke JDeveloper.

  2. On the Save Files dialog box, click OK to save all of the .jpr files that are selected.

    Note:

    Only your specific .jpr file will have changed. You can also select to save just your .jpr. To do so, deselect the other files and click OK.
  3. Click the business service you created in OMW.

  4. Select the business service, the right-click and select New.

  5. On New Gallery, click Java Class, and then click OK

  6. On Create Java Class, in the name field, type the name of the new artifact you are adding.

  7. Accept the default values and selections.

  8. Click OK.

    The artifact Java file displays under the business service.

  9. Enter the business service operations in the artifact.

  10. Click Save All.

  11. Click File, and then Exit.

6.6 Checking In, Checking Out, and Saving Business Services

When you check in business service objects, OMW enables you to view the artifacts associated with the objects and enables you to select which artifacts you want to check in. OMW will only allow those artifacts that have been configured correctly to be checked in. When checked in, the business service object is moved to the centralized EnterpriseOne pathcode.

When you save a business service object, OMW checks in all artifacts to the save pathcode, including those not configured properly.

Note:

When you check in a project that contains business services, OMW requires you to input information as you check in the business service objects that is not required for other object types.

Therefore OMW first checks in the business service objects, then checks in the remaining objects so that you need to be present only during the business service check in.

Access JD Edwards EnterpriseOne OMW.

  1. In JD Edwards EnterpriseOne OMW, select the business service object that is checked-out.

  2. Click the Check-in button in the center column.

  3. The View Artifacts to Check In form displays. A list of artifacts displays in the grid with the following information:

    • Artifact Name

    • Artifact Path

    • Artifact State

    • State Description

      A green check mark indicates that the item is checked in. A circle with a line through it indicates that the file cannot be checked in because it is not configured properly for check in.

  4. Select the artifacts you want to check in by clicking the columns to the left of the Artifact Name field, if necessary. Selecting artifacts adds or removes the green check mark.

  5. Click OK.

Note:

For Release 9.1 Update 2, if the checked-in object is a media object business service (either internal or published), then these business services will not be included in the JAX-RPC package builds and the following alert message appears:

"Selected artifact is a JAXWS based Media Object Business Service and it will not be included in JAX RPC based package builds."

To save a business service object, access JD Edwards EnterpriseOne OMW.

  1. In JD Edwards EnterpriseOne OMW, select the business service object that is checked out.

  2. Click the Save button in the center column.

    JD Edwards EnterpriseOne OMW indicates that an object is checked in by removing the check mark that was superimposed over the object's button when it was checked out.

6.6.1 Checking In Artifacts

To check in artifacts in OMW, you must first add them to the business service object in JDeveloper.

Access JD Edwards EnterpriseOne OMW.

  1. From the OMW Design tab, click Invoke JDeveloper.

  2. Click the business service you created in OMW.

  3. Right-click, and select New Java class.

  4. Click OK.

  5. Name the artifact and make any changes you need.

  6. Click OK, and then click Save.

  7. In OMW, click OK.

When you check in the business service from OMW, you will check in the artifacts as well.

6.6.2 Checking Out a Business Service Object

Access JD Edwards EnterpriseOne OMW.

  1. In JD Edwards EnterpriseOne OMW, select the business service object in the project window.

  2. Click the Checkout button in the center column.

    The View Artifacts to Check Out form displays.

  3. Click OK.

    Artifacts for the business service will be overwritten when you check out a business service object.

6.6.3 Understanding the Business Service Artifact List

Artifacts are the files or components that comprise a Business Service in EnterpriseOne. You can view which artifacts are checked into the pathcode for the Business Service. For OMW to display the artifacts that are associated with a business service, the associated business service must be checked in.

Note:

OMW displays those artifacts that are located on your local machine. The artifacts located on another server might be different.

6.6.4 Viewing Artifacts

When you check out a business service, the View Artifacts to Check Out form displays. A list of the artifacts associated with the business service displays in the grid. Everything in this grid will be downloaded from the deployment server to the client server.

Access JD Edwards EnterpriseOne OMW.

  1. Open the project in which the business service object resides, and then select the business service object that contain the artifacts you want to view.

  2. Click Design.

  3. On the Design Tab, click the View Checked in Artifacts button.

    The View Checked in Artifacts form displays. This form provides information about the artifacts that comprise the business service in a specific pathcode. This form provides only limited information on what artifacts are present for the business service on the local development client. The artifact file you want to view is on your local machine. This file is different on the server than it is on your local machine.

  4. View the following fields for artifact information:

    • Business Service Name

    • Package Prefix

    • Pathcode: This field contains the pathcode from which the information is being retrieved.

    • Published Class Name: This field indicates if an artifact in the business service is published. The field is populated with the name of the artifact that is published in the business service. This artifact is a Java class that defines which business service operations in the business service are accessible from the Web Services server. If this field is blank then this business service is not published.

  5. In the grid located at the bottom of the form, EnterpriseOne displays a list of all of the artifacts that make up the business service in the specified pathcode. Each grid record indicates the artifact name, the artifact internal path, and the artifact state description.

    The artifact internal path is made of many folders that are nested inside the business service root folder. The root folder of a business service is as follows:

    <E1 install folder>\<pathcode folder>\java\source\<package prefix>\<Business Service name>

    For example, if you have business service JPTEST on a DV812 client, and the package prefix is oracle.e1.bssv. JPTEST's root folder is as follows:

    C:\B9\DV812\java\source\oracle\e1\bssv\JPTEST\

    Furthermore, if the grid lists an artifact named testing.java, and the internal path is util\testing, then the full path to testing.java on the development client will be as follows:

    C:\B9\DV812\java\source\oracle\e1\bssv\JPTEST\util\testing\testing.java

    The last two columns in the grid indicate the state of the artifact. The state can be either that the artifact was checked into the pathcode but is not currently found on the local client, or that the artifact was checked into the pathcode and is also currently found on the local client.

  6. Click OK.

6.6.5 Understanding Published Artifacts

A published business service gives exposure to one or more business service functions by providing an interface that is available to the public as consumable web services. A published business service is a Java interface that provides a wrapper for the business service operations where the actual business logic is performed.

You use the same tools and framework to create a published business service that you used for creating a business service.

All published business service classes extend from PublishedServiceBusinessFunction.

6.6.6 Specifying a Published Artifact

When you check in a business service, you specify the valid artifacts you want published. Valid artifacts are those that meet the rules that are set for publishable artifacts.

Access JD Edwards EnterpriseOne OMW.

  1. In JDeveloper, add your business service operations to an artifact and then save the artifact.

  2. In OMW, select the business service that contains the artifact and click Check In from the middle bar.

  3. From the Row exit, click Select Publish.

    The Are you sure you wish to proceed with the check in? dialog box displays. This dialog box alerts you that which artifact is published could have severe ramifications. It is recommended that you click Cancel.

    For published artifacts, the standard naming convention is JP******.

  4. Click OK.

6.6.7 Unpublishing a Published Artifact

You might want to unpublish an artifact for many reasons, including if the artifact no longer needs to be exposed to the web, or if you want to delete a business service.

Access JD Edwards EnterpriseOne OMW.

  1. When you check in a business service, the View Artifacts to Check In form displays. Click the Form Exit, and click Unpublish Artifact.

    The Are you sure you wish to proceed with the check in? dialog box displays.

  2. Click Yes.

  3. Click OK.

6.6.8 Deleting a Business Service

You cannot delete a business service that has published artifacts. Therefore you must unpublish all artifacts to delete a business service.

Access JD Edwards EnterpriseOne OMW.

  1. Select the business service you want to delete from the appropriate Objects folder.

  2. Click Delete.

  3. On the Delete of … form, select one or all of the options:

    • Delete Object from Server

    • Delete Object Locally

    • Delete Object from the SAVE Location

    • Mark Object to be Deleted from Transfer Locations

    • Remove Object from ALL Locations

  4. Click OK.

6.7 Working with Business Services Properties

You can manage business service properties through OMW.

See JD Edwards EnterpriseOne Tools Business Services Development Methodology Guide.

6.7.1 Adding a Business Service Property

Access JD Edwards EnterpriseOne OMW.

  1. On OMW, click Add.

    The Add EnterpriseOne Object to Project form displays.

  2. Click the BSSV Property radio button.

  3. Click OK.

  4. On the Add BSSV Property, complete the following fields:

    • Key

    • Value

    • Description

    • Level

    • BSSV

    • Group

  5. Click OK.

6.7.2 Searching for a Business Service Property

Access JD Edwards EnterpriseOne OMW.

  1. On the Search Tab, from the Category field, select Business Service Property.

  2. Click in the Search Type field.

  3. In the search field, type the BSSV Property name, and then click Search.

6.7.3 Adding a Business Service Property to a Project

Access JD Edwards EnterpriseOne OMW.

  1. Select the BSSV Property in the Search field, and click the Add Object or User to Project button located in the center column.

  2. In the Release field, click the Search button and select a release from the list.

  3. Click Select.

  4. Click Close.