Connector for IBM CM provides a search operation which would search your IBM CM repository for a property value and return back the results in a List format. The problem is how to properly interpret the list returned by the operation?
Solution
The list search operation returns an object of type List<DocInfo>. For details on what DocInfo contains one can take a look at the API documentation available at adobe site. In short a DocInfo object contains all the major information required like content (in case of a document), objectType, pid, version, parentFolder indication, and other attributeNameValuePairs.
Drop the search operation and fill out all the necessary fields like LoginSettings and ItemTypeSettings.
In the Results section, click on the green + sign to add a new variable.
Variable dialog box opens up with
list as selected type.
Give a name, description to the variable.
In the Sub-type section, select the last drop down option i.e.
Find Type...
Search Data Type dialog opens up. Type DocInfo in the search box and click on search button. You should see com.adobe.livecycle.connectorforibmcm.dsc.client.DocInfo in the list.
Select it and click ok and ok.
Drop another operation "
Set Value".
In the
properties window for
Set Value operation, go to the mapping section and add an entry to it by clicking the Edit button.
XPath Builder Dialog would appear.
Select Location in the left hand side table for Location/Expression and click on
New Variable button shown on right hand side.
Variable window opens up. Give your variable a name and description. As done in step 6, repeat the same steps, this time for
Type dropdown instead of
SubType dropdown. (In our case its name is docInfo)
Once the variable is created it would appear in the
Process Data tab. Double click on the variable to select it. (While double clicking make sure your cursor still refers to the Location field being displayed in the left hand side table)
Now select the Expression field in the left hand side table.
In the
Expression: textfield on right, add the following text
/process_data/YourListVariable[1]. (
/process_data/searchResults[1] in our case.)
Click on ok.
Execute the process.
You should now get the Search operation result list in
YourListVariable(
searchResults in our case) and first object in
YourDocInfoVariable (docInfo in our case
). Using steps similar to 8-14 you can further extract values like content, pid, version etc from each DocInfo object. An example process which extracts document's PID has been attached to this post as well. In the above snapshot documentID refers to the same variable.