IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Integrating with Enterprise Content Management (ECM) systems > Inbound events from Enterprise Content Management systems > Performing modeling tasks for inbound events

Subscribing to document and folder events: the end-to-end approach

To detect and respond to document and folder events that are produced when content changes occur on an Enterprise Content Management (ECM) server, you need to create several components in Process Designer. Using the end-to-end approach described in this topic, you will find that creating the required components is more automated and less complex than creating them one at a time on a stand-alone basis.

In the end-to-end approach, you perform the following activities in Process Designer (in the order in which they are listed):

To perform these activities, complete the following procedure:


Procedure

  1. Create an event subscription by completing the following steps:

    1. Open a process application in Process Designer.

    2. In the library area of the Designer page, click the plus (+) icon beside Implementation and then select Event Subscription. The New Event Subscription wizard opens.

    3. In the Name field, specify a name for the new event subscription.

    4. Click Finish. The new event subscription is displayed in the Implementation library list (under Event Subscription) and the event subscription opens in the Event Subscription editor.

    5. In the ECM Server drop-down list, select the name of the ECM server that you want to associate with the event subscription.

      If there is no server listed in the drop-down list, 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 event subscription editor again and select the server from the drop-down list. Information about adding an ECM server is found in the topic Adding an Enterprise Content Management server.

    6. In the Event Class drop-down list, accept the default Document event class for your ECM server or select the Folder event class.

    7. In the Object Type drop-down list, accept the top-level default Document object type for your ECM server or select a different object type. (If the drop-down list is disabled, the server is probably unavailable.)

    8. If you want to include all of the subtypes of the selected object type, ensure that the Include Subtypes check box is selected.

    9. In the Event Type drop-down list, accept the default Created event type for your ECM server or select a different event type. (If the drop-down list is disabled, the server is probably unavailable.) Information about the available event types is found in the topic Content event types.
    10. By default, event subscriptions are exposed to all users. This means that when any user performs an action that corresponds to the event type that is specified in the Event Type drop-down list (such as creating a document), a document or folder event will be fired. If you only want events to be fired for designated users who are named in an existing participant group, click Select in the Exposing area and then choose the name of the participant group. Alternatively, you can create a new participant group for designated users by completing the following steps:

      1. In the Exposing area, click New. The New Participant Group wizard opens.

      2. In the Name field, type a name for the new participant group.

      3. Click Finish. The Participant Group page opens.

      4. In the Participant Group page, define the participant group by following the instructions in the topic Create a participant group.

    11. Click Save.

  2. Add an attached service and a Content UCA by completing the following steps:

    1. In the Attached Service area, click New. The New Service for Event Subscriptions wizard opens.

    2. In the Name field, accept the default name (which is the same as the event subscription name) or type a different name for your new service.

    3. If you want to create a general system service that will directly invoke the Content UCA without first querying the ECM server for additional information, select Create a service that directly invokes a UCA. However, if you want to create an integration service that will first query the ECM server for additional information before determining whether a UCA should be invoked, select Create a service that queries the ECM server before invoking a Content UCA.

    4. Click Finish. The new service and a new content UCA of the same name are automatically created. The new service opens in the service editor.

      If you chose to create a general system service, it is already fully implemented and consists of a Start event, an End event, and an Invoke UCA step that will invoke the new Content UCA. However, if you chose to create an integration service, it is partially implemented and it consists of several components, such as an Integration step, a decision gateway step, and an Invoke UCA step to invoke the Content UCA. The following figure shows an integration service as it might appear after it has been fully implemented:

      For both a general system service and an integration service, the signature of both the service and the Content UCA includes an Input named contentEvent with a business object type of ECMContentEvent.

    5. If you chose to create an integration service, select the decision gateway in the canvas and open the Properties tab and the Implementation pane, then define the decision conditions for the decision gateway. Other than perhaps renaming the labels of the components, this is all that is required to complete the implementation of the integration service.

    6. Click Save.

  3. Add a content event to a BPD by completing the following steps:

    1. In the library area of the Designer page, click the plus (+) icon beside Processes and then select Business Process Definition. The New Business Process Definition wizard opens.

    2. In the Name field, specify a name for the new BPD.

    3. Click Finish. The new BPD is displayed in the Process library list (under Business Process Definitions) and the BPD opens in the BPD editor.

    4. In the canvas, select the existing Start event or select the Start Event or Intermediate Event icon in the palette and drag the event to the canvas.

    5. Click the Properties tab and then click Implementation. The Implementation panel opens.

    6. In the Start Event Details or Intermediate Event Details section, change None to Content. The event in the diagram changes to display a Content marker icon.
    7. Beside the Attached Content UCA area in the Content Trigger section, click Select and then select the Content UCA that was automatically created when you created the attached service. It has the same name as the service. (Additional information about creating a Content UCA is found in the topic Create an undercover agent for a content event.)

    8. In the canvas, ensure that the Content event is selected, then click the Properties tab and click Data Mapping. The Data Mapping panel opens.

    9. Click the variable selector icon on the right side of each field to map each undercover agent output variable to a local variable in the BPD.

    10. If you are working with an intermediate event, select the variable that you want to use to correlate the event with the BPD instance. The variable selected for correlation is identified by an assignment symbol. This correlation ensures that the parameter values of the runtime message are passed to the correct BPD instance. (IBM BPM only requires one variable mapping to correlate the event.)

    11. Click Save.
  4. Test the new components by completing the following steps:

    1. Switch to your event subscription in the event subscription editor.

    2. Click Save.

    3. Click Test Subscription. Test Event Subscription opens, which contains fields that are populated with the selections made in the Event Subscription editor. The selections represent the data that will be returned from the ECM server.

    4. In the Object field, accept the default object or select a different object on the ECM server.

    5. Click Test. If the event subscription is defined correctly, a simulated incoming ECM event is triggered and the following message is displayed:

      An inbound ECM event has been successfully simulated for the event subscription.

      The attached service, content UCA, and Start or Intermediate event are subsequently invoked, which leads to either a response from an existing BPD instance or the creation of a new BPD instance. You can view BPD instances in the Inspector view of Process Designer.

Performing modeling tasks for inbound events