NaturalONE Version 8.3.7
 —  Business Services  —

Getting Started

This document covers the following topics:


Demo Application

Natural Business Services on the server provides sample business services. If you are new to business services, it is recommended that you download the following items from your Natural Business Services (NBS) server, and then make yourself familiar with the programming logic of the downloaded files:

See also the information on the supplied demo applications in Getting Started with Natural Business Services, which is part of the Natural Business Services documentation.

The topics below provide a quick overview of how to download or create a business service. See the remainder of this documentation for more detailed information.

If you are new to NaturalONE, you can find more detailed information on the standard NaturalONE functionality (such as creating projects and libraries, or mapping server environments) in Using NaturalONE. See also the references below.

Top of page

Downloading a Business Service

Business services have to be stored in Natural projects. Other than with the regular Natural objects, it is not possible to download business services into a new project. If you do not want to download the business services into one of your existing projects, you have to create a new project first.

Start of instruction setTo download a business services

  1. In the Natural Server view, map an environment in which Natural Business Services has been installed. See also Mapping a Natural Environment in Using NaturalONE.

  2. In the Navigator view, create a Natural project which is associated with a Natural Business Services (NBS) server. Since you have mapped this environment in the previous step, you can simply select this server from the second page of the project wizard. At this point, you need not specify any more options in the project wizard. See also Creating a New Project Using a Wizard in Using NaturalONE.

  3. Go back to the Natural Server view and expand the node for the mapped environment.

    A top-level node with the name Business-Services is shown if this is an environment in which Natural Business Services has been installed. To view the currently defined domains, expand the Domains node. To view the business services in a domain, expand the node for a domain. Example:

    Natural Server view with business services

    By default, the Business-Services node is only shown when an installation of Natural Business Services can be detected on the server. This behavior can be changed in the Business Services preferences. See also Installation in Setting the Preferences for Business Services.

  4. Select a business service, invoke the context menu, choose the Add to Existing Project command. Select the Natural project in the resulting dialog box.

    The selected business service is downloaded into the specified project. By default, all required resources which belong to a business service are automatically downloaded. This also includes the related subprograms. This behavior can be changed in the Business Service preferences. See also Business Services in Setting the Preferences for Business Services.

    If the Construct runtime project does not yet exist in your workspace, you are asked whether you want to add it to your workspace. You can then choose the Yes button to create a new project with the name "ConstructRuntime". This project contains, for example, the error message texts stored in the CSTMSG library or the screen prompt texts stored in the CSTLDA library. The modules in this project will eliminate compile and parsing errors caused by missing Natural Construct resources. See the Code Generation documentation for more detailed information on the Construct runtime project.

  5. To find out which resources are used by a downloaded business service, go to the Navigator view, double-click the downloaded business service to open it in the business service editor, and then check the resources listed in the Dependencies view. If resources are listed as "<Unknown>" in this view, double-click each unknown resource and confirm to download it from the server. Or manually download the resources from the mapped Natural Business Services environment. Afterwards, make sure that the library containing these resources is defined in your steplib chain file. See also Using the Steplib Editor.

  6. In Navigator view, invoke the context menu for the business service and choose Testing > Test Business Service. If any items are still missing, you can view the corresponding messages in the Error Log view. If the required items can be found, the test editor appears. See the Application Testing documentation for detailed information on how to use the test editor.

Top of page

Creating a Business Service Using the Wizard

Business services have to be stored in Natural projects. If you do not want to create the business service in one of your existing projects, you have to create a new project first.

Start of instruction setTo create a business service

  1. In the Navigator view, create a Natural project which is associated with a Natural Business Services (NBS) server. If you have already mapped this environment previously, you can simply select this server from the second page of the project wizard. At this point, you need not specify any more options in the project wizard. See also Creating a New Project Using a Wizard in Using NaturalONE.

  2. All Natural objects that are required by your business service need to be stored in a Natural library. Therefore, create a Natural library in the new project. See also Creating Libraries in Using NaturalONE.

    By default, the business service wizard does not generate subprograms. In this case, you have to program the entire logic of your application manually. However, you can specify that a specific type of subprogram is to be generated (for example, an Object Browse or Object Maint subprogram type). In such a case, you have to specify the Natural library into which the subprogram and other related resources are to be generated.

    If you intend to generate an Object Browse or Object Maint subprogram type, you also have to specify a DDM. Make sure that this DDM exists in your project before you invoke the wizard.

    Note:
    If you select to generate a subprogram, additional pages are shown in the wizard that are not explained in this documentation. See the Code Generation documentation for detailed information on these subprogram types.

  3. Select the project in which you want to create the business service, invoke the context menu and choose Business Services > New Business Service. Proceed as described in Creating New Business Services later in this documentation.

    Note:
    The Business Services context menu is available when the Service Development component of NaturalONE has been installed.

Top of page

Folder Structure in the Workspace

In a Natural project, all business services are stored in a folder named Business-Services. This folder cannot be renamed. For example, when you have downloaded the DEMO domain and the SYSBIZDE library from the server, your project may look as follows:

graphics/bs-example.png

The Business-Services folder contains a subfolder named _steplibs and one or more domain folders, where each folder has the name of the corresponding domain (the above example shows the domain folder with the name DEMO).

Top of page

Editors

You can view and change the business service resources in the Business-Services folder with the following editors which are provided with NaturalONE:

Each editor provides two tabs. On the first tab, which is always shown by default, you can change the information if required. The second tab is the XML tab, which is read-only and can only be used to view the underlying XML.

Caution:
Always use the editors provided with NaturalONE to edit the above-mentioned business service resources. Manually editing these files with different editors can potentially cause problems.

For more detailed information, see Using the Editors later in this documentation.

Top of page