DBA Data[Home] [Help]

PACKAGE: APPS.IEX_STRY_UTL_PUB

Source


1 PACKAGE IEX_STRY_UTL_PUB AUTHID CURRENT_USER as
2 /* $Header: iexpsuts.pls 120.1.12020000.3 2012/08/13 13:48:46 bibeura ship $ */
3 
4 
5 G_DEFAULT_NUM_REC_FETCH  NUMBER := 30;
6 G_YES         CONSTANT VARCHAR2(1) := 'Y';
7 G_NO          CONSTANT VARCHAR2(1) := 'N';
8 G_NUMBER      CONSTANT NUMBER := 1;  -- data type is number
9 G_VARCHAR2    CONSTANT NUMBER := 2;  -- data type is varchar2
10 
11 TYPE work_item_rec_type IS RECORD (
12   template_id           NUMBER,
13   work_item_template_id NUMBER,
14   order_by              NUMBER,
15   STATUS                VARCHAR2(100),
16   work_item_id          NUMBER,
17   strategy_id           NUMBER );
18 
19 TYPE work_item_tab_type IS TABLE OF work_item_rec_type INDEX BY BINARY_INTEGER;
20 
21 PROCEDURE GET_NEXT_WORK_ITEMS
22                           (p_api_version   IN  NUMBER,
23                            p_commit        IN VARCHAR2          DEFAULT    FND_API.G_FALSE,
24                            p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
25                            p_strategy_id   IN NUMBER,
26                            x_return_status OUT NOCOPY VARCHAR2,
27                            x_msg_count     OUT NOCOPY NUMBER,
28                            x_msg_data      OUT NOCOPY VARCHAR2,
29                            x_work_item_tab OUT NOCOPY work_item_tab_type);
30 
31 
32 
33 /**
34    update all the work_items status to  depending on the status passed
35    update the stragey status to  depending on the status passed
36 **/
37 PROCEDURE CLOSE_STRY_AND_WITEMS
38                           (p_api_version   IN  NUMBER,
39                            p_commit        IN VARCHAR2          DEFAULT    FND_API.G_TRUE,
40                            p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
41                            p_strategy_id   IN NUMBER,
42                            p_status        IN VARCHAR2,
43                            x_return_status OUT NOCOPY VARCHAR2,
44                            x_msg_count     OUT NOCOPY NUMBER,
45                            x_msg_data      OUT NOCOPY VARCHAR2
46                            );
47 
48 /**
49    update the stragey status to  depending on the status passed
50 **/
51 PROCEDURE CLOSE_STRATEGY
52                           (p_api_version   IN  NUMBER,
53                            p_commit        IN VARCHAR2          DEFAULT    FND_API.G_FALSE,
54                            p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
55                            p_strategy_id   IN NUMBER,
56                            p_status        IN VARCHAR2,
57                            x_return_status OUT NOCOPY VARCHAR2,
58                            x_msg_count     OUT NOCOPY NUMBER,
59                            x_msg_data      OUT NOCOPY VARCHAR2
60                            );
61 
62 /**
63    update the work_item_id;
64 **/
65 PROCEDURE UPDATE_WORK_ITEM
66                           (p_api_version   IN  NUMBER,
67                            p_commit        IN VARCHAR2          DEFAULT    FND_API.G_TRUE,
68                            p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
69                            p_work_item_id   IN NUMBER,
70                            p_status        IN VARCHAR2,
71                            x_return_status OUT NOCOPY VARCHAR2,
72                            x_msg_count     OUT NOCOPY NUMBER,
73                            x_msg_data      OUT NOCOPY VARCHAR2
74                            );
75 
76 /**
77    update the next work_item_id in the strategy table
78 **/
79 PROCEDURE UPDATE_NEXT_WORK_ITEM
80                           (p_api_version   IN  NUMBER,
81                            p_commit        IN VARCHAR2          DEFAULT    FND_API.G_FALSE,
82                            p_init_msg_list IN  VARCHAR2         DEFAULT    FND_API.G_FALSE,
83                            p_work_item_id  IN NUMBER,
84                            p_strategy_id   IN NUMBER,
85                            x_return_status OUT NOCOPY VARCHAR2,
86                            x_msg_count     OUT NOCOPY NUMBER,
87                            x_msg_data      OUT NOCOPY VARCHAR2
88                            );
89 
90 
91 
92 /**
93  **check all the work_items for the given strategy for status in
94  ** CANCELLED,COMPLETE.
95  ** set the return value to 0 if the all the work items are
96  ** exhausted
97  **/
98 FUNCTION CHECK_WORK_ITEM_STATUS(
99                            p_strategy_id   IN NUMBER
100                            )RETURN NUMBER;
101 
102 /** Calculate  date  based on the template UOM and the wait
103 */
104 
105 FUNCTION  get_Date (p_date IN DATE,
106                     l_UOM varchar2,
107                     l_unit number) return date;
108 
109 
110 
111 /** subscription function example
112 *
113 **/
114  FUNCTION create_workitem_check
115  ( p_subscription_guid      in raw,
116    p_event                  in out NOCOPY wf_event_t)
117  RETURN VARCHAR2;
118 
119  /** subscription function example
120 *   for complete work item
121 **/
122 
123  FUNCTION create_workitem_complete
124  ( p_subscription_guid      in raw,
125    p_event                  in out NOCOPY wf_event_t)
126  return varchar2;
127 
128 --Begin bug#5874874 gnramasa 25-Apr-2007
129 procedure clear_uwq_str_summ(p_object_id in number,
130                              p_object_type in varchar2);
131 
132 procedure refresh_uwq_str_summ(p_workitem_id in number,
133                                p_commit      IN VARCHAR2   DEFAULT    'T'); -- Bug #14053089 bibeura
134 --End bug#5874874 gnramasa 25-Apr-2007
135 
136 /** reassgin strategy
137   * send signal first
138   * then call create_Strategy_pub
139   * to create the new strategy
140   * the new strategy will launch the work flow*
141   **/
142 /*
143 PROCEDURE REASSIGN_STRATEGY( p_strategy_id   IN NUMBER,
144                              p_status        IN VARCHAR2,
145                              p_commit        IN VARCHAR2  DEFAULT    FND_API.G_FALSE,
146                              x_return_status OUT NOCOPY VARCHAR2,
147                              x_msg_count     OUT NOCOPY NUMBER,
148                              x_msg_data      OUT NOCOPY VARCHAR2);
149 
150 */
151  /** update work item and call send signal
152   * if send signal fails, roolback the work item
153   **/
154 
155 /*
156 PROCEDURE UPDATE_AND_SENDSIGNAL( P_strategy_work_item_Rec  IN
157                                          iex_strategy_work_items_pvt.strategy_work_item_Rec_Type,
158                                  p_commit                  IN VARCHAR2  DEFAULT    FND_API.G_FALSE,
159                                  x_return_status           OUT NOCOPY VARCHAR2,
160                                  x_msg_count               OUT NOCOPY NUMBER,
161                                  x_msg_data                OUT NOCOPY VARCHAR2);
162 
163 
164 */
165 
166 PROCEDURE UPDATE_wf_attributes(p_resource_id NUMBER , p_resourceto_id number);
167 
168 END IEX_STRY_UTL_PUB;