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.
About this task
In the end-to-end approach, you perform the following activities
in Process Designer (in the order in which they are listed):
- Create an event subscription
- Add an attached service and a Content undercover agent (UCA)
- Add a content event to a business process definition (BPD)
- Test the new components
To perform these activities, complete the following procedure:
Procedure
- Create an event subscription by completing the following
steps:
- Open a process application in Process Designer.
- 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.
- In the Name field, specify a
name for the new event subscription.
- 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.
- 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.
- In the Event Class drop-down
list, accept the default Document event class
for your ECM server or select the Folder event
class.
- 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.)
- If you want to include all of the subtypes of the selected
object type, ensure that the Include Subtypes check
box is selected.
- 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.
- 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:
- In the Exposing area, click New.
The New Participant Group wizard opens.
- In the Name field, type a name for the
new participant group.
- Click Finish. The Participant Group page
opens.
- In the Participant Group page, define the participant group by
following the instructions in the topic Creating a participant group.
- Click Save.
- Add an attached service and a Content UCA by completing
the following steps:
- In the Attached Service area,
click New. The New Service for Event Subscriptions
wizard opens.
- 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.
- 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.
- 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.
- 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.
- Click Save.
- Add a content event to a BPD by completing the following
steps:
- 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.
- In the Name field, specify a
name for the new BPD.
- Click Finish. The new BPD is
displayed in the Process library list (under Business Process
Definitions) and the BPD opens in the BPD editor.
- 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.
- Click the Properties tab and
then click Implementation. The Implementation
panel opens.
- 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.
- 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 Creating and configuring
an undercover agent for a content event.)
- In the canvas, ensure that the Content event is selected,
then click the Properties tab and click Data
Mapping. The Data Mapping panel opens.
- 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.
- 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® Business Process Manager only requires one variable mapping
to correlate the event.)
- Click Save.
- Test the new components by completing the following steps:
- Switch to your event subscription in the event subscription
editor.
- Click Save.
- Click Test Subscription. Test
Event Subscription opens, which contains fields that are
populated with the selections that you made in the Event Subscription
editor. The selections represent the data that will be returned from
the ECM server.
- In the Object field, accept the
default object or select a different object on the ECM server.
- 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.