Get Case Data Using Schema

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Bizagi from external applications > Bizagi API > Alternative SOAP services > Available SOAP web services > EntityManagerSOA Web methods >

Get Case Data Using Schema

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.

Using this method, Bizagi returns attachments in File attributes in Bizagi as a strings encoded in base64 (if they are included in the input schema parameter).

 

note_pin

This method returns files attached to the case when the case and the activity or event is active. Getting files from closed cases or activities is not supported.

 

This method receives three parameters, from which two are strictly required: The case identifier, and an XSD (XML Schema) to specify which business information (data model fields) we want to retrieve from the detailed search.

An optional parameter is the work-item input (representing a pending Activity), which would indicate Bizagi to retrieve business information in a given Activity (saved in the scope, but not necessarily persisted yet).

 

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

For the getCaseDataUsingSchemaAsString method the same XML structure is handled, but the parameter sxsd is sent as a string type using CDATA.

 

 

Input

 

Input Schema and Parameters

idCase: Corresponds to the case number.

idWorkitem: Optional. Retrieves information which has been saved in a given Activity (in the scope). Such information which has not been necessarily persisted yet.

xsd: Schema definition with the data to be extracted. The schema's structure sent should correspond to the one obtained from the Process Entity's definition. For the method getCaseDataUsingSchemaAsString this parameter is called sxsd. The schema structure should be enclosed as CDATA.

For further information about this expected schema, refer to Bizagi's data model XML schemas.

Within this XSD, the attribute nillable works to lookup information for a case through an XSD.

 

Input Example

With the following example, we will obtain the Number of Office Days requested in a Vacation Request Process.

Notice that the specified schema will start off from Application Entity, which has a reference to the Process Entity (called VacationRequest in our example). For this definition, the schema will correspond to the one obtained from the Application Entity in our example.

We will do this for a Process instance with case number = 51, and therefore for each input parameter we send:

 

GetCaseDataUsingSchema Method Input

<idCase>51</idCase>
<idWorkItem />
<xsd>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="VacationRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="NumberOfOfficeDaysReques" type="xs:integer" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
</xsd>

 

GetCaseDataUsingSchemaAsString Method Input

<idCase>51</idCase>

<idWorkItem />

<sxsd>

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

   <xs:element name="VacationRequest">

     <xs:complexType>

       <xs:sequence>

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

       </xs:sequence>

     </xs:complexType>

   </xs:element>

 </xs:schema>]]>

</sxsd>

 

Output

 

Output Schema and Parameters

The XML structure for the information returned by Bizagi has BizAgiWSResponse as the root node, 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 one specific case detail is returned according to the specified schema.

We suggest you use How to start a process in Bizagi from other applications as a guideline to invoke this service.

 

GetCaseDataUsingSchema Method Output

 

getCaseDataUsingSchema_sampleOutput

 

GetCaseDataUsingSchemaAsString Method Output

 

getCaseDataUsingSchemaAsString_sampleOutput

 

Related Web methods

If you wish to use XPath definitions instead of an XSD for the filtering criteria, use the getCaseDataUsingXPathsAsString or getCaseDataUsingXPaths Web methods.

For further information refer to the Get Case Data Using XPaths article.


Last Updated 1/6/2022 5:12:43 PM