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 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).
The description provided in this article applies too for the getCaseDataUsingSchema web method available in Bizagi .NET edition.
For the getCaseDataUsingSchema method, the response XML's are of the native .NET XmlDocument type.
For the getCaseDataUsingSchemaAsString method the same XML structure is handled, but this parameter is sent as a string type.
The following definition applies too for the getCaseDataUsingSchemaLiteAsString and getCaseDataUsingSchemaLite Web methods. The only difference is how Bizagi returns information regarding attachments:
•With getCaseDataUsingSchemaAsString, Bizagi returns attachments in File attributes in Bizagi as a strings encoded in base64 (if they are included in the input schema parameter).
•With getCaseDataUsingSchemaLiteAsString or getCaseDataUsingSchemaLite, Bizagi will only retrieve the attachments' file names.
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.
•sxsd: 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 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.
With the following example, we will obtain the Number of Office Days requested in a Vacation Request Process.
We will do this for a Process instance with case number = 752, and therefore for each input parameter we send:
•idCase = 752.
•sxsd: <?xml version="1.0" encoding="utf-8"?><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="Numberofofficedaysrequeste" type="xs:integer" /></xs:sequence></xs:complexType></xs:element></xs:schema>
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.
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.
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:
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 getCaseDataUsingXPathsAsString article.