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.
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:
- 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
- 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
fncmisfor FileNetP8 and
alfresco/cmisfor Alfresco). Complete the rest of the fields, including the repository name (defined by the ECM system) and authentication options.
Figure 2. 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.
- 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.
- 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
- Select the 8.0 snapshot under Content Management, as
shown in Figure 4.
Figure 4. 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:
- 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
Figure 5. Copy a sample Ajax service
Rename the Ajax service
- Click on the User Interface section in your process App library.
- Right-click Default ECM Search Service and select
Rename, as shown in Figure 6.
Figure 6. Rename the Ajax service
- Specify a name for your newly copied Ajax service. In this example,
My ECM Search Service.
Customizing the 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
- Open the ECM Search service you previously copied, as shown in Figure
Figure 7. Open the AJAX service
- Add the Content Integration component to the service by doing the
- Delete the line between the Start and End events
- Place a Content Integration component between them, as shown
in Figure 8, and rename it to something meaningful. In this
example, we called it
Figure 8. Add the Content Integration component
- Connect the component to the Start and End events, as shown in Figure
Figure 9. Connect the elements in the Ajax service
Configure the Content Integration component
Configure the Content Integration component as follows:
- Click on the Content Integration component you just added to the Ajax service.
- 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.
- Select Search as the Operation name.
Figure 10. Configure the Content Integration component
- 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
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.
- Click the Content Filters tab of the ECM Search service, as
shown in Figure 12.
Figure 12. Content Filters
- 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
- 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
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.
- 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. 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.cmisQueryvariable 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
- Create a new human service.
- Add a new coach to the service, as shown in Figure 16, and
Figure 16. Coach on a human service
- 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
- 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.
10for the number of results to show.
- For the Search option, select the ECM Search service you created previously.
Figure 18. 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:
- Create a new variable to store the document list returned by the
search, as shown in Figure 19:
- Click on the Variables tab of the human service.
- Create a new private variable named
- Check Is List.
- Check Has Default.
Figure 19. Add variables in the human service
- Set the binding for the Document List control as follows:
- Go to the Coaches tab in the editor.
- Click the Document List control.
- Click the General section of the Properties tab.
- 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
- Set the binding for the Document Viewer control as follows:
- Go to the Coaches tab in the editor.
- Click the Document Viewer 1 control.
- Select the binding for the Document Viewer control.
- Click the Document Viewer control on the coach, then click the General section of the Properties tab.
- 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
Testing the coach with ECM content integration
To test the coach, do the following:
- Click the Playback button on the right, as shown in Figure 22.
Figure 22. Run the coach
- 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
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.
- IBM Business Process Manager V8.0 Information Center
- IBM BPM Community Wiki
- IBM Business Process Management product informatione
- developerWorks BPM zone: Get the latest technical resources on IBM BPM solutions, including downloads, demos, articles, tutorials, events, webcasts, and more.
- IBM BPM Journal: Get the latest articles and columns on BPM solutions in this quarterly journal, also available in both Kindle and PDF versions.