IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Integrating with Enterprise Content Management (ECM) systems > Outbound interactions with Enterprise Content Management systems > How documents are stored and viewed

Storing and viewing Enterprise Content Management documents

You can store and view documents on an ECM server by configuring a Document List view and, optionally, a Document Viewer view.

You must have an Enterprise Content Management (ECM) service with a search operation that provides a search result. This search result will be used with the Document List view to present a list of documents. Creating this service is shown in Building a query for an Enterprise Content Management search operation.

The search service created for the Document List view should comply with the interface described by the view itself. The Default ECM Search Service Ajax service 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 those used in the Default ECM Search Service Ajax service: maxItems, skipCount, searchAllVersions and cmisQuery.

A tip is provided in the What to do next section for quickly creating a search service.

If you have not created this service, however, you can create one at the time you configure your Document List view.

You should add the Content Management (SYSCM) toolkit to your dependencies, if you have not added it as you will need access to the ECM types.

You may optionally want to add the Coaches (SYSC) toolkit as it has additional user interface functions you may find helpful. To add these toolkit dependencies, select + beside TOOLKITS. In the Add dependency menu, select the Content Management and Coaches toolkit versions you require.

Adding a Document List view to a Coach makes it possible for you to store or view documents on an ECM server. To configure a Document List view, follow these steps:


Procedure

  1. Create a Human service. Beside User Interface, click +. Select Human Service. In the New Human Service dialog box that opens, enter an appropriate name and click Finish.

  2. Select a Coach from the palette and drag it onto the canvas. Enter an appropriate name for the Coach and save your work. Do not select the Heritage Coach, which is used primarily with process applications.
  3. Double-click the Coach you just created. The Coach editor opens. From the palette beneath Content, drag a Document List view onto the canvas. Do you want to also see your documents in the Coach? Then you should also drag a Document Viewer view to the canvas. If you do not see a Content section on the palette, select that section from the Filter drop-down list.

  4. You must connect the service with your Enterprise Content Management (ECM) search results with the Document List view. Select the Document List view and in the Properties section click Configuration. Beside the Search property click Select. From the menu beneath Ajax Service, select the ECM service that implements the search operation created previously.

  5. Select the other configuration options you want for your implementation of the Document List view.

    • Allow create: A user can add documents to the Enterprise Content Management system in the folder specified by the Parent folder path.

    • Allow update: A user can update the content of a document.
    • Open in new window: When a user clicks the View Document link, the document will open in a new window.
    • Number of results to show: Specifies the maximum number of documents from the search result that the user can see in the list at one time. The default is 10 documents per page if no value is specified.
    • Show all content: If deselected and the search result contains more documents than is specified in the Number of results to show option, the list of documents includes Back and Next buttons to allow the user to page through the list. If selected, the search result is limited to the value of the Number of results to show option and the user cannot page to see additional documents.
    • Parent folder path: You can specify the fully qualified path to the folder on the Enterprise Content Management system where new documents are created. This option is only applicable when Allow create is also selected. The fully qualified path should start with a slash (/), which signifies the root of the Enterprise Content Management system.
    • Query: You can create a CMIS query that overrides the previously defined Data Mapping CMIS query.

    The remaining services are used by the Document List view. They are preselected from the Content Management (SYSCM) toolkit.

    You can, however, create your own service by selecting New and then creating your own service.

    • Get all document versions: Gets all versions of every document retrieved.
    • Get document: Gets a specific document.
    • Get type definition: Gets the type properties of each document.
    • Get type descendents: Gets all descendants of the type definition.

  6. Set the data binding property for your Document List view if you are going to use a Document Viewer to display a document in the list. If you have a Document Viewer view to display the document, you will also need to set its data binding property to communicate with your Document List view.

    Click the Variables tab. Click Add Private. In the Name field enter a name like documentInfo. Beside Variable Type, click Select. From the Business Objects list, select ECMDocumentInfo. Select the check box beside Is List. Save your work.

    1. Select the Coaches tab. Select the Document List view on the canvas. Select the General tab from the Properties view. Beside Binding, click Select. From the menu select documentInfo (ECMDocumentInfo) (List). Save your work.

    2. If you also have a Document Viewer view to show the document, repeat the previous step after selecting the Document Viewer with this difference. Expand documentInfo (ECMDocumentInfo) (List) and select listSelected (ECMDocumentInfo). Save your work.
  7. Test your Document List view implementation by selecting the run service icon in the upper right section of the page.


What to do next

Updating any binding related to a Document List view through a script could be a common occurrence.

For example, the values for the inputs to your search service will likely change with time. If you run a script to update the binding you must change the previous value. In the following JavaScript, the columns are updated by appending text which 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 a quick way to create a search service:

  1. Copy the Default ECM Search Service to your process application. By copying the default service you will have the correct input and output variables and types.
  2. Rename the Default ECM Search Service to an appropriate name for yourself; for example, MySearch.

  3. Add a Content Integration step. 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.

How documents are stored and viewed


Related tasks:
Building a service that integrates with an Enterprise Content Management system
Building a query for an Enterprise Content Management search operation