Setting which business information is returned

<< Click to Display Table of Contents >>

Navigation:  Bizagi API > Basic concepts >

Setting which business information is returned


When invoking OData services, specifically while fetching business information from the Data services, you may choose which attributes are returned.

This configuration is completely optional, and it applies to:

1. MyStuff invocations.

2. Searches invocations

3. Processes data (cases) invocations.


Note that by default, returned attributes are those which have been set in the default template that shows information for an entity.

You may override such definition, by setting for each entity which information will be available for OData invocations.


Changing the definition of the template

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


Configuring exposed attributes

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

Go to the Expert view and into the Entities module for this, and right click on your chosen entity.

Click the OData exposed attributes option:




On the opening window, click Customize to change the definition of the attributes which are returned so that not all of them are necessarily considered.




Unmark those attributes in the left panel which you want to rule out of the business information returned by OData services:




Notice that the right panel will automatically reflect Selected Data and the attributes which are chosen.

Similarly, you may mark any attributes you wish to include.

Click Ok when done.


Linked references (for entities and collections)

Whenever one item of the displayed data model has sub-items, it means that such item is a related attribute pointing to another entity.


Consider that collection attributes are not displayed in this editor with their corresponding sub-items but as it if were a simple data type.

Collections are displayed with this icon: OData_EditorIconColl.


Therefore and if you tick a checkbox of an un-expanded item, then all of its sub-items will be left unmarked and only the current item will be selected (as a linked reference):




Which you may confirm when expanding the item (by noticing that its sub-items are not ticked):




Whenever doing the above, you are implicitly defining that you wish to include information of the related entity as a referenced link, so that you may drill down and navigate into its detail through further OData invocations.

This concept is referred to as Navigations.


A different thing happens if you tick the item while it is expanded, where you will notice that its sub-items become eligible to be included and are also automatically ticked:




Whenever explicitly including any sub-items as in the above image, then you will no longer use navigations and such detail of the referenced entity will be fetched during that same OData service invocation (you will not need additional invocations).

Collections for instance, are to be treated always as linked references (as these do not show its sub-items), and therefore these automatically use navigations.

The following image displays how MedicalEquipment, which is a collection, is shown:




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



The following example shows how this configuration is applicable to a search of the Experience Design features.

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




Therefore, in order to narrow down and specify exactly which bits of business information are returned when fetching information 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 Studio:




When invoking the Search Requests search, note that the attributes to be returned match the customization set above: