Skip to main content

Flowcharts

The purpose of this chapter is to give an overview of the data structures and API calls available in the SDK.

Introduction

These flowcharts are examples of how implementation can be done and focus on how data structures and API calls work together. Below the different symbols used in the flowcharts are presented.

Legend

Flowchart symbol explanation

Illustration showing the different legends

Authentication

When using a Public AccessToken authentication can be done directly from the client. This is done by first creating a Catalogue API instance, which is then used to call postPublicAccessTokenAuthorize. This will return a AuthorizeResponse which contains a SessionToken. This only needs to be done once per session.

In order to enable the rest of the calls made by Catalogue API, the AuthorizeResponse needs to be saved to the auth variable on the Catalogue API instance.

Authentication flow - Public AccessToken

Diagram showing the authentication flow when using a Public AccessToken

Table of content

A table of content can be made from every CataloguePermission. The CataloguePermissions available are found in the AuthorizeResponse gotten from the authentication step. The table of content for a specific CataloguePermission can be created by making a getTocTree request which returns a TOCResponse. The response contains an array of Levels. Each Level contains an array of ProductRefs. Each ProductRef can be used to display an item in the Table of Content. To be able to make the getTocTree request you need to create a GetTocTreeParams object containing information about the Catalogue to display and which language to use. The request is made through the Catalogue API object provided with the AuthorizeResponse, created in the authentication step.

Table of content flowchart

This is an example to show how to retrieve a table of content for all your available Products

Diagram showing the table of contents flow

Get and Validate product

The the get and validate calls on products are coordinated through instances of the class CfgProduct in normal use cases. Use CfgProduct.make and provide it with the API-instance, the catalogue and the partNr. This object along with the ApplicationAreas of the Catalogue can be used to create a BabylonView object.

Product flowchart After 1.0

Diagram showing the product flow