DBA Data[Home] [Help]

PACKAGE: APPS.PY_ROLLBACK_PKG

Source


1 package py_rollback_pkg as
2 /* $Header: pyrolbak.pkh 120.0.12010000.1 2008/07/27 23:33:53 appldev ship $ */
3 /*
4  Copyright (c) Oracle Corporation 1991,1992,1993. All rights reserved
5 --
6  Change List
7  ===========
8 
9  Version Date       Author    ER/CR No. Description of Change
10  -------+---------+----------+---------+-------------------------------
11  115.2   05/12/03  NBRISTOW             Added p_grp_multi_thread to
12                                         rollback procedures.
13  40.3    30/07/96  JALLOUN              Added error handling.
14  40.2    23/06/95  DSAXBY               New p_limit_dml parameter.
15  40.1    23/06/95  DSAXBY               Fix 290059 : new parameters added to
16                                         rollback_ass_action procedure.
17  40.0    15/06/95  DSAXBY               First created.
18  ----------------------------------------------------------------------
19 */
20 /*------------------------  ins_rollback_message ----------------------------*/
21 /*
22   NAME
23     ins_rollback_message - insert rollback message.
24   DESCRIPTION
25     inserts confirmatory message into pay_message_lines.
26   NOTES
27     This procedure deals with the fact that Magnetic
28     Transfer is generic name, and chooses the correct
29     name depending on the Payment Type.
30     Needs to be callable from the batch process.
31 */
32 procedure ins_rollback_message(p_payroll_action_id in number);
33 --
34 /*----------------------  rollback_payroll_action ---------------------------*/
35 /*
36   NAME
37     rollback_payroll_action - undo work for payroll action.
38   DESCRIPTION
39     performs rollback/mark for retry on payroll action.
40   NOTES
41     This procedure is the entry point to be called to rollback
42     or mark for retry a payroll action. The function will
43     attempt to process all the assignment actions, continuing
44     on failure until the error limit is reached. Messages are
45     written to the message lines table.
46 --
47     The parameters are used as follows:
48       p_payroll_action_id :
49          identifies the row to be processed.
50 --
51       p_rollback_mode :
52          either 'ROLLBACK', 'RETRY' or 'BACKPAY'.
53 --
54       p_leave_base_table_row :
55          if this is true, the procedure does not attempt to update/delete the
56          payroll action row. It leaves this to the client. Normally, this
57          means a form. However, a message IS inserted by the procedure.
58          if false, the procedure update/deletes the payroll action before
59          exiting.  Must set this to true if rollback mode is set to 'TRUE'.
60 --
61       p_all_or_nothing :
62          when TRUE, the entire rollback process will fail with the first error.
63          when FALSE, the procedure will process all assignments it can, up to
64          the error limit (set from action parameter or defaulted).
65 --
66       p_dml_mode :
67          one of the following:
68          'FULL'      : all dml and commits.
69          'NO_COMMIT' : all dml, no commit.
70          'NONE'      : no dml or commits.
71          This allows the user to specify a partial or full validation.
72 --
73       p_multi_thread :
74          this should only be set to true if being called from the
75          multi-threaded version of rollback code (i.e. from pyr.lpc).
76 --
77       p_limit_dml :
78          if this is true, the procedure will limit the number of
79          assignment actions that can be processed in a single commit
80          unit. This is specified using MAX_SINGLE_UNDO action parameter.
81 --
82       p_grp_multi_thread:-
83          this is used to indicate which method to maintain the group
84          level run balances.  This should be set to true when being
85          called from a multi-threaded process. Some multi threaded
86          processes use p_multi_thread set to false, hence
87          p_grp_multi_thread was created to ensure that all multi threaded
88          processes use the correct group run balance deletion.
89 */
90 procedure rollback_payroll_action
91 (
92    p_payroll_action_id    in number,
93    p_rollback_mode        in varchar2 default 'ROLLBACK',
94    p_leave_base_table_row in boolean  default false,
95    p_all_or_nothing       in boolean  default true,
96    p_dml_mode             in varchar2 default 'NO_COMMIT',
97    p_multi_thread         in boolean  default false,
98    p_limit_dml            in boolean  default false,
99    p_grp_multi_thread     in boolean  default false
100 );
101 --
102 /*------------------------  rollback_ass_action -----------------------------*/
103 /*
104   NAME
105     rollback_ass_action - undo work for assignment action.
106   DESCRIPTION
107     performs rollback/mark for retry on assignment action.
108   NOTES
109     This procedure is the entry point to be called to rollback
110     or mark for retry an assignment action. On failure, a
111     message will be inserted in message lines, indicating that
112     the assignment action could not be processed.
113 --
114     The parameters are used as follows:
115       p_payroll_action_id    :
116          identifies the row to be processed.
117 --
118       p_rollback_mode :
119          either 'ROLLBACK', 'RETRY' or 'BACKPAY'.
120 --
121       p_leave_base_table_row :
122          if this is true, the procedure does not attempt to update/delete the
123          assignment action row. It leaves this to the client. Normally, this
124          means a form. However, a message IS inserted by the procedure.
125          if false, the procedure update/deletes the assignment action before
126          exiting.  Must set this to true if rollback mode is set to 'TRUE'.
127 --
128       p_all_or_nothing :
129          when TRUE, procedure fails immediately if error encountered, otherwise
130          processes up to assignment level error limit. Latter is required by
131          rollback by assignment set.
132 --
133       p_dml_mode :
134          one of the following:
135          'FULL'      : all dml and commits.
136          'NO_COMMIT' : all dml, no commit.
137          'NONE'      : no dml or commits.
138          This allows the user to specify a partial or full validation.
139 --
140       p_multi_thread :
141          this should only be set to true if being called from the
142          multi-threaded version of rollback code (i.e. from pyr.lpc).
143 --
144       p_grp_multi_thread:-
145          this is used to indicate which method to maintain the group
146          level run balances.  This should be set to true when being
147          called from a multi-threaded process. Some multi threaded
148          processes use p_multi_thread set to false, hence
149          p_grp_multi_thread was created to ensure that all multi threaded
150          processes use the correct group run balance deletion.
151 */
152 procedure rollback_ass_action
153 (
154    p_assignment_action_id in number,
155    p_rollback_mode        in varchar2 default 'ROLLBACK',
156    p_leave_base_table_row in boolean  default false,
157    p_all_or_nothing       in boolean  default true,
158    p_dml_mode             in varchar2 default 'NO_COMMIT',
159    p_multi_thread         in boolean  default false,
160    p_grp_multi_thread     in boolean  default false
161 );
162 --
163 end py_rollback_pkg;