Setting which business information is returned

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Bizagi from external applications > Bizagi API > OData RESTful services >

Setting which business information is returned

Overview

When invoking OData services, to fetch business information, you can choose which attributes are exposed.

 

This configuration is optional, and applies it to when you use:

1. Bizagi Apps

2. Services that return process information, like Cases.

3. MyStuff invocations.

4. Searches invocations

5. Services from the Query OData methods used in Power BI and Tableau connectors.

 

By default, exposed attributes are those which have been set in the default template that shows information for an entity.

You can override those definitions by setting for each entity which information is available for OData invocations.

 

Changing the definition of the template

To modify which information is returned, create a Content type template for that entity or modify the existing one, provided that there is only one set.

 

Configuring exposed attributes

To configure a definition which overrides the template, locate the Entity holding the set of information which you want to explicitly include or exclude.

In the Expert view select Entities module, and right-click your chosen entity.

Select the OData exposed attributes option:

 

OData_Studio1

 

Click Customize to change the definition of the attributes which are exposed.

 

OData_Studio2

 

Un-check attributes in the left panel, which you want to rule out of the business information returned by OData services:

 

OData_Studio3

 

The right panel automatically reflects Selected Data and the attributes chosen.

You can mark any attributes you wish to include.

Click OK when done.

 

Linked references (for entities and collections)

When an item in the displayed data model has sub-items, it means that the item is a related attribute pointing to another entity.

 

The editor does not display collection attributes with their corresponding sub-items, but if they were simple data types.

Collections display with this icon: OData_EditorIconColl.

 

If you check the checkbox of an un-expanded item, all of its sub-items are left unchecked and only the current item is selected as a linked reference:

 

OData_Studio7

 

You can confirm this by expanding the item and seeing that its sub-items are not selected:

 

OData_Studio8

 

When you do this, you are including information of the related entity as a referenced link, so that you can drill down and navigate into its detail through further OData invocations.

This concept is referred to as Navigations.

 

A different thing happens if you check the item while it is expanded. Its sub-items become eligible to be included and are automatically checked:

 

OData_Studio9

 

When you include sub-items, as in the above image, you will no longer use navigations. Details of the referenced entity will be fetched during the same OData service invocation and you will not need additional invocations.

Collections, are always treated as linked references (and do not show their sub-items), so they require navigations.

The following image displays how Medicalequipment, which is a collection, appears:

 

OData_Studio10

 

For details about how to treat referenced links and manage further invocations for navigations, refer to Navigating into linked information.

 

Example

The following example shows how this configuration applies to a search of the Personas Wizard features.

A search called Search Requests is set to rely on the SimplePurchaseRequest entity:

 

OData_Studio6

 

To specify exactly which bits of business information are fetched from the SimplePurchaseRequest entity, you may use the OData exposed attributes option.

In this case, attributes have been customized for the previous search as shown in the Studio:

 

OData_Studio4

 

When you invoke the Search Requests search, the attributes to be returned match the customization set above:

 

OData_Studio5


Last Updated 3/15/2023 2:13:45 PM