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: |
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:
This section covers the following topics:
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:
NaturalONE_project_name
Business_Services
_steplibs
steplib1.steplib
steplib2.steplib
DOMAIN1
.domain
BusinessService1.v1.0.0.bsrv
BusinessService2.v1.0.0.bsrv
DOMAIN2
.domain
BusinessService3.v1.0.0.bsrv
BusinessService4.v1.0.0.bsrv
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: |
*.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. |
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.
To generate the new business service:
Open the context menu for the project.
Select
.The Define Business Service Details panel is displayed, showing the name of the project. For example:
Note:
If this is not the project into which you want to generate the
service, select to choose a different NaturalONE
project.
Provide the name of the domain that will contain your business service in Domain as follows:
Type the name of the domain in Domain.
If the domain currently exists on the server and the NaturalONE project is associated with a server connection, the domain and steplib files will be downloaded when you select
on this panel.Note:
This functionality can be modified in the
Preferences window for business services. For information,
see Set
Business Service Preferences.
If the domain is new, it 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 required, you can edit the generated entries. For
information, see Define
the Domain Information and
Define the
Steplib Chain Information.
Select the name of a domain that is currently in the local NaturalONE project from Domain.
Type the name of the new service in Service name.
Type the version number for the service in Version.
In this case, the version is 1.0.0.
Type a brief description of the service in Description.
Select
to generate the business service file (and possibly the associated domain and steplib files).Or:
Select to also generate the Natural
objects for the business service.
The Define Subprogram Type panel is displayed.
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
. 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.
Select
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:
Details about the new service are displayed in the editor view. For example:
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.
Save the business service.
To define the domain information:
Expand the domain node for the business service in the Navigator view.
Open the .domain file for the business service.
The domain editor is displayed. For example:
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. |
Save the domain.
Notes:
This section describes how to define the list of step libraries in the steplib chain used for the business service.
To define the steplib chain information:
Expand the step library node in the Navigator view.
Open the SteplibName.steplib file.
The steplib editor is displayed, showing the name of the steplib chain in Steplib. For example:
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: |
Remove a step library from the steplib chain. | Select the library and then select | .
Reorder the list of step libraries within the steplib chain. | Select | and to reorder the list.
Save the steplib.
Notes:
To create a step library:
Select
on the menu.The Create a Natural Library panel is displayed. For example:
Select the name of the NaturalONE project in Project.
Type the name of the step library in Library.
Select
.The library is created locally and displayed in the Navigator view.
Note:
You can upload the library to the server using standard
NaturalONE functionality.
To add a step library to the steplib chain:
Expand the step library node in the Navigator view.
Open the SteplibName.steplib file.
The steplib editor is displayed, showing the name of the steplib chain in Steplib.
Select
.The Library Information section is displayed. For example:
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.
Type the name of the new library over the default name in Library name.
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.
This subprogram will implement the logic for your new business service.
To create the subprogram:
Select
on the menu.The Create a Natural Subprogram panel is displayed. For example:
Select the name of the project in Project.
Select the name of the library in which to store the subprogram in Library.
Select the local folder in which to store the subprogram in Folder.
Type the name of the subprogram in Object name.
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.
Select
to create the subprogram.The new subprogram is listed in the Navigator view. For example:
The subprogram is also displayed in the Natural editor. For example:
Add logic to the subprogram.
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.
To add a method to the business service:
Open the NewService.bsrv file in the Navigator view.
The business service is displayed in the editor view.
Select
.The Method Information section is displayed. For example:
By default, method1 is displayed in Method name.
Type the name of the new method over the default name in Method name.
Type a brief description of the method in Method description.
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.
For information on testing business services and subprograms, see Application Testing.
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:
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 (), 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:
In callee mode (), 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:
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 (), 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:
In callee mode (), no child nodes are displayed because subprograms do not depend on any business service resources.
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:
Before you can add business service definitions to CentraSite, you must import the business service asset types to the CentraSite server.
To import the business service asset types:
Select
on the menu.The Import window is displayed.
Select CentraSite > Archive.
For example:
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.
Select
to import the asset types file.Note:
For more information on importing a file, see the CentraSite
documentation.
This section describes how to add the business service metadata to CentraSite.
To add business service metadata to CentraSite:
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.
Select Business-Services > Add to CentraSite.
The Add Business Service Metadata to CentraSite panel is displayed. For example:
Type the CentraSite connection path in Server.
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.
Select
.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.
To confirm that metadata has been added to CentraSite:
Select
on the menu.The Open Perspective window is displayed.
Select CentraSite > Search and Browse.
Select the Asset Types view.
If necessary, select to refresh the view.
Select an NBS asset type.
For example, select NBS Service:
Select to update the list in the Contents view.
For example:
Tip:
To display a graphical impact analysis, open the context menu
for an object in the Contents view.
Select the business service that you added to CentraSite.
The Summary page is displayed. For example:
Verify the associations in the References section.
Select the NBS Metadata tab.
Additional information about the service is displayed. For example: