Performing an Ad-hoc Search
You can perform ad-hoc case data searches.
This is accomplished with BusinessDataServices operations.
The following step-by-step descriptions correspond to the numbered steps above. Note that the descriptions are from a web service operation point of view, and provide an example of performing the operations using the web service API (SOAP).
Procedure
-
Find out the case classes and their attributes for a specific case model deployed in TIBCO ActiveMatrix BPM by calling
getCaseClassInfo.
Note: Only the attributes and case identifiers that have been specified as searchable in the business object model are returned. You must specify the searchable attributes at designtime. See TIBCO Business Studio Modeling Guide for more information.
The response returns all the case classes and attribute information for the specified case model.
// Step 1 : Get a list of the case classes and their attributes <soapenv:Body> <api:GetCaseClassInfoRequest> <appDetails> <name>com.example.gddemo-2</name> <majorVersion>2</majorVersion> </appDetails> </api:GetCaseClassInfoRequest> </soapenv:Body>
<SOAP-ENV:Body> <GetCaseClassInfoResponse xmlns="http://api.bds.tibco.com"> <caseClassInfo xmlns=""> <name>com.example.gddemo.Car</name> <attributeInfo> <path>vehicleID</path> <type>ATTR_TEXT</type> </attributeInfo> <attributeInfo> <path>vehicleType</path> <type>ATTR_ENUM</type> <enumLiteral>CAR</enumLiteral> <enumLiteral>TWOWHEELER</enumLiteral> </attributeInfo> </caseClassInfo> <caseClassInfo xmlns=""> <name>com.example.gddemo.Customer</name> <attributeInfo> <path>customerID</path> <type>ATTR_INTEGER</type> </attributeInfo> <attributeInfo> <path>name</path> <type>ATTR_TEXT</type> </attributeInfo> </caseClassInfo> <caseClassInfo xmlns=""> <name>com.example.gddemo.Vehicle</name> <attributeInfo> <path>vehicleID</path> <type>ATTR_TEXT</type> </attributeInfo> <attributeInfo> <path>vehicleType</path> <type>ATTR_ENUM</type> <enumLiteral>CAR</enumLiteral> <enumLiteral>TWOWHEELER</enumLiteral> </attributeInfo> </caseClassInfo> </GetCaseClassInfoResponse> </SOAP-ENV:Body>
-
Perform the search using
getCaseReferencesForDataView. The request identifies the dataview that contains the search query you want to use to search the case data.
The response lists the case references of the case data that matches the criteria specified in the search query.
// Step 2: Define the search query you want to use in the dataview <soapenv:Body> <api:CreateDataViewRequest> <viewSpecification> <caseClassDetails> <caseClass>com.example.gddemo.Car</caseClass> <majorVersion>2</majorVersion> </caseClassDetails> <name>Budget Cars</name> <description>Cars with budget features</description> <condition xsi:type="api:AttributeSearchCondition"> <attrPath>vehicleID</attrPath> <operator>EQ</operator> <value>%</value> </condition> </viewSpecification> </api:CreateDataViewRequest>
Copyright © Cloud Software Group, Inc. All rights reserved.