Siebel eFinance for Teller Connector to IBM WebSphere Business Component Composer Guide > Teller IFX Connector Roadmap > Initiating Messages >

Runtime Event Problems and Solutions


This section presents issues that may arise with runtime events and suggests workarounds.

BusComp SetFieldValue and Infinite Message Loops

Using the BusComp SetFieldValue to initiate eAI messages may result in an infinite message loop, as shown in the following scenario.

  1. A SetFieldValue event on business component A initiates a message.
  2. The connector workflow runs and generates an XML string to send to the middleware.
  3. The middleware responds with an XML string.
  4. The connector handles the incoming XML string and maps the data back to an internal integration object that updates business component A.
  5. In the last step of the incoming workflow, the Siebel Adapter runs, calling SetFieldValue again on business component A, and so initiates a new message. This results in an infinite message loop and crashes the application once it runs out of memory.

To prevent an infinite message loop

  1. Create a copy of the business component you want to update.
  2. Add it to your business object.
  3. You will need to create additional links to do this. If this is the primary business component, you will need to create a new business object.

  4. Create a new internal integration object using the copy of the business component.
  5. Update the proper dispatcher map entry to reference the new internal integration object.

BusComp SetFieldValue and the EAI Siebel Adapter

Using SetFieldValue to fire events does not guarantee that the new data will be written to the database. When a Pick Applet calls SetFieldValue, it forces a write to the database so that the EAI Siebel Adapter will pick up the correct data. However, if a picklist or regular typing is using to set a value in a field, the SetFieldValue event will fire before the data is written to the database. In this case, the EAI Siebel Adapter will read the old data.

To work around this problem, if you need to use a SetFieldValue event, use a WriteRecordUpdated event instead. If using a WriteRecordUpdated event will not work for your situation, consider using a button or Command object instead.

DisplayApplet and Connector Errors

If you use the DisplayApplet event to issue a message and the message returns an error, or the connector has an error, part of the view may not appear. Only use the display applet event in cases where you have a high degree of confidence that the underlying message is reliable.

WriteRecordNew and Connector Errors

If you use WriteRecordNew to initiate a message and the message returns with an Error status, the data from the response message will not be updated into the Siebel application. However, the record in Siebel will no longer be considered a new record. So if the user saves the record in an attempt to initiate the message, the WriteRecordNew event will not fire and no message will be sent.

To work around this problem you will need to implement a WriteRecordUpdated event to send a message when the record is modified and saved again.

NOTE:  If no fields have changed in the applet, neither event will fire. If you need complete control over when to send a message, using a button as described above will give you complete control over when the message can be sent.

Phasing of Events and Database State

When various events fire, the database will be in a certain state. Table 46 describes what data you can expect in the database when certain events fire, and what will happen if the associated message fails.

Table 46. events and Data
Event
Database State
WriteRecord
WriteRecordNew
WriteRecordUpdated
The new or updated record will be committed in the database and available for the Siebel Adapter to read. If the message fails, the record with its new or modified data remains in the Siebel database.
PreDelete
No change is made to the record when this message fires. If the message fails, then the delete record will fail and the record will remain in Siebel.
InvokeMethod
EventMethodxxx
Generally these are used for query messages or for posting transactions. If the message fails, no updates to the Siebel database will occur and the existing records will remain unchanged.
SetFieldValue
If the field is associated with a pick applet, the new data from the pick applet will be available when the message fires. If the field is associated with a picklist or if data is entered by typing only, the new data will not be committed to the database when the event fires.


 Siebel eFinance for Teller Connector to IBM WebSphere Business Component Composer Guide 
 Published: 18 April 2003