IBM Support

Revisiting the ICM Content List Page Widget

Technical Blog Post


Abstract

Revisiting the ICM Content List Page Widget

Body

The Content List page widget that is included with IBM Case Manager 5.2 doesn't get the spotlight as often as its more case specific peers. It provides a way to get a list of documents, with the full set of content actions, onto a case solution page. The documents it displays can be derived on the fly, in context with the case being worked, but without them actually being filed in the case itself.

Use cases include:

  • Related incidents
  • All documents for a specific cutomer
  • Policy and procedures for this case type
  • Document templates based on case state

 

image

 

You can either associate a predefined search with the Content List, passing in search parameters from case properties, or set the documents and meta-data columns manually via scripting.

This example shows how to have a document search display results in the Content List widget that are based on case properties.

  • Create a Document Type in your solution that uses one of your case properties as a doc prop to search on
  • Deploy your solution so that the new document class is created in your target object store
  • Add a new document to your target object store using your new type and with some value in the case/doc property
  • Using Content Navigator, create a new search that looks for all documents of you new type where your case/doc property equals some value
  • Save the search, View Link on the new search and copy the vsid GUID from URL (don't include the %7B at the beginning or the %7D at the end)
  • Add a Script Adapter to the Case Details page - rename it Populate Content List
  • Add a Content List widget to same page
  • In the Content List widget settings, set the method to Stored Search, set the Version to Current, and paste in the vsid GUID you copied earlier
  • Wire the Page Container's Send Case Information event to the Script Adapter's inbound event
  • Wire the Script Adapter's outbound event to the Content List's Search With Values event
  • Enter the following script into the Script Adapter, replacing the property name with the one you added to your Document Type
  var theCase= payload.caseEditable.caseObject;  var propID = this.solution.prefix +"_ContactName";  var propValue = theCase.attributes[propID];  var searchValues= [{      name: propID,      value: propValue  }];  console.log("Search for: ",searchValues);  return searchValues;

Take special note of this line:

  var propValue = theCase.attributes[propID];

Turns out the InfoCenter documentation for the Case Object is missing this most important member. It should also be noted that while this approach to accessing the case properties works great on the initial load of the page, you should use the property controllers after that to ensure you are getting the latest, potentially edited version of the data.

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

UID

ibm11281130