All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

QueryCases

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords"> querySOA, query SOA, queries SOA, queryCases, query Cases, queryCasesAsString, SOA Layer, soa, queries, reports </keywords> 

Contents

QueryCases

A method from the QuerySOA web service used to execute an existing application query form.
This method's invocation will return all cases with their detail (as possible and defined in the query form's construction). It allows filtering cases according to business information (as well as process information), and also handling paging of the returned results (given this query can return a significant amount of cases).
This document also applies to the method QueryCasesAsString.

Description

This method performs a search of cases in the application by executing an existing query form. This method is useful and powerful for reports via the SOA layer.
Review information about query forms (reports) in Bizagi.

The method QueryCases receives and returns an XmlDocument while QueryCasesAsString 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 "Internals" and "XPaths" nodes.

Internals: Contains 1 or more nodes of the type "Internal", which are used to specify filtering information related to internal renders (process data).

Internal: Specifies in its "Name" attribute, the internal render for filtering information. The filtering value goes as the Value of the node and it is case sensitive.
The possible Internal "Name" values are:

  • ProcessState: Allows filtering a case if it is open ("Running"), closed ("Completed") or was aborted ("Aborted"). "ALL" is used as the default value, in which case there would be no filtering.
  • RadNumber: Allows specification of a specific case.
  • CreationDate: Allows filtering according to the cases' creation date.
  • ExpiryDate: Allows filtering according to the cases' expiration date.
  • ExpiryDays: Allows filtering according to the remaining days for the cases' expiration date.
  • Users: Allows filtering according to the users (by specifying the UserId) which are currently working in the cases.
  • Creatorfullname: full name of the case creator.
  • Creatorposition: position of the case creator.
  • Creatorloginname: user name of the case creator.
  • Userfullname: full name of the current logged user (currentuser).
  • Userposition: position of the currently logged user (currentuser).
  • Userloginname: username of the current logged user (CurrentUser)
  • idWfClass: Allows filtering according to the process id (wfclass).
  • idApplication: Allows filtering according to the application's id.
  • idCategory: Allows filtering according to the category's id.
  • idTask: Allows filtering according to the current task.

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.

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.
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 the Query form QueryForm1 with the following filters:

  • Only cases which are currently open (running).
  • Only cases which were opened in a previous date than November fourth of 2011.



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.

CaseTable: Contains one "Columns" node and undefined occurrences of "Rows" (one for each case from the result).
The following are the included nodes and their definition:
RADNUMBER: Radication number.
BAWORKFLOWPATH: Process path.
WFCLSDISPLAYNAME: Process display name (from wfclass).
CASCREATIONDATE: Creation date of the case.
CASSOLUCIONDATE: Solution date of the case.
IDWFCLASS: Process id.
IDCASE: Case number.
IDCASESTATE: Case status. The following case status are valid: Initiated (1), Running (2), Suspended (3), Aborted (4), Completed (5), NotInitiated (6), CancelledByCompensation (7), CancelledByException (8).

TaskTable: Contains one "Columns" node and undefined occurrences of "Rows" (one for each task).
The following are the included nodes and their definition: TaskState: Current task state. CurrentTask: Display name of the current task. wiEstimatedSolutionDate: Estimated solution date for the task. idTaskType: Task type. idTask: Task's id. idWorkItem: Workitem's id. idCase: Case number for that task instance.

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 />