Version 8.2.7
 —  Business Services  —

Creating a New Business Service

This section describes how to create a new business service. The Business Service wizard quickly generates the business service based on a few simple input values. In addition, the wizard generates default objects required by the service. These include:

Object Generated Description
Domain file Groups business services and defines the boundaries of a business service. Each business service is assigned to a domain.
Steplib chain file Defines a set of Natural libraries that a business service dispatch server must access to call a subprogram or proxy. The dispatch server accesses the libraries in the order they are listed in the steplib file.

Note:
By default, the generated steplib will contain the libraries listed in Properties > Natural > Steplibs on the context menu for the project.

Methods list Lists the methods used for this business service. The type of methods listed depends on the type of service generated.

After generating a business service, you can edit the default information that was generated for the objects.

Notes:

  1. You cannot change the key fields, such as the file or domain names.
  2. Always use the corresponding editors (business service, domain, and steplib) to edit business services files. Manually editing these files outside of the editors or NaturalONE perspective can potentially cause problems. The XML tab attached to these editors can only be used to view the underlying XML file.

This section covers the following topics:


Create a NaturalONE Project

All business service components are stored locally in a NaturalONE project. If you do not want to use an existing NaturalONE project to store the new business service, you can create a new project. For information, see the NaturalONE documentation.

The following example shows the Business Services folder structure within a NaturalONE project:

These folders and files are:

Folder/File Description
Business_Services folder Top-level folder with a static name that stores all business service-related files. This folder can be deleted (which deletes all business service-related files within it), but must not be renamed.
_steplibs folder Top-level folder with a static name that stores all steplib chains (.steplib files). This folder can be deleted (which deletes all steplib files within it), but must not be renamed.
*.steplib file XML representation of a steplib. Use this file to perform steplib-related operations (delete, edit using the Steplib editor, upload to the Natural server using the Upload command, etc.). This file must not be renamed.
DOMAIN_NAME folder Folder with the name of the domain to make it visually easier to see the business services within the domain. The actual XML representation of a domain is the .domain file located within this folder. This folder can be deleted (which deletes all business services files within it), but must not be renamed.
.domain file XML representation of a domain. You interact with this file to perform domain-related operations (i.e., edit the file using the domain editor and upload the file to the Natural server using the Upload command). This file must not be renamed.

Note:
To delete a domain, you must delete the domain folder (you cannot delete the .domain file only).

*.bsrv file XML representation of a business service. You interact with this file to perform business service-related operations (delete, edit using the business service editor, upload to the Natural server using the Upload command, Test, etc.). This file must not be renamed.

Top of page

Create the Business Service

This section describes how to create a new business service in a NaturalONE project. Once a business service has been generated, you can provide further details about the service, its domain, and its steplib chain. This section covers the following topics:

Note:
The business service file is created locally. Use standard NaturalONE functionality to upload the file to the server.

Generate the Business Service

Start of instruction setTo generate the new business service:

  1. Open the context menu for the project.

  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

    Note:
    If this is not the project into which you want to generate the service, select Browse to choose a different NaturalONE project.

  3. Provide the name of the domain that will contain your business service in Domain as follows:

  4. Type the name of the new service in Service name.

  5. Type the version number for the service in Version.

    In this case, the version is 1.0.0.

  6. Type a brief description of the service in Description.

  7. Select Finish to generate the business service file (and possibly the associated domain and steplib files).

    Or:
    Select Next to also generate the Natural objects for the business service.

    The Define Subprogram Type panel is displayed.

    graphics/define-subprogram-type.png

  8. Select the subprogram type to be generated.

    By default, no subprograms are generated. To generate a subprogram, select the type on this panel and select Next. The corresponding wizard is displayed to define the parameters for the subprogram.

    Note:
    For more information about the subprogram types on this panel, see Code Generation.

  9. Select Finish to generate the business service file and possibly the associated domain and steplib files, along with the corresponding Natural objects.

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

    graphics/navigator-new-service.png

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

    graphics/overview-new-service.png

    Use this editor to provide a default name for the business service subprogram and proxy.

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

  10. Save the business service.

Define the Domain Information

Start of instruction setTo define the domain information:

  1. Expand the domain node for the business service in the Navigator view.

  2. Open the .domain file for the business service.

    The domain editor is displayed. For example:

    graphics/overview-new-domain.png

    Using this editor, you can:

    Task Procedure
    Provide a description of the domain. Type a brief description in Description.
    Change the default name of the steplib chain (list of libraries that includes the step library containing the subprogram that implements the service method). Type or select the name of the steplib chain in Steplib.
  3. Save the domain.

    Notes:

    1. You can upload the domain file to the server using standard NaturalONE functionality.
    2. For more information on domains, see Defining Steplibs and Domains, Natural Business Services Administration.

Define the Steplib Chain Information

This section describes how to define the list of step libraries in the steplib chain used for the business service.

Start of instruction setTo define the steplib chain information:

  1. Expand the step library node in the Navigator view.

  2. Open the SteplibName.steplib file.

    The steplib editor is displayed, showing the name of the steplib chain in Steplib. For example:

    graphics/overview-new-steplib.png

    The first step library in the Library List section has the same name as the steplib chain. You can use this step library as a starting point when defining the steplib chain.

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

    Using this editor, you can:

    Task Procedure
    Add a step library to the steplib chain. See Add a Step Library to the Steplib Chain.

    Note:
    For information on creating a new step library, see Create a Step Library.

    Remove a step library from the steplib chain. Select the library and then select Remove.
    Reorder the list of step libraries within the steplib chain. Select Up and Down to reorder the list.
  3. Save the steplib.

Notes:

  1. You can upload the steplib file to the server using standard NaturalONE functionality.
  2. For more information on steplib chains, see Defining Steplibs and Domains, Natural Business Services Administration.

Create a Step Library

Start of instruction setTo create a step library:

  1. Select New > Natural Library on the File menu.

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

    graphics/new-natural-library.png

  2. Select the name of the NaturalONE project in Project.

  3. Type the name of the step library in Library.

  4. Select Finish.

    The library is created locally and displayed in the Navigator view.

    Note:
    You can upload the library to the server using standard NaturalONE functionality.

Add a Step Library to the Steplib Chain

Start of instruction setTo add a step library to the steplib chain:

  1. Expand the step library node in the Navigator view.

  2. Open the SteplibName.steplib file.

    The steplib editor is displayed, showing the name of the steplib chain in Steplib.

  3. Select Add.

    The Library Information section is displayed. For example:

    graphics/add-step-library-to-steplib.png

    By default, LIBRARY1 is displayed in Library name.

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

  4. Type the name of the new library over the default name in Library name.

  5. Save the steplib file.

Note:
For information on removing a step library from the steplib chain or reordering the list of step libraries, see Define the Steplib Chain Information.

Create the Subprogram to Implement a Method

This subprogram will implement the logic for your new business service.

Start of instruction setTo create the subprogram:

  1. Select New > Subprogram on the File menu.

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

    graphics/new-natural-subprogram.png

  2. Select the name of the project in Project.

  3. Select the name of the library in which to store the subprogram in Library.

  4. Select the local folder in which to store the subprogram in Folder.

  5. Type the name of the subprogram in Object name.

  6. Type the name of the file in File name.

    Note:
    By default, Structured is selected in Programming mode. If the subprogram will use reporting mode, select Reporting.

  7. Select Finish to create the subprogram.

    The new subprogram is listed in the Navigator view. For example:

    graphics/new-subprogram-in-navigator-view.png

    The subprogram is also displayed in the Natural editor. For example:

    graphics/new-subprogram-in-editor.png

  8. Add logic to the subprogram.

  9. Save the subprogram.

    The subprogram is saved locally.

    Note:
    You can upload the subprogram to the server using standard NaturalONE functionality.

You can now add a method to the business service.

Add a Method

Start of instruction setTo add a method to the business service:

  1. Open the NewService.bsrv file in the Navigator view.

    The business service is displayed in the editor view.

  2. Select Add.

    The Method Information section is displayed. For example:

    graphics/overview-new-service-add-method.png

    By default, method1 is displayed in Method name.

  3. Type the name of the new method over the default name in Method name.

  4. Type a brief description of the method in Method description.

  5. Type the name of the subprogram that implements this method in Method subprogram.

    Note:
    You do not need to specify a method step library unless the default step library associated with the business service/domain is not sufficient.

Test the Business Service and Subprograms

For information on testing business services and subprograms, see Application Testing.

Use the Dependencies View

When a business services resource (for example, a business service, domain, steplib, business service unit test) is open in the editor view, the Dependencies view displays dependencies between that resource and other business services resources and/or Natural resources. This section describes the nodes contributed to the view by business service resources. The following topics are covered:

Notes:

  1. Select graphics/sort-alphabetically-icon.png to sort the resources alphabetically.
  2. Select graphics/dependencies-view-export-icon.png to export a textual representation of the visible nodes in the view to a file.
  3. When a supporting resource cannot be found locally using the project steplib chain and project references, "<Unknown>" is displayed with the name of the resource. If the unknown module(s) is not shipped with the Construct runtime project, either manually download it from the server or create it locally. If the module(s) is shipped with the Construct runtime project, add the project. For information, see the NaturalONE Code Generation guide.
  4. For more information about the Dependencies view, see the description of the source editor in Using NaturalONE.

Business Service Resources

When a business service is open in the editor view, the root node displays the name of the business service, as well as the name of the domain in which it is located. In caller mode (graphics/caller-mode-icon.png), the child nodes display the name of each business service resource that depends on this business service. In the following example, the business service resource that depends on the Calculator.v1.1.1 business service in the DEMO domain is a business service unit test named Calculator:

graphics/dependencies-view-bs-caller-mode.png

In callee mode (graphics/callee-mode-icon.png), the child nodes display the names of the business service resources that the parent node depends on. In the following example, the Calculator.v.1.1.1 business service in the DEMO domain depends on a domain named DEMO and two subprograms named CALC and CALCY in the DEMOTEST library:

graphics/dependencies-view-bs-callee-mode.png

Natural Subprogram Resources

When a Natural subprogram is open in the editor view, the root node displays the name of the subprogram, as well as the name of the library in which it is located. In caller mode (graphics/caller-mode-icon.png), a business service child node will be displayed for each business service that depends on this subprogram. In the following example, the Calculator.v1.1.1 business service in the DEMO domain depends on the CALCY subprogram in the DEMOTEST library:

graphics/dependencies-view-subp-caller-mode.png

In callee mode (graphics/callee-mode-icon.png), no child nodes are displayed because subprograms do not depend on any business service resources.

Top of page

Add Business Service Definitions to CentraSite

You can register business services and their corresponding metadata with CentraSite using the Add to CentraSite wizard.

Note:
This wizard is an optional feature for NaturalONE and is only available when the CentraSite plug-ins are installed. To install CentraSite, refer to the CentraSite documentation.

This section covers the following topics:

Import the Business Service Asset Types

Before you can add business service definitions to CentraSite, you must import the business service asset types to the CentraSite server.

Start of instruction setTo import the business service asset types:

  1. Select Import on the File menu.

    The Import window is displayed.

  2. Select CentraSite > Archive.

    For example:

    graphics/import-centrasite-archive.png

  3. Search for and select the NaturalONE install folder\eclipse\v34\plugins\com.softwareag.naturalone.gen.nbs.eclipse.version\res\com.softwareag.naturalone.gen.nbs.centrasite_asset_types.zip file.

    Note:
    The version number above may change.

  4. Select Finish to import the asset types file.

    Note:
    For more information on importing a file, see the CentraSite documentation.

Add Business Service Metadata to CentraSite

This section describes how to add the business service metadata to CentraSite.

Start of instruction setTo add business service metadata to CentraSite:

  1. Open the context menu for the business service in the Navigator view.

    You can add the metadata for all business services defined in a NaturalONE project or for any folder or object within the project, depending on which business services node is selected in the Navigator view. For example, if you select the Business-Services root node, the metadata for everything defined in the project will be added to CentraSite. If you select an object or folder within the Business-Services root node, only this object or folder (and any items within the folder) will be added.

  2. Select Business-Services > Add to CentraSite.

    The Add Business Service Metadata to CentraSite panel is displayed. For example:

    graphics/add-metadata-to-centrasite.png

  3. Type the CentraSite connection path in Server.

  4. Type the user credentials for CentraSite in User ID and Password.

    Tip:
    You can set up the default Server and User ID values in the Preferences window for CentraSite. For information, see Set CentraSite Preferences.

  5. Select Finish.

    The business service definition will be added to CentraSite and the wizard will close.

    Note:
    If there are any problems, check the Error view for information.

Verify Metadata was Added to CentraSite

Start of instruction setTo confirm that metadata has been added to CentraSite:

  1. Select Open Perspective > Other on the Window menu.

    The Open Perspective window is displayed.

  2. Select CentraSite > Search and Browse.

  3. Select the Asset Types view.

    If necessary, select graphics/refresh-icon.png to refresh the view.

  4. Select an NBS asset type.

    For example, select NBS Service:

    graphics/asset-types-view.png

  5. Select graphics/update-contents-icon.png to update the list in the Contents view.

    For example:

    graphics/contents-view.png

    Tip:
    To display a graphical impact analysis, open the context menu for an object in the Contents view.

  6. Select the business service that you added to CentraSite.

    The Summary page is displayed. For example:

    graphics/summary-business-service.png

  7. Verify the associations in the References section.

  8. Select the NBS Metadata tab.

    Additional information about the service is displayed. For example:

    graphics/nbs-metadata-tab.png

Top of page