Siebel Consumer Goods Handheld Guide > COM Extensibility > About COM Extensibility >

Receiving Event Notifications


To intercept Siebel object events, a customer must create a SCEC that implements one of the exported SHCE COM Event Interfaces (SCEI) derived from ISHCEEvent. Although both the Siebel object and the SCEC are within the Siebel Handheld application process boundary, the SCEC is the COM server, and the Siebel Handheld application is the COM client consumer. All SCECs are free-threaded, in-process (.dll) COM servers.

A SCEC implements one of the event interfaces derived from the generic event interface (ISHCEEvent). The event interfaces are listed in Table 48.

Table 48. SCEI Interfaces
SHCE COM Event Interface (SCEI)
Description

ISHCEEvent

Contains generic interfaces common to all SCEIs. All event interfaces are derived from ISHCEEvent.

ISHCEAppletEvent

Used for applet events.

ISHCEApplicationEvent

Used for application and global events.

ISHCEBusCompEvent

Used for business component events.

ISHCEServiceEvent

Used for service events.

For example, to receive notifications that a business component (such as Account) is committing a record, a SCEC implements the event interface corresponding to the business component events (ISHCEBusCompEvent interface), and adds the specialized handling code in the method (PreWriteRecord).

User properties of the Siebel object in Siebel Tools indicate the events for which a SCEC will be notified. For more information about Tools configuration, see Configuring SCEC User Properties in Siebel Tools. When a Siebel event, to which a SCEC is subscribed, occurs, the Siebel object will instantiate the SCEC and notify it of the event by invoking one of the SCEI interface methods.

A SCEC can manipulate the program flow by returning one of the HRESULT codes listed in Table 49.

Table 49. SCEI Return Codes
SHCE COM Event Interface (SCEI) Return Codes
Description

EL_EVENT_EMPTY

No event procedure was found. Log a warning and perform normal processing.

EL_EVENT_CONTINUE

The event procedure ran successfully. The Siebel application should continue to perform normal processing.

EL_EVENT_COMPLETE

The event procedure performed the operation and ran successfully. The Siebel application should return without performing any additional processing (without performing normal processing).

EL_EVENT_ERROR

The event procedure generated an error. Return with error.

EL_EVENT_CANCEL

The event procedure was cancelled. Return without error.

COM extensibility supports the following Siebel events:

Applet_GotFocus

Application_PreSync

BusComp_PreNewRecord

Applet_InvokeMethod

Application_Start

BusComp_PreQuery

Applet_Load

BusComp_Associate

BusComp_PreSetFieldValue

Applet_PreInvokeMethod

BusComp_ChangeRecord

BusComp_PreWriteRecord

Applet_TaskButtonPressed

BusComp_DeleteRecord

BusComp_Query

Application_Close

BusComp_InvokeMethod

BusComp_SetFieldValue

Application_InvokeMethod

BusComp_NewRecord

BusComp_WriteRecord

Application_Navigate

BusComp_PreAssociate

Service_InvokeMethod

Application_PreClose

BusComp_PreDeleteRecord

Service_PreCanInvokeMethod

Application_PreInvokeMethod

BusComp_PreGetFieldValue

Service_PreInvokeMethod

Application_PreNavigate

BusComp_PreInvokeMethod

 

Siebel Consumer Goods Handheld Guide Copyright © 2007, Oracle. All rights reserved.