QueryEntitiesAsString

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > SOAP web services > Available SOAP web services > QuerySOA Web methods >

QueryEntitiesAsString

Overview

This Web method is used to obtain records information at any of Bizagi's data model Entities.

You do not need to create an entity query form in order to rely on Bizagi queries engine to fetch reports.

 

This method receives mainly: The end user running the Query, filtering criteria for the specific attribute values in that Entity (i.e business information), and parameters to handle the results (how many matches to return, number of pages, etc).

 

note_pin

The description provided in this article applies too for the queryEntities web method available in Bizagi .NET edition.

For the queryEntities method, the request and response XML's are of the native .NET XmlDocument type.

For the queryEntitiesAsString method the same XML structure is handled, but this parameter is sent as a string type.

 

Input

 

Input Schema

The following shows a sample XML structure of information to send to Bizagi:

 

queryEntities_input

 

For further information about how is the XML structure returned for a data model in Bizagi, refer to Bizagi's data model XML schemas.

 

Input Parameters

BizAgiWSParam: This is the root node, containing all the necessary information to execute the query. Contains the "domain", "userName", "QueryParams", and "Parameters" nodes.

domain: Here goes the name of the domain for the Bizagi user who executes the query.

userName: Name of the user who executes the query.

QueryParams: Contains all the necessary information to search and filter the query results. Contains the "Xpaths" node.

Xpaths: Contains 1 or more nodes of the type "XPath", which are used to specify filtering information related to data model's query controls (business data).

XPath: Specifies in its "Path" attribute, the XPath for the attribute in the data model for filtering information. The XPath uses the dot character (.) as separator. The filtering value goes as the Value of the node and it is case sensitive. Only when specifying a range of values (for example for a Date) it would be necessary to include a "<From>" and/or "<To>" node to contain the range limit values. This element uses additional attributes such as:

"Include": Can be set to true in order to include the results for the attribute.

"Approx": Can be set to true to perform an approximate search on string-type attributes.

"Sort": Can be set as "Desc" (descending) or "Asc" (ascending) to order the results according to the attribute's value. When no ordering is specified, by default the sorting takes the RadNumber in an ascending way.

Take into account that the XPath for entity level query forms, will start off at the source entity.

Parameters: Contains 1 or more nodes of the type "Parameter", which are used to specify all the necessary information to handle the query execution results.

Parameter: Specifies in its "Name" attribute, options to handle the query form results. The filtering value goes as the Value of the node and it is case sensitive.

Possible "Name" values are: "PageSize" (defines a number for the size of the cases in each page), "pag" (defines a number for the page number from which the results cases will be read), "Culture" (defines a global culture for multi-language supported results, e.g "en-us", "en-gb").

 

Input Example

With the following example, we will obtain records from an Entity:

 

queryEntities_example_input

 

 

Output

 

Output Schema

The following shows a sample XML structure of information returned by Bizagi:

 

queryEntities_output

 

 

Output Parameters

BizAgiWSResponse: This is the root node, containing all the feedback information of the query execution. Contains the "Results", and "Parameters" nodes.

Results: Contains the "RowsCount", "PageCount" and "Tables" node with the returned information of the cases.

RowsCount: Number of total records (cases) returned by the query execution.

PageCount: Number of total pages returned by the query execution.

Tables: Contains the "CaseTable" and "TaskTable" nodes.

ResponseTable: Contains one "Columns" node and undefined occurrences of "Rows" (one for each case from the result).

Nodes inside the ResponseTable will contain information of the attributes of the given entity.

Parameters: Contains one or more nodes of the type "Parameter", which contain what specified as input for the query execution results.

Parameter: Specifies in its "Name" attribute, the options used in the input to handle the query form results.

 

Output Example

With the following sample returned XML-structured response from Bizagi SOA layer, we can see how is the information returned.

queryEntities_example_output

 

 

 

Related Web methods

If you wish to obtain information from specific types of Entities such as Parameter Entities, you may use the getEntitiesAsString or getEntities Web method available in the EntityManagerSOA Web service.

For further information refer to the EntityManagerSOA Web methods article.