Avg. Rating 5.0

Problem

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.

Detailed explanation

Usage from API

Please take a look at the API documentation for LiveCycle ES2. Java Docs available at  http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html?com/adobe/livecycle/connectorforibmcm/dsc/client/DocInfo.html

 

Usage from workbench:-

Follow these steps:-

  1. Drop the search operation and fill out all the necessary fields like LoginSettings and ItemTypeSettings.
  2. In the Results section, click on the green + sign to add a new variable.
  3. Variable dialog box opens up with list as selected type.
  4. Give a name, description to the variable.
  5. In the Sub-type section, select the last drop down option i.e. Find Type...

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?

  1. 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.

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?

  1. Select it and click ok and ok.
  2. Drop another operation " Set Value".
  3. 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.
  4. Select Location in the left hand side table for Location/Expression and click on New Variable button shown on right hand side.
  5. 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)
  6. 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)
  7. Now select the Expression field in the left hand side table.
  8. In the Expression:  textfield on right, add the following text /process_data/YourListVariable[1]. ( /process_data/searchResults[1] in our case.) 

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?

  1. Click on ok.
  2. Execute the process.  
  3. 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.

+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes