Version 8.2.7
 —  Business Services  —

Creating a New Business Service

This section contains step-by-step instructions to create a new business service. The following topics are covered:


Create a Natural Project

Before creating a new business service, you must create a local project in which to generate the business service data.

Start of instruction setTo create a Natural project:

  1. Open the NaturalONE perspective.

  2. Select New > Natural Project on the File menu.

    The Create a Natural Project window is displayed. For example:

    graphics/create-natural-project.png

  3. Type "NewProject" in Project.

  4. Select Finish.

    The new project is displayed in the Navigator view. For example:

    graphics/new-natural-project-in-navigator.png

  5. Expand the NewProject node.

    The standard project components are displayed. For example:

    graphics/new-natural-project-in-navigator-expanded.png

Note:
For more information on creating a Natural project, refer to the NaturalONE documentation.

Top of page

Create a New Library

This section describes how to create a new library in which to store the new business service.

Start of instruction setTo create the library:

  1. Open the context menu for NewProject in the Navigator view.

  2. Select New > Natural Library.

    The Create a Natural Library panel is displayed. For example:

    graphics/new-natural-library.png

  3. Type "NEWLIB" in Library.

  4. Select Finish.

    The library is created locally.

  5. Expand the Natural-Libraries node in the Navigator view.

    The new library and sub-folders are displayed. For example:

    graphics/new-natural-library-in-navigator.png

Top of page

Access the Business Services Functions

This section describes how to access the Business Services functions.

Start of instruction setTo access the Business Services functions:

  1. Open the context menu for NewProject in the Navigator view.

  2. Select Business Services.

    The Business Service functions are displayed. For example:

    graphics/business-service-components-in-context-menu.png

Top of page

Generate the New Service

You are now ready to use the Business Service wizard to generate your business service. During generation, the wizard also creates default objects required by the service, such as the domain and steplib chain files. After generation, you can edit the default information about these objects as required.

Start of instruction setTo generate the new business service:

  1. Open the context menu for NewProject in the Navigator view.

  2. Select Business-Services > New Business Service.

    The Define Business Service Details panel is displayed, showing the name of the project. For example:

    graphics/define-business-service-details.png

  3. Select "NEWDOM" in Domain.

    The domain will be created locally, along with an associated step library entry that points to a steplib chain with the same name as the domain.

    Note:
    If you specify the name of an existing domain, the wizard will check the server connection and download any required data from the NBS repository. Domain only contains domain entries that have already been downloaded.

  4. Type "This is a new business service." in Description.

  5. Select Next.

    The Define Subprogram Type panel is displayed. For example:

    graphics/define-subprogram-type.png

    Note:
    By default, no subprograms are generated. For more information about creating the subprogram types on this panel, see Code Generation.

  6. Select Object browse.

  7. Select Next.

    The Define Object Browse Details panel is displayed.

  8. Select "NEWLIB" in Library.

  9. Type "MYBROWSE" in Name.

  10. Select "NewProject/Natural-Libraries/NEWLIB/SRC/NCST-CUST.NSD" in DDM.

    For example:

    graphics/define-object-browse-details.png

  11. Select Next.

    The Change Defaults panel is displayed. For example:

    graphics/change-defaults.png

    This panel shows the default specification values for the browse subprogram to be generated. Using this panel, you can:

    Task Procedure
    Change the name of the parameter data area (PDA) for the object. Type the name in Object PDA.
    Change the name of the local data area (LDA) for the object. Type the name in Object LDA.

    Note:
    The local data area is only required when the hash-locking option is used for record locking.

    Change the name of the restricted parameter data area (PDA) for the object. Type the name in Restricted PDA.
    Define the primary key field used for browse operations. Select the field in Primary key.
  12. Type a description of the browse subprogram in Object description.

  13. Select Finish to generate the business service file, the associated domain and steplib files, and the corresponding Natural objects.

    The generated items are added to NewProject and the new business service is now listed in the Navigator view. For example:

    graphics/new-business-service-in-navigator.png

    Details about the new service are displayed in the business service editor. For example:

    graphics/new-business-service-in-editor.png

    The generated object-browse subprogram is displayed in the editor view. For example:

    graphics/browse-subprogram-in-editor.png

  14. Save the business service data.

    Notes:

    1. By default, the settings defined in Properties > Natural > Steplibs on the context menu for the project will be used as the default steplib chain.
    2. You can upload the business service data to the server using standard NaturalONE functionality. For information, see the NaturalONE documentation.

At this point, the business service has been created along with a default domain and steplib chain (list of libraries that includes the step library containing the subprogram that implements the service method). If required, you will now edit the default information for the domain and steplib files:

Edit the Default Domain Information

In this example, you will provide a brief description of the default domain generated by the Business Service wizard.

Start of instruction setTo edit the default domain information:

  1. Expand the NEWDOM node in the Navigator view.

    For example:

    graphics/edit-new-domain-information-navigator.png

  2. Open the .domain file.

    The domain editor is displayed. For example:

    graphics/edit-new-domain-information.png

  3. Type "This domain contains the sample business service." in Description.

  4. Save the domain file.

    Note:
    You can upload the domain file to the server using standard NaturalONE functionality. For information, see the NaturalONE documentation.

Edit the Default Steplib Information

In this example, you will provide the database ID and file number for the default steplib chain generated by the Business Service wizard.

Start of instruction setTo edit the default steplib information:

  1. Expand the _steplibs node in the Navigator view.

    For example:

    graphics/edit-new-steplib-information-navigator.png

  2. Open the NEWDOM.steplib file.

    The steplib editor is displayed. For example:

    graphics/edit-new-steplib-information1.png

    A step library with the same name as the steplib chain is displayed in the Library List section.

    Tip:
    The settings defined in Properties > Natural > Steplibs on the context menu for the project can be used to populate the Library List.

  3. Select NEWDOM in the Library List section.

    The Library Information section is displayed. For example:

    graphics/edit-new-steplib-information2.png

    Note:
    The DBID and FNR values are not required; they are only used in advanced configurations when uploading to the server.

  4. Save the steplib file.

Top of page