1 PACKAGE XDP_ERRORS_PKG AUTHID CURRENT_USER AS
2 /* $Header: XDPERRRS.pls 120.1 2005/06/15 22:58:21 appldev $ */
3
4 pv_MsgParamSeparator VARCHAR2(10) := '#XDP#';
5 pv_MsgParamSeparatorSize NUMBER := LENGTH(pv_MsgParamSeparator);
6 pv_NameValueSeparator VARCHAR2(10) := '=';
7
8 -- Error Types
9 pv_typeSystem VARCHAR2(30) := 'SYSTEM';
10 pv_typeBusiness VARCHAR2(30) := 'BUSINESS';
11
12
13 -- Inserts the message name and its parameters in the XDP_ERROR_LOG table
14 -- Message parameters are separated by #XDP#, for e.g.,
15 -- for message "Invalid status for adapter ADAPTER_NAME. Current status is STATUS"
16 -- parameters will be "ADAPTER_NAME=SuperTel1#XDP#STATUS=SUSPENDED#XDP#"
17
18 PROCEDURE Set_Message (
19 p_object_type IN VARCHAR2,
20 p_object_key IN VARCHAR2,
21 p_message_name IN VARCHAR2,
22 p_message_parameters IN VARCHAR2,
23 p_error_type IN VARCHAR2 DEFAULT pv_typeSystem);
24
25 -- Same as Set_Message, just that this is autonomous
26
27 PROCEDURE Set_Message_Auto (
28 p_object_type IN VARCHAR2,
29 p_object_key IN VARCHAR2,
30 p_message_name IN VARCHAR2,
31 p_message_parameters IN VARCHAR2,
32 p_error_type IN VARCHAR2 DEFAULT pv_typeSystem);
33
34 -- Wrapper to log workflow errors..
35 Procedure LOG_WF_ERROR (itemtype in varchar2,
36 itemkey in varchar2,
37 actid in number,
38 funcmode in varchar2,
39 resultout OUT NOCOPY varchar2);
40
41
42 -- Gets the last MLS message text associated with the object instance
43
44 PROCEDURE Get_Last_Message (
45 p_object_type IN VARCHAR2,
46 p_object_key IN VARCHAR2,
47 p_message OUT NOCOPY VARCHAR2,
48 p_error_type OUT NOCOPY VARCHAR2,
49 p_message_timestamp OUT NOCOPY DATE);
50
51 -- Parses the message parameters and returns the MLS message text associated with the
52 -- the message. This function is used in the view XDP_ERROR_LOG_V
53
54 FUNCTION GET_MESSAGE (
55 p_message_name IN VARCHAR2,
56 p_message_parameters IN VARCHAR2)
57 return VARCHAR2;
58
59 -- Updates (or inserts) error count for the specified object type and key. By default,
60 -- resets the error count to 0.
61
62 PROCEDURE Update_Error_Count (
63 p_object_type IN VARCHAR2,
64 p_object_key IN VARCHAR2,
65 p_error_count IN NUMBER DEFAULT 0);
66
67 -- Gets error count for the specified object type and key. In case of "no data found",
68 -- returns error count of 0.
69
70 Function Get_Error_Count (
71 p_object_type IN VARCHAR2,
72 p_object_key IN VARCHAR2)
73 return NUMBER;
74
75 END XDP_ERRORS_PKG;