Building a service that integrates with an ECM system or the IBM BPM document store

Use a service to allow a business process developed in IBM® Process Designer to work with an Enterprise Content Management (ECM) system or the IBM BPM document store.

Before you begin

If you are working with an ECM system rather than the IBM BPM document store, you should have added your Enterprise Content Management (ECM) servers to your process application as shown in Adding an Enterprise Content Management server.

You should add the Content Management (SYSCM) toolkit to your dependencies, if it has not been added as you will need access to the ECM types. To add this toolkit dependency, select + beside TOOLKITS. In the Add dependency menu, select the Content Management toolkit version you require.

About this task

To build a service that integrates with an ECM system or the IBM BPM document store, follow these steps:

Procedure

  1. Select any service from the library area that supports Content Integration steps. The following services contain a Content Integration step.
    • Select Implementation in the library section and then +. From the menu, select Integration Service
    • Select User Interface and then +. From the menu, select Ajax Service.
    • Select User Interface and then +. From the menu, select Human Service.

    Enter a name for the service on the following dialog box and click Finish. The editor opens with the Diagram view in focus.

  2. From the palette, drag a Content Integration step to the canvas and provide a meaningful name for it.
  3. Click Implementation in the Properties view. Under Enterprise Content Management Server, <Use data mapping> is the default selection in the Server field. It means that in the Data Mapping tab section, the Server name input map is enabled and editable. You can pass a server name by using a variable in that field.

    Alternatively, you can select one of the following server types in the Server field.

    • IBM BPM document store
    • The name of an ECM server

    Information about the IBM BPM document store is found in the topic "The IBM BPM document store."

    If you want to select the name of an ECM server but no ECM servers are available for selection, you can add a server in the Process App Settings editor by selecting the Use the Process Application Settings editor to add a server link and then clicking the Servers tab. After adding the server, click Save and then switch to the service editor canvas again and select the server from the Server field. Information about adding an ECM server is found in the topic "Adding an Enterprise Content Management server."

  4. Under Content Operation, select an appropriate ECM operation. The following table displays the name of each ECM operation and indicates whether the operation is available for external ECM systems and the IBM BPM document store.
    Operation name Description Available for external ECM systems? Available for the IBM BPM document store?
    Add document to folder Adds a document to a folder. Yes No
    Cancel check-out document Releases a document from the check-out state, which makes it possible for other users to work with it. Yes Yes
    Check-in document Checks in a document, giving all users access to it. Yes Yes
    Check-out document Checks out a document; only the person who checked it out can use it. Yes Yes
    Copy document Copies a document. Yes No
    Create document Creates a document. Yes Yes
    Create folder Creates a folder. Yes No
    Delete document Deletes a document. Yes Yes
    Delete folder Deletes a folder. Yes No
    Get all document versions Gets all versions of a document. Yes Yes
    Get document Gets a document that matches a document identifier. Yes Yes
    Get document content Gets a stream of data that is the content of the document. Yes Yes
    Get documents in folder Gets all documents in a folder. Yes No
    Get folder Gets a folder that matches a folder identifier. Yes No
    Get folder by path Gets a folder as determined by a path to it. Yes No
    Get folder tree Gets a set of folders in an array. Yes No
    Get type definition Gets the type definition of a document or folder (including its properties). Yes Yes
    Get type descendants Gets the type definition descendants as determined by the depth level. Yes Yes
    Move document Moves a document from one folder to another. Yes No
    Move folder Moves a folder. Yes No
    Remove document from folder Removes a document from a folder. Yes No
    Search Retrieves a set of document or folder references according to a query. See "Building a query for an Enterprise Content Management search operation." Yes Yes
    Set document content Updates a document with content. Yes Yes
    Update document properties Updates the properties of a document. Yes Yes
  5. Click Data Mapping. In this section you can create the map between the variables for input and output. These variables need to be created. You can create them manually by yourself or use the auto-map function. The auto-map function creates private variables for the business objects, which are used by the service you create. Click the auto-map icon to create these private variables.

    Auto-map function

    The mapping structure for each operation is discussed in Data mapping in Enterprise Content Management operations.

  6. Save your work to update the process application with any changes to your service.

What to do next

As with any service, if you have errors at run time, use catching error events to handle errors thrown by a content integration step. A content integration step may raise an error with error code ECMError and error data of type ECMError. See Handling errors in services.