<< Click to Display Table of Contents >> Searches execution results and data |
Overview
Bizagi features an OData service which handles aspects of the Experience design.
Through the Searches URI, you can handle data related to searches provided to Personas, as described at Searches data.
This section describes how to use search and explore its results.
Resource URL
Start from the following URL:
[your_bizagi_project_url]/odata/data/searches([search_ID])
Customization:
•[search_ID]: The ID of a specific search, as returned when obtaining the Searches data.
•[your_bizagi_project_url]: Corresponds to the URL where end users access the Bizagi Work portal.
For Automation Service projects, the URL would be:
https://[project_environment]-[your_project]-[your_company].bizagi.com/odata/data/searches([search_ID])
Possibilities with a given search
The following options are available for specific search:
1.Execute it by sending filters (parameters).
Invocation for these results is an HTTP POST action since you need to send parameters, as illustrated at Execute a search with parameters.
2.Execute it to obtain default results without specifying filters (parameters).
Invocation for these results is an HTTP GET action since you do not need to send parameters, as illustrated at Execute a search without specifying parameters.
Examples
For both scenarios, consider these examples.
1. Execute a search with parameters.
Start with this URL:
[your_bizagi_project_url]/odata/data/searches([search_ID])/performSearch
Include the following JSON structure to send parameters in the body:
{
"startParameters": [
{
"xpath": "[xpath_name]",
"searchType": "[searchMode]",
"value": "[value_for_xpath]"
}
]
}
Customization:
•[xpath_name]: The name of the Xpath expected by the search parameters.
•[searchMode]: Either approx (for an approximate search based on text), or exact (for a precise match).
•[value_for_xpath]: The value to use as a filter for the Xpath parameter.
If you have more than one parameter, use:
{
"startParameters": [
{
"xpath": "[xpath1_name]",
"searchType": "[searchMode]",
"value": "[value_for_xpath1]"
},
{
"xpath": "[xpath2_name]",
"searchType": "[searchMode]",
"value": "[value_for_xpath2]"
}
]
}
The following image illustrates data in the body you can send in an HTTP POST and the invocation's result:
Returned results include (inside the value element):
•@odata.id: The unique URL to access a record.
•Id: A string-based GUID representing the URI of the record.
•Parameters: The list of parameters associated to information for that record.
Such parameters include sets of information having:
oXpath: The Xpath to that attribute starting from the process entity.
oValue: The value that the Xpath has for that record.
Every set of results returned by the OData services includes a set of standard properties which are preceded by the @ sign. These properties are described at Properties and querying options. |
You can execute the search and explore the results (for instance to execute actions available for a result).
For more information about how to execute searches and navigate with their results, refer to Search results' actions data.
Specific formats
Refer to the following links for specific use cases:
•To filter the search using parameters, consider the notes for the different data types, as described at Values and formats for data types.
•To dynamically obtain business values that you may need as input parameter to start a new process or complete an activity, refer to Related entities services.
•To dynamically obtain the columns you need to fill out and send when creating records in a collection, refer to Columns in collections.
•To learn how to comply to the format expected when sending dates, files and images or Boolean fields, refer to Sending input parameters.
2. Execute a search without specifying parameters.
Use the following URL:
[your_bizagi_project_url]/odata/data/searches([search_ID])/results
The following image illustrates how you can use an HTTP GET for this resource:
Returned results include (inside the value element):
•@odata.id: The unique URL to access the record.
•Id: A string-based GUID representing the URI of the record.
•Parameters: The list of parameters associated with information for that record.
The parameters include sets of information having:
oXpath: The Xpath to that attribute starting from the process entity.
oValue: The value that the Xpath has for that record.
Every set of results returned by the OData services includes a set of standard properties which are preceded by the @ sign. These properties are described at Properties and querying options. |
Through the @odata.id property, you can obtain a specific record's detail only, instead of a full list.
For example, use:
[your_bizagi_project_url]/odata/data/searches([search_ID])/results([result_ID])
You can further explore the result to, for instance, execute an associated action for it.
For more information about how to navigate to actions which trigger processes from results of searches, refer to Search results' actions data.
Last Updated 6/9/2023 3:28:51 AM