1 PACKAGE PA_TASK_APPROVAL_PKG AUTHID CURRENT_USER AS
2 /* $Header: PATSKPKS.pls 120.3 2009/07/21 14:10:13 anuragar noship $ */
3
4 PROCEDURE Mark_CO_Status(p_ci_id IN NUMBER
5 ,p_msg_count OUT NOCOPY NUMBER
6 ,p_msg_data OUT NOCOPY VARCHAR2
7 ,p_return_status OUT NOCOPY VARCHAR2) ;
8
9 /*---------------------------------------------------------------------------------------------------------
10 -- This procedure is being invoked on Change Order workflow to verify if any of the used task is
11 -- already approved.
12 -- Input parameters
13 -- Parameters Type Required Description
14 -- p_ci_id NUMBER YES Change document Id
15 -- Out parameters
16 -- Parameters Type Required Description
17 -- p_return_status VARCHAR2 YES The return status of the APIs.
18 -- Valid values are:
19 -- S (API completed successfully),
20 -- E (business rule violation error) and
21 -- U(Unexpected error, such as an Oracle error.
22 -- p_msg_count NUMBER YES Holds the number of messages in the global message
23 -- table. Calling programs should use this as the
24 -- basis to fetch all the stored messages.
25 -- p_msg_data VARCHAR2 YES Holds the message code, if the API returned only
26 -- one error/warning message Otherwise the column is
27 -- left blank.
28 ----------------------------------------------------------------------------------------------------------*/
29 PROCEDURE Check_UsedTask_Status
30 (p_ci_id IN NUMBER
31 ,p_msg_count OUT NOCOPY NUMBER
32 ,p_msg_data OUT NOCOPY VARCHAR2
33 ,p_return_status OUT NOCOPY VARCHAR2);
34
35 /*---------------------------------------------------------------------------------------------------------
36 -- This Function is called from Task Workflow package to verify if the submitted task is a child task
37 -- Input parameters
38 -- Parameters Type Required Description
39 -- p_project_id NUMBER YES Identification of the project
40 -- p_proj_element NUMBER YES Task Id
41 -- p_parent_struc_ver NUMBER YES Parent task structure version id
42 -- Out parameters
43 -- Parameters Type Required Description
44 -- p_return_status VARCHAR2 YES The return status of the APIs.
45 -- Valid values are:
46 -- S (API completed successfully),
47 -- E (business rule violation error) and
48 -- U(Unexpected error, such as an Oracle error.
49 -- p_msg_count NUMBER YES Holds the number of messages in the global message
50 -- table. Calling programs should use this as the
51 -- basis to fetch all the stored messages.
52 -- p_msg_data VARCHAR2 YES Holds the message code, if the API returned only
53 -- one error/warning message Otherwise the column is
54 -- left blank.
55 ----------------------------------------------------------------------------------------------------------*/
56 FUNCTION Is_Child_Task
57 (p_project_id IN NUMBER
58 ,p_proj_element IN NUMBER
59 ,p_parent_struc_ver IN NUMBER
60 ,p_msg_count OUT NOCOPY NUMBER
61 ,p_msg_data OUT NOCOPY VARCHAR2
62 ,p_return_status OUT NOCOPY VARCHAR2) RETURN BOOLEAN;
63
64 /*---------------------------------------------------------------------------------------------------------
65 -- This Function is called from Task Workflow package to verify if the parent task is already approved or not
66 -- Input parameters
67 -- Parameters Type Required Description
68 -- p_project_id NUMBER YES Identification of the project
69 -- p_proj_element NUMBER YES Task Id
70 -- Out parameters
71 -- Parameters Type Required Description
72 -- p_return_status VARCHAR2 YES The return status of the APIs.
73 -- Valid values are:
74 -- S (API completed successfully),
75 -- E (business rule violation error) and
76 -- U(Unexpected error, such as an Oracle error.
77 -- p_msg_count NUMBER YES Holds the number of messages in the global message
78 -- table. Calling programs should use this as the
79 -- basis to fetch all the stored messages.
80 -- p_msg_data VARCHAR2 YES Holds the message code, if the API returned only
81 -- one error/warning message Otherwise the column is
82 -- left blank.
83 ----------------------------------------------------------------------------------------------------------*/
84 FUNCTION Is_Parent_Task_Approved
85 (p_project_id IN NUMBER
86 ,p_parent_task_id IN NUMBER
87 ,p_task_id IN NUMBER
88 ,p_parent_struc_ver IN NUMBER
89 ,p_msg_count OUT NOCOPY NUMBER
90 ,p_msg_data OUT NOCOPY VARCHAR2
91 ,p_return_status OUT NOCOPY VARCHAR2) RETURN BOOLEAN;
92
93 /*---------------------------------------------------------------------------------------------------------
94 -- This procedure is being invoked on Tasks Submission for approval.
95 -- Input parameters
96 -- Parameters Type Required Description
97 -- p_project_id NUMBER YES Identification of the project
98 -- p_task_id NUMBER YES Task Identifier
99 -- p_ref_task_id NUMBER YES Reference Task Identifier (NOT USED)
100 -- p_parent_struc_ver NUMBER YES Parent task structure version id
101 -- p_approver_user_id NUMBER YES Approver user Id
102 -- p_ci_id NUMBER YES Change document Id
103 -- Out parameters
104 -- Parameters Type Required Description
105 -- p_return_status VARCHAR2 YES The return status of the APIs.
106 -- Valid values are:
107 -- S (API completed successfully),
111 -- table. Calling programs should use this as the
108 -- E (business rule violation error) and
109 -- U(Unexpected error, such as an Oracle error.
110 -- p_msg_count NUMBER YES Holds the number of messages in the global message
112 -- basis to fetch all the stored messages.
113 -- p_msg_data VARCHAR2 YES Holds the message code, if the API returned only
114 -- one error/warning message Otherwise the column is
115 -- left blank.
116 ----------------------------------------------------------------------------------------------------------*/
117
118 PROCEDURE Submit_Task
119 (p_project_id IN NUMBER
120 ,p_task_id IN NUMBER
121 ,p_ref_task_id IN NUMBER
122 ,p_parent_struc_ver IN NUMBER
123 ,p_approver_user_id IN NUMBER
124 ,p_ci_id IN NUMBER
125 ,p_msg_count OUT NOCOPY NUMBER
126 ,p_msg_data OUT NOCOPY VARCHAR2
127 ,p_return_status OUT NOCOPY VARCHAR2);
128
129 END PA_TASK_APPROVAL_PKG;