Generic Report service for interfaces
Generic reports generate and store log information on the execution of interfaces in an asset. Through these assets, administrators can access the complete history of executions of a specific interface.
Context
The Generic reports service provides an API that listens to and logs the execution of an interface. Each interface requires its own implementation.
Prerequisites
The Generic report service must be implemented in the interface.
Introduction
The Generic report service provides information about the execution of interfaces in censhare Web. Interface executions can be uni-directional or bi-directional. The export channel comprises the data aggregation of one or multiple assets. The data are written into an export file and exported to a folder that can be accessed via FTP. The import channel comprises a source file import into a hot folder, the processing of the data from the import file, and the creating/updating of assets.
Each interface requires a specific Interface asset configuration (asset type: Module / Interface). censhare provides the standard Interface configurations:
Google Natural Language API - This interface exports text data to Google and receives classifications and keywords that are stored in the Text assets. For more information, see Configure Google Cloud AI services.
Google Cloud Vision API - This interface exports image data to Google and receives information and keywords that are stored in the Image assets. For more information, see Configure Google Cloud AI services.
GPC interface - This interface imports product classification data to censhare and creates a product category hierarchy, features and feature items for a Product Information Management (PIM). For more information, see Product classification for PIM.
The standard configuration includes the generic report service. In censhare Web, an Interface asset shows a table with all executions of the interface. The execution data are stored in an automatically created Protocol asset. The Protocol asset shows assets that were created or modified during an interface execution, added or modified asset data, and source files.
Create an Interface asset in censhare Web
The Interface asset shows the history of all executions of a specific interface. For each execution of an interface, the Generic report service creates a Protocol asset. To display these Protocol assets in the corresponding Interface asset, the Protocol asset must reference the Resource key of the Interface asset in the censhare:module.interface feature.
To add a new Interface asset, create an asset of the type Module / Interface, or duplicate an existing one. In the Create asset dialog, enter the details:
Property | Description |
Name | Enter a unique name that users can search for in censhare Web. |
Resource key | For naming rules, see Resource key. You need the resource key for the implementation of the Generic report & Protocol service (see following section). |
Enabled | Must be selected. |
In cached tables | Must be selected. |
Note: If you copy an existing asset, you only need to change the name and enter a new resource key. The table configuration does not need to be changed.
In the Module / Interface asset page, a table widget configuration is placed on the Overview tab. The Interface workflow table configuration shows all Protocol assets with a reference to a specific interface. The reference is stored in the Protocol asset in the censhare:module.interface feature. Do not change the table configuration!
Implement the Generic report & Protocol service
The Generic report service provides an API that retrieves logging data from the interface when it is executed. The service creates a Protocol asset with the specific resource key of the Interface asset. The resource key must be provided in the Protocol service implementation. The Protocol service writes the logging data (infos, warnings, errors) in the Protocol asset. If the interface processes data from a source file, the file is added as a storage item to the asset.
Result
The interface logging data are written into a Protocol asset. Protocol assets are created each time an interface action is executed. Protocol assets are displayed in the corresponding Interface asset table.