1 PACKAGE CS_Workflow_PKG AUTHID CURRENT_USER as
2 /* $Header: cswkflws.pls 115.7 2002/11/25 19:46:15 rmanabat ship $ */
3
4 -- -------------------------------------------------------------------
5 -- Is_Servereq_Item_Active
6 -- Given a service request number and a workflow process ID, this
7 -- function returns whether or not the workflow process for this
8 -- service request is active.
9 --
10 -- Note: This is a stored function that can be invoked from a
11 -- view script.
12 --
13 -- Returns: 'Y' - Process is active
14 -- 'N' - Otherwise
15 -- -------------------------------------------------------------------
16
17 FUNCTION Is_Servereq_Item_Active (
18 p_request_number IN VARCHAR2,
19 p_wf_process_id IN NUMBER ) RETURN VARCHAR2;
20 pragma RESTRICT_REFERENCES (Is_Servereq_Item_Active, WNDS);
21
22
23 -- -------------------------------------------------------------------
24 -- Get_Workflow_Disp_Name
25 -- Get the display name of the given Workflow process.
26 --
27 -- Notes: The p_raise_error flag determines what to do if the
28 -- Workflow process does not exist. If it's TRUE, then
29 -- NO_DATA_FOUND exception will be raised; otherwise, no
30 -- exception is raised and NULL is returned
31 --
32 -- This is a stored function that can be invoked from a
33 -- view script.
34 --
35 -- -------------------------------------------------------------------
36
37 FUNCTION Get_Workflow_Disp_Name (
38 p_item_type IN VARCHAR2,
39 p_process_name IN VARCHAR2,
40 p_raise_error IN BOOLEAN DEFAULT FALSE )
41 RETURN VARCHAR2;
42 pragma RESTRICT_REFERENCES (Get_Workflow_Disp_Name, WNDS, WNPS);
43
44
45 -- -------------------------------------------------------------------
46 -- Start_Servereq_Workflow
47 -- This procedure will launch a workflow process for the given
48 -- service request.
49 --
50 -- -------------------------------------------------------------------
51
52 PROCEDURE Start_Servereq_Workflow (
53 p_request_number IN VARCHAR2,
54 p_wf_process_name IN VARCHAR2,
55 p_initiator_user_id IN NUMBER,
56 p_initiator_resp_id IN NUMBER := NULL,
57 p_initiator_resp_appl_id IN NUMBER := NULL,
58 p_workflow_process_id OUT NOCOPY NUMBER );
59
60
61 -- -------------------------------------------------------------------
62 -- Abort_Servereq_Workflow
63 -- This procedure will abort an active service request workflow
64 -- process and send a notification to the current owner of the
65 -- request.
66 -- -------------------------------------------------------------------
67
68 PROCEDURE Abort_Servereq_Workflow (
69 p_request_number IN VARCHAR2,
70 p_wf_process_id IN NUMBER,
71 p_user_id IN NUMBER );
72
73
74 ----------------------------------------------------------------------
75 -- Is_Action_Item_Active
76 -- Given a service request id, an action number and a workflow
77 -- process ID, this function returns whether or not the workflow
78 -- process for this service request action is active.
79 --
80 -- Note: This is a stored function that can be invoked from a
81 -- view script.
82 --
83 -- Returns: 'Y' - Process is active
84 -- 'N' - Otherwise
85 ----------------------------------------------------------------------
86
87 FUNCTION Is_Action_Item_Active
88 ( p_request_id IN NUMBER,
89 p_action_number IN NUMBER,
90 p_wf_process_id IN NUMBER
91 )
92 RETURN VARCHAR2;
93
94 PRAGMA RESTRICT_REFERENCES (Is_Action_Item_Active, WNDS);
95
96
97 ----------------------------------------------------------------------
98 -- Start_Action_Workflow
99 -- This procedure will launch a workflow process for the given
100 -- service request action.
101 --
102 ----------------------------------------------------------------------
103
104 PROCEDURE Start_Action_Workflow
105 ( p_request_id IN NUMBER,
106 p_action_number IN NUMBER,
107 p_initiator_user_id IN NUMBER,
108 p_initiator_resp_id IN NUMBER := NULL,
109 p_initiator_resp_appl_id IN NUMBER := NULL,
110 p_launched_by_dispatch IN VARCHAR2 := 'N',
111 p_workflow_process_id OUT NOCOPY NUMBER
112 );
113
114
115 ----------------------------------------------------------------------
116 -- Abort_Action_Workflow
117 -- This procedure will abort an active service request action
118 -- workflow process and send a notification to the current assignee
119 -- of the request action.
120 ----------------------------------------------------------------------
121
122 PROCEDURE Abort_Action_Workflow
123 ( p_request_id IN NUMBER,
124 p_action_number IN NUMBER,
125 p_wf_process_id IN NUMBER,
126 p_abort_user_id IN NUMBER,
127 p_launched_by_dispatch OUT NOCOPY VARCHAR2
128 );
129
130
131 PROCEDURE Start_Servereq_Workflow (
132 p_request_number IN VARCHAR2,
133 p_wf_process_name IN VARCHAR2,
134 p_initiator_user_id IN NUMBER,
135 p_initiator_resp_id IN NUMBER := NULL,
136 p_initiator_resp_appl_id IN NUMBER := NULL,
137 p_workflow_process_id OUT NOCOPY NUMBER,
138 x_msg_count OUT NOCOPY NUMBER,
139 x_msg_data OUT NOCOPY VARCHAR2 );
140
141
142 PROCEDURE Abort_Servereq_Workflow (
143 p_request_number IN VARCHAR2,
144 p_wf_process_id IN NUMBER,
145 p_user_id IN NUMBER,
146 x_msg_count OUT NOCOPY NUMBER,
147 x_msg_data OUT NOCOPY VARCHAR2 );
148
149
150 END CS_Workflow_PKG;