Integrating IBM Business Process Manager V8 with an Enterprise Content Management system

This article describes how to develop an application in IBM® Business Process Manager V8 that handles documents stored in an Enterprise Content Management (ECM) system. It describes the steps to configure the connection to the ECM system and how to develop the user interface elements to present the content to end-users in a business process. This content is part of the IBM Business Process Management Journal.

Ricardo Ramos (rramos@pe.ibm.com), Client Technical Professional, IBM

Ricardo Ramos photoRicardo Ramos is a Client Technical Professional with the IBM Software Group organization. He has over 12 years of experience with a broad variety of products in the IBM WebSphere software portfolio including the application infrastructure, connectivity and BPM areas. Currently he provides pre-sales technical support in the Latin America region.



12 December 2012

Also available in Chinese

Introduction

Business processes often require handling of non-structured data such as scanned documents or pictures. IBM Business Process Manager V8 (hereafter IBM BPM) provides the capability to seamlessly integrate with Enterprise Content Management (ECM) systems, which specialize in handling such types of data.

IBM BPM uses the Content Management Interoperability Services (CMIS) standard to connect to ECM systems. In this article we'll show you how to configure the connection from IBM BPM to an ECM system. Then we'll then build a human service that includes document listing and viewing capabilities within a Coach.

Prerequisites

To complete the steps in this article, you'll need a running IBM BPM development environment with an existing Process App already created and opened in Process Designer.

You also need to have an ECM system up and running that exposes web services compliant with the CMIS 1.0 specification. Examples of such ECM servers are IBM FileNet P8, IBM Content Manager and Alfresco. Note that for IBM FileNet P8, although CMIS is included with the product, it is a separate and optional install. For the purpose of this article, we used an instance of IBM FileNet P8.


Creating the ECM server definition

First you have to define the connection to your ECM server in your Process App, so that you can use it in services and coaches. To add the server definition to the Process App Settings, do the following:

  1. In Process Designer, go to the Process App Settings and click the Servers tab as shown in Figure 1.
    Figure 1. Select the Servers tab in Process App Settings
    Servers tab in Process App Settings
  2. Fill out the server configuration options as shown in Figure 2. Select Enterprise Content Management Server as the server type. Then specify your CMIS server's hostname, HTTP port and the context root of the web application that hosts the CMIS web services. (Examples of default context roots are fncmis for FileNetP8 and alfresco/cmis for Alfresco). Complete the rest of the fields, including the repository name (defined by the ECM system) and authentication options.
    Figure 2. ECM server definition
    ECM server definition

    The Always Use This Connection Information option tells IBM BPM to use that userid and password for every connection to the ECM server. This means that a generic user is used for every ECM interaction and the end-user identity is not passed from IBM BPM to the ECM server.

    If you want to use the user's identity for ECM interactions in BPM, you must deselect the checkbox. However, keep in mind that if you do this, you will need to configure a single sing-on mechanism between IBM BPM and the ECM application servers, which is not covered in this article.

  3. Click Test Connection to verify that the ECM connection is configured properly. If you receive an error message, you should further investigate by checking the IBM BPM SystemOut.log file.

Working with the Content Management Toolkit

IBM BPM includes a toolkit that provides several ECM assets, such as pre-built assets for ECM access.

Add the ECM toolkit to your Process App

You need to add the toolkit to your process application to be able to use the required components in your process.

  1. Click on the plus (+) sign next to the Toolkits section in the Process Designer library, as shown in Figure 3.
    Figure 3. Add the toolkit dependency
    Add the toolkit dependency
  2. Select the 8.0 snapshot under Content Management, as shown in Figure 4.
    Figure 4. Select 8.0 toolkit
    Select 8.0 toolkit

Copy the sample AJAX search service into your Process App

IBM BPM uses Ajax services for ECM server interactions. Some basic services are included for operations like searching for documents and their metadata. These services can be used by the ECM coach controls, which enables you to list and view documents on the ECM server.

Instead of starting from scratch, you can make a copy of the base search service provided with the toolkit by doing the following:

  1. Copy the Default ECM Search Service from the Content Management toolkit into your Process App by clicking User Interface on the Content Management toolkit, then right-clicking Default ECM Search Service, as shown in Figure 5.
    Figure 5. Copy a sample Ajax service
    Copy a sample Ajax service

Rename the Ajax service

  1. Click on the User Interface section in your process App library.
  2. Right-click Default ECM Search Service and select Rename, as shown in Figure 6.
    Figure 6. Rename the Ajax service
    Rename the Ajax service
  3. Specify a name for your newly copied Ajax service. In this example, we'll use My ECM Search Service.

The Ajax service you just copied and renamed is just a template that contains the required input and output variables for ECM integration. It does not, however, provide any specific actions. You now need to customize it so it performs the required actions which, in this case, is performing a search on the ECM server for documents to be listed in a coach.

Define the Ajax service flow diagram

  1. Open the ECM Search service you previously copied, as shown in Figure 7.
    Figure 7. Open the AJAX service
    Open the AJAX service
  2. Add the Content Integration component to the service by doing the following:
    1. Delete the line between the Start and End events
    2. Place a Content Integration component between them, as shown in Figure 8, and rename it to something meaningful. In this example, we called it Get Documents.
    Figure 8. Add the Content Integration component
    Add the Content Integration component
  3. Connect the component to the Start and End events, as shown in Figure 9.
    Figure 9. Connect the elements in the Ajax service
    Connect the elements in the Ajax service

Configure the Content Integration component

Configure the Content Integration component as follows:

  1. Click on the Content Integration component you just added to the Ajax service.
  2. In the Implementation section of the Properties tab, set the Server Name to the name you specified while creating the connection in the Process App Settings.
  3. Select Search as the Operation name.
    Figure 10. Configure the Content Integration component
    Configure the Content Integration component
  4. In the Data Mapping section of the Properties tab, map each input and output variable to the corresponding private variables, as shown in Figure 11.
    Figure 11. Perform data mapping
    Perform data mapping

Define the content filters

Now you need to define which documents are to be selected from the ECM server for a particular process instance and ECM integration service implementation. In IBM BPM, you can specify the selection criteria visually. Under the covers, Process Designer generates the appropriate CMIS SELECT query with the required clauses and parameters.

  1. Click the Content Filters tab of the ECM Search service, as shown in Figure 12.
    Figure 12. Content Filters
    Content Filters
  2. Under Object Type, you can select any document class managed by your ECM system, as shown in Figure 13. Different document classes have different attributes that can be used in queries. In this example, we'll use the root Document class from our ECM server.
    Figure 13. Specify a document class
    Specify a document class
  3. If you want, you can add more document properties columns to be displayed in the document list by clicking the Add button, as shown in Figure 14.
    Figure 14. Add document class properties
    Add document class properties
    We won't be adding more columns in this example, so you don't need click Add and your screen will not be exactly as shown.
  4. If you wanted, you could also define the selection criteria that will be used at runtime to filter the documents to be listed, as shown in Figure 15.
    Figure 15. Specify document search criteria
    Specify document search criteria

    The search condition can be built by matching any of the document's properties to a string value. The tw.local.cmisQuery variable is available as one of the Ajax service's input parameters and should be used to pass a string value from the coach.

    As in the previous step, we won't be doing this in our example, so you don't need to click Add Search Criterion and your screen will not be exactly as shown.


Building the coaches with ECM content

You've just finished creating the service that will search for documents in the ECM server. Now you'll build coaches that will list and show the documents to the end user of the process.

Create the human service and coach

  1. Create a new human service.
  2. Add a new coach to the service, as shown in Figure 16, and double-click it.
    Figure 16. Coach on a human service
    Coach on a human service
  3. Drag and drop the Document List and Document Viewer controls to the coach, as shown in Figure 17. These are located in the Content section of the palette.
    Figure 17. Build the coach
    Build the coach
  4. Click the Document List 1 control, then click the Configuration section of the properties and fill out the fields as shown in Figure 18:
    • Check Allow Create and Allow Update.
    • Specify 10 for the number of results to show.
    • For the Search option, select the ECM Search service you created previously.
    Figure 18. Document List Control Configuration.
    Document List Control Configuration.

Configure the variable bindings on the ECM controls

To configure the variable bindings on the ECM controls, complete the following steps:

  1. Create a new variable to store the document list returned by the search, as shown in Figure 19:
    1. Click on the Variables tab of the human service.
    2. Create a new private variable named documentInfoList of type ECMDocumentInfo.
    3. Check Is List.
    4. Check Has Default.
    Figure 19. Add variables in the human service
    Add variables in the human service
  2. Set the binding for the Document List control as follows:
    1. Go to the Coaches tab in the editor.
    2. Click the Document List control.
    3. Click the General section of the Properties tab.
    4. In the Binding property, select the documentInfoList you previously created, as shown in Figure 20.
    Figure 20. Specify the binding for the Document List control
    Specify the binding for the Document List control
  3. Set the binding for the Document Viewer control as follows:
    1. Go to the Coaches tab in the editor.
    2. Click the Document Viewer 1 control.
    3. Select the binding for the Document Viewer control.
    4. Click the Document Viewer control on the coach, then click the General section of the Properties tab.
    5. In the Binding property, select the listSelected (ECMDocumentInfo) field of the DocumentInfoList variable you previously created, as shown in Figure 21:
    Figure 21. Specify the binding for the Document Viewer control
    Specify the binding for the Document Viewer control

Testing the coach with ECM content integration

To test the coach, do the following:

  1. Click the Playback button on the right, as shown in Figure 22.
    Figure 22. Run the coach
    Run the coach
  2. The coach opens in a new browser window and displays a list of documents stored in your ECM, as shown in Figure 23. You can use the Actions icons to view the content or metadata. You can also use the Create Document button to upload new documents.
    Figure 23. Coach execution
    Coach execution

Conclusion

This article described the process of building a coach with content stored in an Enterprise Content Management system. Although the article focused on the basic steps to list generic content, you can configure different document classes and metadata to work with specific types of content.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, WebSphere
ArticleID=851002
ArticleTitle=Integrating IBM Business Process Manager V8 with an Enterprise Content Management system
publish-date=12122012