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.
 

GetCaseDataUsingXPaths

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

Jump to: navigation, search

<keywords content="keywords"> getCaseDataUsingXPaths, getcasedatausingxpaths, getCaseDataUsingXPathsAsString, getcasedatausingxpathsasstring, get Case Data Using XPaths, get case data using xpaths, SOA Layer, soa layer, EntityManagerSOA, entitymanagersoa, Entity Manager SOA, entity manager soa </keywords> 

Contents

getCaseDataUsingXPaths

This is a new method of the EntityManagerSOA web service. It is used to seek information about a case in Bizagi given the case identification number and the XPath or XPaths containing the required data. This document also applies to the method getCaseDataUsingXPathsAsString.

Description

This method receives an XML in XmlDocument (.NET) format with information needed to identify the case together with the XPaths of the data that is to be retrieved. There is also a counterpart which receives the same XML but in string format, this method is called getCaseDataUsingXPathsAsString.

Input Data

This is the schema of the expected XML:


CaseInfo Node

IdCase: Internal identification number (id in the database) of the case in Bizagi.

CaseNumber: Case number or creation number of the case. If the previous element is used, this one is not necessary.

TaskName: This element must be used in conjunction with the IdCase or CaseNumber. When it is included in the query, the returned information will be the data saved in an ongoing task (only for manual activities or available intermediate events), if not, only data existing in the database is retrieved.

IdTask: Instead of the TaskName, it is possible to use the task’s internal identification number (id in the database).

IdWorkItem: Another way to obtain the information of a specific task in the case is by just sending the identification number of the workitem (the WORKITEM table holds information about the performed and current tasks of every case). If this element is filled, then the task’s name or id, nor the idCase or creation number, is necessary. It is important that the id sent here is of an opened workitem, not of one that has already been performed.

So, the possible combinations in this node are:

- To fill in only the IdCase (returns only data of finished tasks).

- To fill only the CaseNumber (returns only data of finished tasks).

- To fill the IdCase or Case Number and TaskName or IdTask (returns data of current tasks)

- To fill just the IdWorkItem (returns data of current tasks).

XPaths Node

XPath: Include this element for each XPath in the query. This element, in turn, has an attribute also named XPath, the value of this attribute will be the required Bizagi XPath.

Example

For a process with this data model:



The following XML is used to consult the information of case number 8451 in task 180. The desired information is BuroScore, BuroFile, DocumentNumber and the DocsDelivieryDate from the Applicant entity; all Applicants (related to this case) and the DocumentNumber of applicants with BuroScore less than 100 from the Request entity.


Special XML Characters

In the previous image it is possible to see an element with a filter (BuroScore &lt; 100). In this filter it is necessary to use the character <, but this is a special character in XML and should be used in XML format (&lt;). Here is a table with the equivalent special characters in XML.


Character

XML Format

Description

"

&quot;

Double quotation mark

'

&apos;

Apostrophe or single quotation mark

&

&amp;

Ampersand

<

&lt;

Less-than sign

>

&gt;

Greater-than sign

Output Data

This is the schema of the returned XML:



For each consulted XPath there will be an XPath element with its content. It is possible that the XPath returns more than one item, like files and collections, then a sub-element named Items is added. For a Collection, if in the request no attribute is specified, then each Item element will have an XML attribute named id, which is the id of the record in the database.

Example

For the sample input XML, this is the response:


Notes

  • XPaths use a dot (.) as separator.
  • The names of XML elements and attributes, as well as Bizagi XPaths, are case-sensitive.
  • String type values are enclosed in a CDATA section, this is because it is possible the string contains XML special characters such as ampersand (&), less-than sign (<), greater-than sign (>), apostrophe (') or double quotation mark (").
  • Files are included in the response XML as a sequence of Bytes in Base64.
  • Dates are included with the format used in XML, e.g. 2010-03-16T00:00:00.
  • If an XPath in the request XML has any error, then, in the response, instead of having an XPath element for this XPath, there will be an Error element with the corresponding error code and message.



Go to SOA Layer <comments />