QueryEntities
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> querySOA, query SOA, queries SOA, queryEntities, query Entity, query Entities, queryEntitiesAsString, SOA Layer, soa, queries, reports </keywords>
Contents |
QueryEntities
A method from the QuerySOA web service used to execute an existing entity query form.
This method's invocation will return all records in an entity with their detail (as possible and defined in the entity query form's construction). It allows filtering of the records according to the information contained in them, and also handling paging of the returned results (given this query can return a significant amount of records).
This document also applies to the method QueryEntitiesAsString.
Description
This method performs a search of records in a given entity, by executing an existing entity query form. This method is useful and powerful for reports via the SOA layer.
Review information about query forms (reports) in Bizagi.
The method QueryEntities receives and returns an XmlDocument while QueryEntitiesAsString receives and returns an XML in string format.
Input Data
The following schema defines the expected XML structure for the method's input:
Parameter 1 (XmlDocument or String Type)
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 renders (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.
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: "idQueryForm" (defines a number that corresponds to the query form's id), "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, for example: "en-Us").
Example
With the following XML the user domain\admon will execute an entity-level Query form:
Output Data
The following schema defines the returned XML structure for the method's output:
The response includes basic information of the cases and result information contained in the returned XML.
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 1 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.
Example
The following XML is a response from our previous input example:
Related Articles
<comments />