General Error Handling Approach

download General Error Handling Approach

If you can't read please download the document

Transcript of General Error Handling Approach

Co-existence of Siebel versions 6 and 7

General error handling approach

Author: Roman AgaevDate: Tuesday, March 27, 2007Contents Abstract31 Analysis32 Design43 Conclusion73.1 Usage Examples74 Appendixes8

TablesTable 31: Common error handling mechanism application programming interface5

FiguresFigure 31: Common error handling mechanism data structure4Figure 42: Custom error object definition7Figure 43: Custom error generation using predefined appropriate Business Service7Figure 44: Custom error generation and handling8AbstractThe main aim of current essay is demonstration of internal Siebel ability of effective framework provision for common error handling mechanism1 Additional information can be found in "Workflow usage best practices." from Appendixes section of the document

.Generally Siebel environment provides many different ways for errors handling and auditing, but no generalized enough way of doing so. When the final point states that there is no easy way of Siebel processes auditing.The following analysis and design is coming to answer on such a requirement.AnalysisMechanism must be available from within every potential functional point of future system:Script

Workflow Process

Runt Time Event

The mechanism must provide a common error object model that will suit it usage as run time error handler as well as custom error generation. The proposed error object need be effective in terms if performance and easy usage and include the following fields:Err. Name identity number

Err. OriginatorName name of originator

Err. Message

Err. Code

Err. Type bounded list of values: custom, runtime (default)

Err. OriginatorType bounded list of values (BC2 Business Component

, BS3 Business Service

, applet, application, WP4 Workflow Process

, RTE5 Run Time Events

)

Err. OriginatorId Row Id if existed

Err. HighLevelProcessName unbounded list of values

Err. ProcessName unbounded list of values

The mechanism must allow effective visualization and query for recently occurred errors per each of sequenced above fields.DesignThe analysis can be handled using cacheable Business Service that will hold a data structure consisted of predefined errors. The Business Service will consist of several predefined methods that will define full API of the module.The following figure demonstrates the visual representation of data structure:Figure 31: Common error handling mechanism data structure

The data structure can be implemented using Propertyset object which is predefined and most complicated data structure within Siebel environment or using Array and custom objects.The following table consists of error handling proposed methods:Table 31: Common error handling mechanism application programming interfaceMethod NameMethod Description

void Init(void)The method is empty method that generally used for instantiating the cacheable Business Service.

&ps CreateError()Creates an error object and stores it as temporary error until it will be handled by catch section

void AppendError(&ps)Appends created error to the session error list

&ps GetLastError(void)Retrieves the last error from session error list

&ps GetErrorsExposition(void)Retrieves the whole session error list

void Flush(void)Flushes the entire session error list to the database6 The meaning is that all the existed errors from session's error list data structure will be purged from the memory, but stored firstly within the database. For more information please refer to "Common logging mechanism" from Appendixes section of the document

.

void Dispose(void)Eliminates any references to the object structures created during the session and stored as session living level elements.

The session error list can be stored in Siebel's datasource, for those purposes the new elements of database, business and graphic user interface layers must be appended. The Common Logging Mechanism referred in Appendixes section proposed option for the functionality, but the following solution maybe used instead:The following table demonstrates those elements per layer:LayerElement TypeElement NameElement Attributes

DatabaseTableCX_ERROR_LOGNAME

ORIG_NAME

MESSAGE

CODE

TYPE

ORIG_TYPE

ORG_ID

HIGH_PROC_NAME

PROC_NAME

BusinessBusiness ComponentCommon Errors ListName

Originator Name

Message

Code

Type

Originator Type

Originator Id

High Level Process Name

Process Name

Common Errors List VBC7 Based on concept described in essay " Common VBC paradigm " from Appendixes of the document

Name

Originator Name

Message

Code

Type

Originator Type

Originator Id

High Level Process Name

Process Name

Business ObjectCommon Errors ListCommon Errors List

Common Errors List VBC

Business ServiceCommon Errors Handling EngineInit

CreateError

AppendError

GetLastError

GetErrorsExposition

Flush

Dispose

Graphic User InterfaceAppletCommon Errors Handling List Applet

ViewCommon Errors Handling View

The Business Component of the module Common Error List can encapsulate the complexity of errors managing delegating appropriate functionality using provided by Siebel environment InvokeMethod mechanism.In addition several parameters probably must be used in order to allow smooth changing of several behavior aspects like flushBoundary8 The parameters should be populated using " System parameters paradigm" from Appendixes of the document

etc.ConclusionThe usage of such an approach will generalize the neediness of many different functional points for auditing their run time errors as well as custom ones. It must be realized that in any other cases the developer will be in front of choice, and in many cases not very well based, designed and logically defined decision will lead to decentralized and type less error handling.Usage ExamplesThe following section demonstrated several examples (using Array and custom objects):Figure 42: Custom error object definition

Figure 43: Custom error generation using predefined appropriate Business Service

Figure 44: Custom error generation and handling

Appendixes"Workflow usage best practices" (Roman Agaev)

"Common VBC paradigm" (Roman Agaev)

"Common logging mechanism" (Roman Agaev)

"System parameters paradigm" (Roman Agaev)

Roman Agaev, M.Sc, PMPOwner, Supra Information Technology ltd.

- -