What is the Oracle Enterprise Repository Event Manager? Configuring the Subscription Manager

Configuring Oracle Enterprise Repository Workflow 9-29 Figure 9–24 Oracle Enterprise Repository Asset Editor - Audit Log

9.3 Configuring the Oracle Enterprise Repository Event Manager

This section discusses the Event Manager configuration that needs to be completed before using the Automated Workflows. This section contains the following topics: ■ Section 9.3.1, What is the Oracle Enterprise Repository Event Manager? ■ Section 9.3.2, Configuring the Event Manager’s System Settings ■ Section 9.3.3, Configuring the Subscription Manager ■ Section 9.3.4, Configuring Logging of Event Manager Events 9.3.1 What is the Oracle Enterprise Repository Event Manager? The Event Manager is a component embedded within Oracle Enterprise Repository that manages event subscriptions, event persistence, event filtering, and event delivery. Web Service endpoints can subscribe to the Event Manager’s Subscription Manager and the asset registration events that are generated within Oracle Enterprise Repository are delivered to the Web Service endpoints. Figure 9–25 shows the different components that are involved. Figure 9–25 Automated Workflow Components The Event Manager uses an embedded version of Apache ActiveMQ JMS Server that is enabled by default. The embedded JMS server is configured to run out-of-the-box without any additional configuration. However, you can also configure the Event Manager to use an external JMS server, such as WebLogic Server or IBM WebSphere. This section discusses the Event Manager configuration that needs to be completed before using the Automated Workflows. 9-30 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository For information on configuring the Automated Workflows, see Section 9.3, Configuring the Oracle Enterprise Repository Event Manager .

9.3.2 Configuring the Event Manager’s System Settings

Oracle Enterprise Repository’s System Settings section allows administrators to configure the basic Oracle Enterprise Repository operation and to enabledisable specific features. The Event Manager-related settings are under the Eventing group under the main External Integrations category. For more information about System Settings, see Chapter 16, System Settings Overview . Additional Eventing properties are available for configuring an external JMS server, such as WebLogic Server and IBM WebSphere, and are described in Section 9.6, Configuring JMS Servers for Oracle Enterprise Repository .

9.3.2.1 Enabling the Event Manager

The Event Manager needs to be enabled in Oracle Enterprise Repository to allow the Event Manager to send events to external Web Service endpoints.

1. Click System Settings in the sidebar on the Oracle Enterprise Repository Admin

screen. 2. Enter Event in the System Settings Search box to view all the Event Manager related settings.

3. Click True next to the Enable Event Manager property,

cmee.eventframework.enabled.

4. Click Save.

5. Restart Oracle Enterprise Repository for the configuration changes to take effect.

9.3.2.2 Configuring Optional Event Manager Settings

There are some optional Eventing properties that you can use to tune the Event Manager performance. This section contains the following topics: ■ Section 9.3.2.2.1, Eventing Manager Notifier Thread Sleep seconds ■ Section 9.3.2.2.2, Eventing Manager Store Thread Sleep seconds ■ Section 9.3.2.2.3, Eventing Manager Store Delivery Sleep seconds ■ Section 9.3.2.2.4, Batch Size for Event Manager Deliveries

9.3.2.2.1 Eventing Manager Notifier Thread Sleep seconds If an endpoint is unavailable

when one or more events should be delivered to that endpoint, the Event Manager notifier will retry delivering the event until the endpoint is available. The cmee.eventframework.notifier.sleep property configures in seconds how long the notifier should wait before trying to redeliver an event. Note: You must restart Oracle Enterprise Repository after changing any Eventing property in order for the changes to take effect. Configuring Oracle Enterprise Repository Workflow 9-31

9.3.2.2.2 Eventing Manager Store Thread Sleep seconds As soon as an event is triggered,

the Event Manager stores the event in memory before pushing it to the JMS server so that the Oracle Enterprise Repository thread is not blocked. The cmee.eventframework.store.sleep property specifies in seconds how long the Event Managers Store Manager thread should sleep before polling for the next available batch of events stored in memory. The default polling delay is 16 seconds.

9.3.2.2.3 Eventing Manager Store Delivery Sleep seconds By default, the Event Manager

delivers events in batches. The cmee.eventframework.delivery.sleep property specifies in seconds how long the Event Managers Delivery Manager thread should sleep before selecting the next available event from the JMS server.The default delay between each batch is 13.

9.3.2.2.4 Batch Size for Event Manager Deliveries When the Event Manager delivers

events in batches, the delivered batch size can be configured using the cmee.eventframework.delivery.batch.size property. The default batch size is 100 events. If the Event Manager finds less number of events to deliver, it will deliver the available events and then sleep for the time configured in the cmee.eventframework.delivery.sleep property.

9.3.3 Configuring the Subscription Manager

The Subscription Manager is responsible for managing the event subscriptions by the Web Service endpoints where the matched events are delivered. The Subscription Manager configuration file is located in oer webapp name\WEB-INF\classes\EndPointEventSubscription.xml.

9.3.3.1 Configuring Web Service Endpoints

The Event Manager uses the EndPointEventSubscription.xml file to load information about the Web Service endpoints where events need to be delivered. The host, port, URI, user, and password of the predefined ALPBM endpoint, or user-defined Web Service endpoint, need to be configured, as shown in this example snippet: sub:EventSubscriptionData xmlns:sub=http:www.bea.cominfraeventssubscription xmlns:xsi=http:www.w3.org2001XMLSchema-instance sub:eventSubscription --The name should be unique within this file since this name is passed as the Durable subscriber name to the JMS Server-- sub:endPoint name=ALBPMEndpoint --The host of the Webservice Endpoint -- sub:hostlocalhostsub:host --The port of the Webservice Endpoint -- sub:port9000sub:port --The URI of the Webservice Endpoint -- --If you are using ALBPM5.7 uncomment the following line and comment the line Tip: The default cmee.eventframework.store.sleep and cmee.eventframework.delivery.sleep property values can be tuned to control the overall performance of Oracle Enterprise Repository and the Web Service endpoints. These properties directly impact the number of events that get triggered per second by the Event Manager. For example, if a faster response is required for testing purposes, the default cmee.eventframework.delivery.sleep value of 13 seconds should be changed to a reasonable testing amount, if needed. 9-32 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository after -- -- sub:urifuegoServiceswsStatusChangeEndpointServiceListenersub:uri -- sub:urialbpmServicesaler_ enginewsStatusChangeEndpointServiceListenersub:uri --Unless a custom WSDL Contract is used, the namepsace should not be changed -- sub:targetNamespacehttp:www.bea.cominfraeventssub:targetNamespace --The Webservice operation that is invoked. Please refer to the WSDL in WEB-INF\lib\eventNotifier.jar for all the available operations-- -Unless a Custom Webservice is implemented, the operation should not be changed if its ALBPM -- sub:operationNamenewEventsub:operationName --Protocol for the Webservice Endpoint. -- sub:protocolHTTPsub:protocol --The user and password to authenticate the ALBPM Webservice. -- sub:authenticationData sub:basicAuthentication sub:usernameoer_workflow_usersub:username sub:passwordsub:password sub:basicAuthentication sub:authenticationData sub:endPoint --The Java class that serializes the Event Data. Unless a custom class is written, this value should not be changed.-- sub:notifierClasscom.bea.infra.event.notifier.plugin.http.DefaultHTTPEventNotifi ersub:notifierClass --This expression filters the Event data and only the matched events are delivered to the Endpoint. The dafault is all the events are delivered. -- --Example:- asset_id BETWEEN 50000 AND 50100 -- sub:expressionsub:expression sub:eventSubscription sub:EventSubscriptionData As many endpoints can be added as desired and the endpoints can be located in different hosts or ports and the events can be load balanced. The pre-defined Advanced Registration Flow has just one endpoint called StatusChangeEndpoint.

9.3.3.2 Setting the Expression to Filter Events

Events can be filtered based on the value entered in the expression element. This section contains the following topics: ■ Section 9.3.3.2.1, Delivering all Events to an Endpoint ■ Section 9.3.3.2.2, Delivering Events to an Endpoint Filtered by Event Type ■ Section 9.3.3.2.3, Delivering Events to an Endpoint Filtered Using a JMS Message Selector ■ Section 9.3.3.2.4, JMS Message Selector Examples

9.3.3.2.1 Delivering all Events to an Endpoint The default setting is to deliver all events to

an endpoint. All the events that are triggered within Oracle Enterprise Repository are delivered to the OOTB endpoint when the expression element is empty. sub:expressionsub:expression

9.3.3.2.2 Delivering Events to an Endpoint Filtered by Event Type The following XML

snippet shows how to deliver an event of type AssetSubmission to an endpoint: sub:expression eventdata_name =’urn:com:bea.oer:events:type:AssetSubmission’sub:expression Configuring Oracle Enterprise Repository Workflow 9-33 You can also use the OR operator to filter more than one event type: eventdata_name =’urn:com:bea.oer:events:type:AssetSubmission’ OR eventdata_name =’urn:com:bea.oer:events:type:AssetAccepted’ These are the event types that are supported: ■ urn:com:bea:oer:events:type:AssetSubmission ■ urn:com:bea:oer:events:type:AssetAccepted ■ urn:com:bea:oer:events:type:AssetTabApproved ■ urn:com:bea:oer:events:type:AssetAllTabApproved ■ urn:com:bea:oer:events:type:AssetRegister ■ urn:com:bea:oer:events:type:PolicyAssertionChanged ■ urn:com:bea:oer:events:type:MetaDataChange:name ■ urn:com:bea:oer:events:type:AssetUnSubmission ■ urn:com:bea:oer:events:type:AssetUnAccept ■ urn:com:bea:oer:events:type:AssetUnregister ■ urn:com:bea:oer:events:type:AssetStatusChanged ■ urn:com:bea:oer:events:type:MetaDataChange:version ■ urn:com:bea:oer:events:type:MetaDataChange:description ■ urn:com:bea:oer:events:type:CategorizationChanged:assetLifecycl eStage ■ urn:com:bea:oer:events:type:CategorizationChanged:classificatio n ■ urn:com:bea:oer:events:type:MetaDataChange:supported ■ urn:com:bea:oer:events:type:MetaDataChange:organizational ownership ■ urn:com:bea:oer:events:type:MetaDataChange:usagefee

9.3.3.2.3 Delivering Events to an Endpoint Filtered Using a JMS Message Selector Selectors

are a way of attaching a filter to a subscription to perform content-based routing. Selectors are defined using SQL 92 syntax. The following is a complete list of fields that can be used to write a filter expression to filter the events. These fields are added to the JMS message as properties by the Event Manager and a JMS Message Selector that accesses the fields can be written to filter the events. submittedby_emailaddress = mrsmithbea.com asset_description = Test Asset submittedby_name = oer_workflow_user submittedby_id = 99 asset_community = Java eventdata_description = new oer event eventsource_componentname = OER asset_name = TestAsset eventsource_componenttype = OER 10.3 asset_typeid = 154 eventdata_eventid = d0cdac55-c78f-4a29-8aec-6ea9ba8d31f1 eventdata_name = urn:com:bea:oer:events:type:MetaDataChange:name 9-34 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository asset_activestatus = ACTIVE eventsource_location = oerCore asset_id = 50100 eventdata_version = ver1.0 asset_version = 1 For more information about JMS Message Selectors, see the following web sites: ■ http:java.sun.comj2ee1.4docsapijavaxjmsMessage.html ■ http:activemq.apache.orgselectors.html

9.3.3.2.4 JMS Message Selector Examples Here are some sample usages of JMS message

selectors: ■ asset_id BETWEEN 50000 AND 50100 ■ eventdata_name = urn:com:bea:oer:events:type:AssetSubmission AND asset_ id BETWEEN 50000 AND 50100 ■ asset_name LIKE Inventory ■ asset_id gt; 500

9.3.4 Configuring Logging of Event Manager Events