getCaseDataUsingXPathsAsString

<< Click to Display Table of Contents >>

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

getCaseDataUsingXPathsAsString

Overview

This Web method is used to obtain both business information and general detail (e.g creation date, expiration date, etc) for a given Process instance (case), from an external application.

 

This method receives a single input having mainly: The case identifier, Xpath filters to define which business information (data model fields) we want to retrieve from the detailed search.

 

note_pin

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

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

For the getCaseDataUsingXPathAsString 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:

 

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

 <xs:element name="BizAgiWSParam">

         <xs:complexType>

                 <xs:sequence>

                         <xs:element name="CaseInfo" minOccurs="1" maxOccurs="1">

                                 <xs:complexType>

                                         <xs:sequence>

                   <xs:choice>        

                                                   <xs:element name="IdCase" minOccurs="0" maxOccurs="1" type="xs:integer" />

                                                   <xs:element name="CaseNumber" minOccurs="0" maxOccurs="1" type="xs:integer" />

                   </xs:choice>

                   <xs:choice>

                                                   <xs:element name="TaskName" minOccurs="0" maxOccurs="1" type="xs:string" />

                                                   <xs:element name="IdTask" minOccurs="0" maxOccurs="1" type="xs:integer" />

                                                   <xs:element name="IdWorkItem" minOccurs="0" maxOccurs="1" type="xs:integer" />

                   </xs:choice>

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                         <xs:element name="XPaths" minOccurs="1" maxOccurs="1">

                                 <xs:complexType>

                                         <xs:sequence>

                                                 <xs:element name="XPath" minOccurs="1" maxOccurs="unbounded">

                                                         <xs:complexType>

                                                                 <xs:attribute name="XPath" type="xs:string" />

                                                         </xs:complexType>

                                                 </xs:element>

                                         </xs:sequence>

                                 </xs:complexType>

                         </xs:element>

                 </xs:sequence>

         </xs:complexType>

 </xs:element>

</xs:schema>

 

Input Parameters

IdCase: Internal identification number (identifier 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 (identifier 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 identifier, nor the idCase or creation number, is necessary.

It is important that the identifier sent here is of an opened workitem, not of one that has already been performed.

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

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.

 

 

Input Example

The following example is done for a Credit Request Process having the following data model and required information:

 

GetCaseDataUsingXPaths_Image002

 

With the following example, we will query the information of case having identifier number 8451. This case has an active Task with id= 180. The desired information is: BuroScore, BuroFile, DocumentNumber and the DocsDelivieryDate from the Applicant entity (for all of the Applicants related to this request).

In addition to this, we want to retrieve as well the DocumentNumber of applicants having a BuroScore less than 100.

 

 

GetCaseDataUsingXPaths_Image003

 

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 less-than sign (<), but this is a reserved special character in XML notation; and therefore it should be included in a XML format (as "&lt;").

 

The following table provides the XML format equivalent to use, for those scenarios where reserved special characters in XML are required(commonly used).

 

Character

Description

XML Format to use

<

Less-than sign

&lt;

>

Greater-than sign

&gt;

"

Double quotation mark

&quot;

'

Single quotation mark (or apostrophe)

&apos;

&

Ampersand

&amp;

 

 

Output

 

Output Schema

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

 

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

 <xs:element name="BizAgiWSResponse">

         <xs:complexType>

                 <xs:sequence>

                         <xs:choice maxOccurs="unbounded">

                                 <xs:element name="XPath">

                                         <xs:complexType mixed="true">

                                                 <xs:sequence minOccurs="0">

                                                         <xs:element name="Items">

                                                                 <xs:complexType>

                                                                         <xs:sequence>

                                                                                 <xs:element maxOccurs="unbounded" name="Item">

                                                                                         <xs:complexType>

                                                                                                 <xs:simpleContent>

                                                                                                         <xs:extension base="xs:string">

                                                                                                                 <xs:attribute name="Id" type="xs:integer" use="optional" />

                                                                                                                 <xs:attribute name="FileName" type="xs:string" use="optional" />

                                                                                                         </xs:extension>

                                                                                                 </xs:simpleContent>

                                                                                         </xs:complexType>

                                                                                 </xs:element>

                                                                         </xs:sequence>

                                                                 </xs:complexType>

                                                         </xs:element>

                                                 </xs:sequence>

                                                 <xs:attribute name="XPath" type="xs:string" use="required" />

                                         </xs:complexType>

                                 </xs:element>

                                 <xs:element name="Error">

                                         <xs:complexType>

                                                 <xs:sequence>

                                                         <xs:element name="ErrorCode" type="xs:integer" />

                                                         <xs:element name="ErrorMessage" type="xs:string" />

                                                 </xs:sequence>

                                                 <xs:attribute name="XPath" type="xs:string" use="required" />

                                         </xs:complexType>

                                 </xs:element>

                         </xs:choice>

                 </xs:sequence>

         </xs:complexType>

 </xs:element>

</xs:schema>

 

 

Output Parameters

BizAgiWSResponse: The root node.

Xpath: An element present for each of the values retrieved, as specified in the input parameter.

Note that this element may have more than one value (specifically for attachment files and collection values). If this is the case, refer to the Items description.

Items: Contains the value, when the Xpath element contains multiple values.

Error: Contains information in the eventual case of an error in the invocation.

ErrorCode: The error code for the error (should an error occur).

ErrorMessage: The descriptive error message for the error (should an error occur), and its inner elements correspond to the Schema defined in the input parameters.

 

 

Output Example

With the following sample returned XML-structured response from Bizagi SOA layer, we can see that business information is returned, as well as an error for a requested attribute:

 

GetCaseDataUsingXPaths_Image005

 

 

Related Web methods

If you wish to use a Schema definition to specify which business information (data model fields) you want to retrieve, use the getCaseDataUsingSchemaAsString Web method.

For further information refer to the getCaseDataUsingSchemaAsString article.