1 package FND_CONC AUTHID CURRENT_USER as
2 /* $Header: AFCPDIGS.pls 120.2.12020000.2 2013/05/14 19:53:53 pferguso ship $ */
3
4 -- Request phase codes
5 PHASE_PENDING constant varchar2(1) := 'P';
6 PHASE_INACTIVE constant varchar2(1) := 'I';
7 PHASE_RUNNING constant varchar2(1) := 'R';
8 PHASE_COMPLETED constant varchar2(1) := 'C';
9
10 -- Request status codes
11 STATUS_WAITING constant varchar2(1) := 'A';
12 STATUS_RESUMING constant varchar2(1) := 'B';
13 STATUS_COMPLETED_NORMAL constant varchar2(1) := 'C';
14 STATUS_CANCELLED constant varchar2(1) := 'D';
15 STATUS_ERROR constant varchar2(1) := 'E';
16 STATUS_WARNING constant varchar2(1) := 'G';
17 STATUS_HOLD constant varchar2(1) := 'H';
18 STATUS_NORMAL constant varchar2(1) := 'I';
19 STATUS_NO_MANAGER constant varchar2(1) := 'M';
20 STATUS_SCHEDULED constant varchar2(1) := 'P';
21 STATUS_STANDBY constant varchar2(1) := 'Q';
22 STATUS_RUNNING_NORMAL constant varchar2(1) := 'R';
23 STATUS_SUSPENDED constant varchar2(1) := 'S';
24 STATUS_TERMINATING constant varchar2(1) := 'T';
25 STATUS_DISABLED constant varchar2(1) := 'U';
26 STATUS_PAUSED constant varchar2(1) := 'W';
27 STATUS_TERMINATED constant varchar2(1) := 'X';
28
29
30
31
32 -- ================================================
33 -- PUBLIC FUNCTIONS/PROCEDURES
34 -- ================================================
35
36
37 --
38 -- PROCEDURE
39 -- diagnose
40 -- Purpose
41 -- Perform diagnostics on a given request.
42 -- Arguments
43 -- request_id
44 -- phase -- returns text string describing the phase
45 -- status -- returns text string describing the status
46 -- help_text -- returns translated diagnostic text
47 --
48 PROCEDURE diagnose ( request_id IN number,
49 phase OUT NOCOPY varchar2,
50 status OUT NOCOPY varchar2,
51 help_text IN OUT NOCOPY varchar2
52 );
53
54 --
55 -- Function
56 -- process_alive
57 -- Purpose
58 -- Return TRUE if the process is alive,
59 -- FALSE otherwise.
60 -- Arguments
61 -- pid - concurrent process ID
62 -- Notes
63 -- Return FALSE on error.
64 --
65 function process_alive(pid number) return boolean;
66
67
68 --
69 -- Function
70 -- icm_alive
71 -- Purpose
72 -- If the ICM is dead, put the appropriate
73 -- message on the stack and return FALSE.
74 -- If the ICM is alive, TRUE is returned
75 -- Arguments
76 -- print -- if FALSE, no message is put on the stack
77 --
78 function icm_alive(print boolean) return boolean;
79
80
81 --
82 -- Function
83 -- service_alive
84 -- Purpose
85 -- Checks to see if any one of a service's processes are alive.
86 -- Returns TRUE if one or more is alive, if none are alive returns FALSE.
87 -- Arguments
88 -- queue_id -- concurrent queue id of the service
89 -- app_id -- application id of the service
90 -- Notes
91 -- Calls process_alive for each process id.
92 --
93 function service_alive(queue_id in number,
94 app_id in number) return boolean;
95
96
97
98 --
99 -- PROCEDURE
100 -- manager_check
101 -- Purpose
102 -- Checks status of managers that can run a request.
103 --
104 -- Arguments
105 -- IN:
106 -- req_id -- request ID
107 -- cd_id -- Conflict Domain ID
108 -- OUT:
109 -- mgr_defined -- Is there a manager defined that will run
110 -- the request?
111 -- mgr_active -- Is there an active manager to run it?
112 -- mgr_workshift -- Will the request run in a current workshift?
113 -- mgr_running -- Is there a manager running that can
114 -- process the request?
115 -- run_alone -- Is request waiting for run alone request?
116 -- to complete.
117 --
118 PROCEDURE manager_check (req_id in number,
119 cd_id in number,
120 mgr_defined out nocopy boolean,
121 mgr_active out nocopy boolean,
122 mgr_workshift out nocopy boolean,
123 mgr_running out nocopy boolean,
124 run_alone out nocopy boolean);
125
126
127 --
128 -- FUNCTION
129 -- get_phase
130 -- Purpose
131 -- Lookup meaning of a request phase_code.
132 --
133 function get_phase(pcode in varchar2) return varchar2;
134
135
136
137 --
138 -- FUNCTION
139 -- get_status
140 -- Purpose
141 -- Lookup meaning of a request status_code.
142 --
143 function get_status(scode in varchar2) return varchar2;
144
145
146
147 --
148 -- PROCEDURE
149 -- cancel_patch_requests
150 -- Purpose
151 -- Will cancel all requests submitted from a patch edition
152 -- higher than the current run edition.
153 --
154 -- For internal ATG use only.
155 --
156 -- Arguments
157 -- None
158 procedure cancel_patch_requests;
159
160
161
162 end FND_CONC;