Configuring coach views for storing and viewing Enterprise Content Management documents

You can store and view documents on an ECM server from a client application, such as Process Portal, by configuring one of the documents coach views (Document Explorer or Document List view) and, optionally, a Document Viewer view.

Before you begin

The Enterprise Content Management (ECM) server where the documents are stored can be any of the following:
  • IBM® BPM document store
  • This topic applies only to the IBM Business Process Manager Advanced configuration.IBM BPM content store
  • An external ECM server
If you are using the IBM BPM content store, you can configure either the Document Explorer or the Document List view. If you are using IBM BPM or an external ECM server, you can configure the Document List view only.
Toolkit dependencies
Because you need access to ECM types, ensure that the Content Management (SYSCM) toolkit is added to the dependencies for the process application. For the Document Explorer view, ensure that you also add the Dashboards toolkit to the dependencies.
Custom search service (Document List view only)
You must have an ECM service with a search operation that provides a search result. This search result is used to present a list of documents in the Document List view. For information on how to create the ECM service, see Building a query for an Enterprise Content Management search operation.

The search service that you create must comply with the interface of the Document List view. The Default ECM Search Service Ajax service that is provided in the Content Management (SYSCM) toolkit shows an example of the expected input and output definition. The parameter names in your search service must be the same as the names used in the Default ECM Search Service Ajax service: maxItems, skipCount, searchAllVersions, and cmisQuery.

If you do not have a search service, you can create one when you configure the Document List view. The What to do next section describes how to create a simple search service.

About this task

Add one of the documents coach views to a coach to enable Process Portal users to store or view documents on an ECM server. All the following steps apply to both the Document Explorer view and the Document List, except when otherwise specified.

Procedure

  1. Create a Human service.
  2. Select a Coach from the palette and drag it onto the canvas. Enter an appropriate name for the coach and save your work.
    Tip: Do not select the Heritage Coach, which is used primarily with process applications.
  3. Open the new coach and from the palette beneath Content, drag one of the documents coach views onto the canvas. If you also want to view documents in the coach, drag a Document Viewer view onto the canvas.
    Tip: If you do not see a Content section on the palette, select that section from the Filter list.
  4. Document List view only. In the Document List view, configure the search service that targets your ECM server.
    1. Select the coach view and in the Properties section, click Configuration.
    2. Beside the Search property, click Select. From the menu beneath Ajax Service, select the ECM service that implements the search operation.
  5. Select the other configuration options that you want for your implementation of the documents coach view that you are using to list documents. For more information about the configuration properties, see Heritage Document Explorer control and Heritage Document List control.
  6. Create and set the data binding property for the documents coach view if you are using the Document Viewer view to display a document in the list. In addition, if you are using the Document Viewer view, you must set its data binding property to communicate with your documents coach view.
    1. Create the data binding property.
      1. On the Variables tab, click Add Private, and give the variable a name, for example, documentInfo.
      2. Beside Variable Type, click Select, and from the Business Objects list, select ECMDocumentInfo.
      3. Select Is List, and save your work.
    2. Set the data binding for the documents coach View.
      1. On the Coaches tab. Select the documents coach view on the canvas.
      2. On the General tab in the Properties view. Beside Binding, click Select > documentInfo (ECMDocumentInfo) (List), and save your work.
    3. Set the data binding for the Document Viewer view.
      1. On the Coaches tab. Select the documents coach view on the canvas.
      2. On the General tab in the Properties view. Beside Binding, click Select > documentInfo (ECMDocumentInfo) (List) > listSelected (ECMDocumentInfo), and save your work.
  7. Test the implementation of the documents coach view by clicking the Run service icon in the upper right section of the page.

    Run service

What to do next

You might want to update bindings in the documents coach view by using a script, for example, because the values for the inputs to your search service changed. If you run a script to update the binding, you must change the previous value. In the following JavaScript example, the columns are updated by appending text that changes the older values.

tw.local.cmisQueryString = "SELECT cmis:name, cmis:objectId ";
if (tw.local.photoCatagory) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoCatagory";
if (tw.local.photoSubject) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoSubject";
if (tw.local.photoLocation) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoLocation";
if (tw.local.photoDate) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoDate";
tw.local.cmisQueryString = tw.local.cmisQueryString + " FROM acpPhoto";

tw.local.testCoachRefresh = tw.local.testCoachRefresh + "XYZ ";

The following steps show how to create a search service for the Document List view.

  1. To ensure that you have the correct input and output variables and types, copy the Default ECM Search Service to your process application.
  2. Rename the Default ECM Search Service to an appropriate name, for example, MySearch.
  3. Complete one of the following steps:
    • If you configured the Document List view for the IBM BPM document store, configure the search operation that is defined in the existing IBM BPM documents Content Integration step.
    • If you configured the Document List view for an external ECM server, then add a Content Integration step to the ECM documents path and configure the search operation with an Enterprise Content Management server.
  4. Use the auto-map function to create the map between the input and output service parameters and the variables.