Searches results' actions data

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > OData services > Data services > Searches data > Searches execution results and data >

Searches results' actions data

Overview

Bizagi features an OData service which handles aspects of the Experience design.

Through the Searches URI, you may handle data related to searches provided to Stakeholders, as described at Searches execution results and data.

This section describes how to obtain actions of records (and eventually execute them), as returned by searches.

 

note_pin

Actions considered by this service are solely those which trigger new processes.

Actions which execute rules or launch forms are not supported.

 

Resource URL

Start off from the following URL:

https://[your_company].bizagi.com/[your_project]/odata/data/searches([search_ID])/results([result_ID])/actions

 

Consider:

[your_company]: The name of your company.

[your_project]: The name of your Bizagi project. Recall that for environments other than the production environment, the project includes a suffix referencing the given environment.

[search_ID]: The ID of a specific search, as returned in Searches execution results and data.

[result_ID]: The ID of a specific recording, as returned when executing a search via Searches execution results and data.

 

Example

The following image illustrates how you can send an HTTP GET for this resource:

 

OData_SSearches3

 

Returned results consider (inside of the value element):

Name: The unique name of the action for that record.

DisplayName: The default display name of the action for that record.

@odata.id: The unique URL to access that specific action.

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

Parameters: The list of data (attributes) that such actions needs in order to run.

Such parameters include for each attribute:

oId: A string-based GUID of the attribute.

oName: The display name of the attribute.

oXpath: The full Xpath to that attribute (includes its name).

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

 

note_pin

In addition to the above, for every set of results returned by the OData services, the successful response includes a set of standard properties which are preceded by the @ sign. Such properties are described at Properties and querying options.

 

Notice how through the @odata.id property, you can obtain that specific record's detail only, instead of a full list.

For example using:

https://[your_company].bizagi.com/[your_project]/odata/data/searches([search_ID])/results([result_ID])/actions[(action_ID)]

 

OData_SSearches4

 

For a given action, you may send out parameters and execute it to start a case.

In order to trigger an action which starts a new case, the URL described below is invoked by means of an HTTP POST:

https://[your_company].bizagi.com/[your_project]/odata/data/searches([search_ID])/results([result_ID])/actions[(action_ID)]/execute

 

Consider including the following JSON structure to send parameters in the body:

{

      "startParameters": [

       {

           "xpath": "[xpath_name]",

           "type": "[xpath_datatype]",

           "value": "[value_for_xpath]"

       }

   ]

}

 

Consider:

[xpath_name]: The exact xpath as expected by parameters of that process' triggering action.

[xpath_datatype]: The data type for that xpath as expected by each parameter..

[value_for_xpath]: The value you want to set to such xpath parameter.

 

Notice if you have more than 1 parameter, you would use:

{

      "startParameters": [

       {

           "xpath": "[xpath1_name]",

           "type": "[xpath1_datatype]",

           "value": "[value_for_xpath1]"

       },

       {

           "xpath": "[xpath2_name]",

           "type": "[xpath2_datatype]",

           "value": "[value_for_xpath2]"

       }

   ]

}

 

Similarly, if no parameters are expected, you would use:

{

 "startParameters": [

 ]

}

 

To filter the search with parameters, consider the notes for the different data types, as described at Values and formats for data types.

 

The following image illustrates data in the body you can send in an HTTP POST and the response you obtain indicating the case number of the created case (at the returned value):

 

OData_ActionsExec3

 

Notice this other image shows a previous invocation regarding parameters that the action expects (as you would need to send the exact data type and matching xpath information):

 

OData_ActionsExec2