Using the Editors

This document covers the following topics:


General Information

Specific editors are available for the following business service resources:

  • business service files

  • domain files

  • steplib chain files

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.

If you want to edit the above-mentioned business service resources, they must be available locally (that is, in the Project Explorer view). You cannot edit or view them directly on the server (that is, in the Natural Server view). If you want to edit or view the business service resources that are stored on the server, you have to download them first. See Downloading Business Service Resources from a Server. After editing the resources, you can return them to the server using NaturalONE's standard functionality (for example, with the Upload command).

Using the Business Service Editor

The business service editor is used to view and change the following aspects of the business service definition: subprogram proxy and subprogram used by the business service, description of the business service, and the methods used by the business service.

Start of instruction setTo edit the business service definition

  1. In the Project Explorer view, expand the Business-Services node of your project.

  2. Expand a folder which has the name of a domain.

  3. Double-click a file with the extension .bsrv.

    Or:
    Select a file with the extension .bsrv, invoke the context menu and choose Open With > Business Service Editor.

    The business service editor appears. Example:

    Business service editor

  4. You can change the following general information:

    Option Description
    Default proxy The name of the subprogram proxy used for this service. This proxy is used by default if a method that is listed in the editor does not use its own method proxy (see below).

    Proxies are used for the communication between the client and the server. They invoke Natural business services from a client. Proxies can only be generated using Natural Business Services on the server, for example, by using the Subprogram-Proxy-Client model. See the Natural Business Services documentation for further information.

    Default subprogram The name of the subprogram that implements the service methods. This subprogram is used by default if a method that is listed in the editor does not use its own subprogram (see below).

    Important:
    You must specify a default subprogram for the service if any of the listed methods do not specify a subprogram.

    Description A brief description of the business service.
  5. To view or change the information that is defined for a method, select the method in the method list.

    The lower part of the editor now shows additional information. Example:

    Business service editor

  6. You can change the following method information:

    Option Description
    Method name The name of the method as defined in the subprogram.

    When you have created a new business service that does not use a subprogram, a method with the name "Default" is initially shown in the method list. After you have created the subprogram which implements your methods, you have to change "Default" to the name of an actual method used in your subprogram.

    Method description A brief description of the method.
    Method proxy The name of the subprogram proxy used for this method. If defined, the method proxy is used instead of the default proxy.
    Method subprogram The name of the subprogram that implements this method. If defined, the method subprogram is used instead of the default subprogram.
    Method steplib The name of a steplib chain file used by this method. You need only specify a method steplib if the default steplib chain file that is defined in the .domain file is not sufficient.
  7. You can use the following command buttons:

    Command Button Description
    Add Adds a method. You have to specify the required method information (see above).
    Remove Removes the selected method.
  8. Save your changes using the standard Eclipse functionality (for example, press CTRL+S)

Using the Domain Editor

The domain editor is used to view and change the description and to define a different steplib chain.

Start of instruction setTo edit the domain definition

  1. In the Project Explorer view, expand the Business-Services node of your project.

  2. Expand a folder which has the name of a domain.

  3. Double-click the .domain file.

    Or:
    Select the .domain file, invoke the context menu and choose Open With > Domain Editor.

    The domain editor appears. Example:

    Domain editor

  4. You can change the following information:

    Option Description
    Description The description of the domain.
    Steplib chain The name of the steplib chain file to be used. This corresponds to a file with the extension .steplib in the _steplibs node of your project.

    It is possible to enter the name of steplib chain file that does not yet exist. Keep in mind that there is no plausibility check when editing the domain definition. Such a check is only performed during runtime when the business service is executed.

  5. Save your changes using the standard Eclipse functionality (for example, press CTRL+S)

Using the Steplib Editor

The steplib editor is used to view, change and reorder the steplibs in a steplib chain. A steplib contains the subprograms that implement the service methods. You can use any library in your project as a steplib. You can also use libraries from other projects as steplibs.

When a business service is executed, it always accesses information from the server. Therefore, it is important that the business service can find the libraries in the appropriate FUSER or FNAT system file.

Start of instruction setTo edit the steplib definition

  1. In the Project Explorer view, expand the Business-Services node of your project.

  2. Expand the _steplibs node.

  3. Double-click a file with the extension .steplib.

    Or:
    Select a file with the extension .steplib, invoke the context menu and choose Open With > Steplib Editor.

    The steplib editor appears. Example:

    Steplib editor

  4. To view or change the information that is defined for a steplib, select the library in the library list.

    The lower part of the editor now shows additional information. Example:

    Steplib editor

  5. You can change the following library information:

    Option Description
    Library name The name of the library.
    Library DBID The ID of the database which contains this library.

    Normally, you need not define a DBID and FNR because all required objects are stored on the server which is defined in the project properties. This is only required in advanced configurations when uploading to the server (for example, when you have defined a business service with several methods where the corresponding subprograms are stored in different libraries, and the libraries are stored in different databases and files).

    Library FNR The number of the database file which contains this library. Only required in advanced configurations when uploading to the server.
  6. You can use the following command buttons:

    Command Button Description
    Add Adds a library to the steplib chain. You have to specify the required library information (see above).
    Remove Removes the selected library from the steplib chain.
    Up Moves the selected library up one position in the library list.
    Down Moves the selected library down one position in the library list.
  7. Save your changes using the standard Eclipse functionality (for example, press CTRL+S)

Using the Dependencies View

When a business services resource (for example, a business service file) is shown in the active editor, the Dependencies view shows the dependencies between that resource and other business services resources and/or Natural resources.

Dependencies view

When a supporting resource (domain or steplib) cannot be found locally using the project steplib chain and project references, "<Unknown>" is displayed with the name of the resource. You can download the unknown object using the Open command from the context menu or by double-clicking the object.

If an unknown module is not shipped with the Construct runtime project, either manually download it from the server or create it locally. If the module is shipped with the Construct runtime project, add the project. See the Code Generation documentation for more detailed information on the Construct runtime project.

Object models such as SUBPROGRAM-PROXY are marked with the following icon: Icon. These models cannot be downloaded using the Open command in the context menu (or by double-clicking). Normally, you would not download such a model unless you want to maintain the model yourself.

For more information on the Dependencies view (for example, on the icons in the local toolbar), see the description of the source editor in Using NaturalONE.