Columns in collections

<< Click to Display Table of Contents >>

Navigation:  Bizagi API > Basic concepts > Common lookup services >

Columns in collections

Overview

Bizagi features OData services, which handle a comprehensive set of resources, some which enable you to do an HTTP POST to start a new process, complete a pending activity or event (workitem), or to trigger an action.

In order to use these HTTP POST-based  services, you may first need to acknowledge which is the data structure or input parameter needed for a collection.

 

The following section describes how to interpret the columns set up in a form using a collection, so that you can send out adequate values when starting a new process, completing a workitem or triggering an action, if these require that information in the collection is filled out.

 

Scope of the resource

The information about columns in a collection is retrieved by default when querying a process (those attributes of the type Entity), either used in a start form -when wanting to create a new case, or used in an activity form -when wanting to complete a workitem, or used as input for an action -when wanting to trigger one.

 

Resource URL

The information about columns used by collections is available for all of these resources, whenever any resource returns information about an Xpath, which explicitly is of the type Collection:

[your_bizagi_project_url]/odata/data/processes([ID_process])

[your_bizagi_project_url]/odata/data/processes([ID_process])/cases([ID_case])/workitems([ID_workitem])

[your_bizagi_project_url]/odata/data/cases([ID_case])/workitems([ID_workitem])

[your_bizagi_project_url]/odata/data/stuff([ID_stuff])/values([ID_value])/actions([ID_action])

[your_bizagi_project_url]/odata/data/searches([ID_search])/actions([ID_action])

[your_bizagi_project_url]/odata/data/searches([ID_search])/results([ID_result])/actions([ID_action])

[your_bizagi_project_url]/odata/data/relevants([ID_relevant])

[your_bizagi_project_url]/odata/data/relevants([ID_relevant])/actions([ID_action])

 

 

Example

The following image illustrates how you can send an HTTP GET for this resource, by using as an example the following:

 

OData_CollectionDataType

 

Returned results consider multiple values inside of a Collection-type Xpath, one per each of the columns included in that form (typically in a table control).

Inside of the columns element, you will find:

Name: The unique name of the attribute as a column.

Id: A string-based GUID representing the URI of that specific reference.

Xpath: The Xpath to that attribute parting from the collection entity.

Type: The type of data of the attribute. For a list of possible values regarding data types in Bizagi, refer to Types of data.

 

Based on the columns information, and in order to send out input parameters for a collection, ensure that you build the following structure for this specific Xpath:

 

{

    "startParameters": [

        {

            "xpath": "MyProcessEntity.MyCollection",

            "type": "collection",

            "rows": [

                         {

                    "columns": [

                         {

                            "xpath": "FullName",

                            "value": "Juliette Leroy"

                        },

                        {

                            "xpath": "Income",

                            "value": "300000"

                        }

                    ]

                },

                {

                    "columns": [

                         {

                            "xpath": "FullName",

                            "value": "Piotr Blanter"

                        },

                        {

                            "xpath": "Income",

                            "value": "300000"

                        }

                    ]

                }

            ]

        }

    ]

}

 

Notice that the following example, sends out 2 new rows for the MyCollection collection, while filling out 2 columns: FullName and Income.

The image below shows another example, and the response you receive when creating a new case for a given process:

 

OData_SendCollection

 

 

Restrictions

Consider:

Nested collections (that is, collections inside of collections) are not supported by these services.

This means that you may fill out directly a collection with values, but you may not fill out a collection inside of a collection.

You may not edit nor delete rows that are already created in such collection.