Apidays New York 2024 - The value of a flexible API Management solution for O...
General Error Handling Approach
1. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
General error handling approach
Author: Roman Agaev
Date: Tuesday, March 27, 2007
-1-
2. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
Contents
Abstract.........................................................................................................................3
1 Analysis.......................................................................................................................3
2 Design.........................................................................................................................4
3 Conclusion...................................................................................................................7
3.1 Usage Examples...............................................................................................7
4 Appendixes..................................................................................................................8
-2-
3. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
Tables
Table 3-1: Common error handling mechanism application programming interface....5
Figures
Figure 3-1: Common error handling mechanism data structure....................................4
Figure 4-2: Custom error object definition....................................................................7
Figure 4-3: Custom error generation using predefined appropriate Business Service...7
Figure 4-4: Custom error generation and handling........................................................8
Abstract
The main aim of current essay is demonstration of internal Siebel ability of effective
framework provision for common error handling mechanism1.
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.
1Analysis
Mechanism 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)
1
Additional information can be found in "Workflow usage best practices." from Appendixes section of
the document
-3-
4. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
Err. OriginatorType – bounded list of values (BC2, BS3, applet, application, WP4,
RTE5)
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.
2Design
The 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 3-1: 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.
2
Business Component
3
Business Service
4
Workflow Process
5
Run Time Events
-4-
5. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
The following table consists of error handling proposed methods:
Table 3-1: Common error handling mechanism application programming interface
Method Name Method Description
void Init(void) The method is empty method that
generally used for instantiating the
cacheable Business Service.
&ps CreateError(<attributes>) 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.
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:
Layer Element Type Element Name Element Attributes
Database Table CX_ERROR_LOG NAME
ORIG_NAME
MESSAGE
CODE
TYPE
ORIG_TYPE
ORG_ID
HIGH_PROC_NAME
PROC_NAME
Business Business Common Errors Name
Component List Originator Name
Message
6
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
-5-
6. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
Layer Element Type Element Name Element Attributes
Code
Type
Originator Type
Originator Id
High Level Process
Name
Process Name
Common Errors Name
Originator Name
List VBC7
Message
Code
Type
Originator Type
Originator Id
High Level Process
Name
Process Name
Business Object Common Errors Common Errors List
List Common Errors List
VBC
Business Service Common Errors Init
Handling Engine CreateError
AppendError
GetLastError
GetErrorsExposition
Flush
Dispose
Graphic User Applet Common Errors
Interface Handling List
Applet
View Common 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 etc.
7
Based on concept described in essay " Common VBC paradigm " from Appendixes of the document
8
The parameters should be populated using " System parameters paradigm" from Appendixes of the
document
-6-
7. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
3Conclusion
The 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.
3.1Usage Examples
The following section demonstrated several examples (using Array and custom
objects):
Figure 4-2: Custom error object definition
Figure 4-3: Custom error generation using predefined appropriate Business Service
-7-
8. Roman Agaev, M.Sc, PMP
Owner, Supra Information Technology ltd.
Figure 4-4: Custom error generation and handling
4Appendixes
"Workflow usage best practices" (Roman Agaev)
"Common VBC paradigm" (Roman Agaev)
"Common logging mechanism" (Roman Agaev)
"System parameters paradigm" (Roman Agaev)
-8-