DBA Data[Home] [Help]

PACKAGE: APPS.ENG_WORKFLOW_API_PKG

Source


1 PACKAGE ENG_WORKFLOW_API_PKG AUTHID CURRENT_USER as
2 /* $Header: engwkfws.pls 115.7 2004/02/24 16:18:13 fabdi ship $ */
3 
4 -- IN
5 --   itemtype  - type of the current item
6 --   itemkey   - key of the current item
7 --   actid     - process activity instance id
8 --   funcmode  - function execution mode ('RUN', 'CANCEL', 'TIMEOUT', ...)
9 -- OUT
10 --   result
11 --       - COMPLETE[:<result>]
12 --           activity has completed with the indicated result
13 --       - WAITING
14 --           activity is waiting for additional transitions
15 --       - DEFERED
16 --           execution should be defered to background
17 --       - NOTIFIED[:<notification_id>:<assigned_user>]
18 --           activity has notified an external entity that this
19 --           step must be performed.  A call to wf_engine.CompleteActivty
20 --           will signal when this step is complete.  Optional
21 --           return of notification ID and assigned user.
22 --       - ERROR[:<error_code>]
23 --           function encountered an error.
24 
25 
26 -- PROCEDURE Get_ECO_and_OrgId
27 --
28 -- From the Item Key, get the ECO name and Organization Id.
29    l_open_doc BOOLEAN := TRUE;
30 
31    PROCEDURE Get_ECO_and_OrgId	(itemtype	IN VARCHAR2,
32 		 	    	 itemkey	IN VARCHAR2,
33 			    	 actid		IN NUMBER,
34 			    	 funcmode	IN VARCHAR2,
35 			    	 result		IN OUT NOCOPY VARCHAR2);
36 
37 
38 -- PROCEDURE Get_ECO_Attributes
39 --
40 -- Get the attributes for an ECO.  Copy these attributes into the Workflow
41 -- Attributes belonging to the Item Type ECO_APP.
42 
43    PROCEDURE Get_Eco_Attributes (itemtype	IN VARCHAR2,
44 		 	    	 itemkey	IN VARCHAR2,
45 			    	 actid		IN NUMBER,
46 			    	 funcmode	IN VARCHAR2,
47 			    	 result		IN OUT NOCOPY VARCHAR2);
48 
49 
50 -- PROCEDURE Approve_ECO
51 --
52 -- This procedure updates an ECO's Approval Status to "Approved".
53 -- The Approval Date gets updated to today's date.  Also sets all "Open"
54 -- Revised Items to "Scheduled".
55 
56    PROCEDURE Approve_Eco       (itemtype        IN VARCHAR2,
57                                 itemkey         IN VARCHAR2,
58                                 actid           IN NUMBER,
59                                 funcmode        IN VARCHAR2,
60                                 result	        IN OUT NOCOPY VARCHAR2);
61 
62 
63 -- PROCEDURE Reject_ECO
64 --
65 -- This procedure updates an ECO's Approval Status to "Rejected".
66 -- The Approval Date gets nulled out.
67 
68    PROCEDURE Reject_Eco		(itemtype       IN VARCHAR2,
69                                 itemkey         IN VARCHAR2,
70                                 actid           IN NUMBER,
71                                 funcmode        IN VARCHAR2,
72                                 result		IN OUT NOCOPY VARCHAR2);
73 
74 
75 -- PROCEDURE Set_Eco_Approval_Error
76 --
77 -- This procedure sets an ECO's Approval Status to 'Processing Error'.  This
78 -- procedure is used in the Engineering Error Process.
79 
80    PROCEDURE Set_Eco_Approval_Error(itemtype        IN VARCHAR2,
81                                     itemkey         IN VARCHAR2,
82                                     actid           IN NUMBER,
83                                     funcmode        IN VARCHAR2,
84                                     result	    IN OUT NOCOPY VARCHAR2);
85 
86 
87 -- PROCEDURE Set_Mrp_Active
88 --
89 -- This procedure updates the MRP Active flag to 'Yes' for all the revised
90 -- items for a given ECO only if the revised item is at Status 'Open' or
91 -- 'Scheduled'.
92 
93    PROCEDURE Set_Mrp_Active	(itemtype        IN VARCHAR2,
94                                  itemkey         IN VARCHAR2,
95                                  actid           IN NUMBER,
96                                  funcmode        IN VARCHAR2,
97                                  result	         IN OUT NOCOPY VARCHAR2);
98 
99 
100 -- PROCEDURE Set_Mrp_Inactive
101 --
102 -- This procedure updates the MRP Active flag to 'No' for all the revised
103 -- items for a given ECO only if the revised item is at Status 'Open' or
104 -- 'Scheduled'.
105 
106    PROCEDURE Set_Mrp_Inactive	(itemtype        IN VARCHAR2,
107                                  itemkey         IN VARCHAR2,
108                                  actid           IN NUMBER,
109                                  funcmode        IN VARCHAR2,
110                                  result          IN OUT NOCOPY VARCHAR2);
111 
112 -- PROCEDURE UPDATE_EVIDENCE
113 --
114 -- This procedure will post ERES record for ECO Approval wrk flow
115 -- into the evidence store. For both Approve and Rejected case.
116 --
117 
118    PROCEDURE UPDATE_EVIDENCE  (p_itemtype   IN VARCHAR2,
119       	                       p_itemkey    IN VARCHAR2,
120       	                       p_actid      IN NUMBER,
121                                p_funcmode   IN VARCHAR2,
122                                p_resultout  OUT NOCOPY VARCHAR2
123   );
124 
125                             -- PROCEDURE Get_ERES_Attributes
126 --
127 -- Get the attributes for ERES process.  Copy these attributes into the Workflow
128 -- Attributes belonging to the Item Type ECO_APP.
129 
130    PROCEDURE Get_ERES_Attributes (itemtype	IN VARCHAR2,
131 		 	    	 itemkey	IN VARCHAR2,
132 			    	 actid		IN NUMBER,
133 			    	 funcmode	IN VARCHAR2,
134 			    	 result		IN OUT NOCOPY VARCHAR2);
135 
136 -- VoteForResultType
137 --     Standard Voting Function
138 -- IN
139 --   itemtype  - A valid item type from (WF_ITEM_TYPES table).
140 --   itemkey   - A string generated from the application object's primary key.
141 --   actid     - The process activity(instance id).
142 --   funcmode  - Run/Cancel
143 -- OUT
144 --   result    -
145 -- ACTIVITY ATTRIBUTES REFERENCED
146 --      VOTING_OPTION
147 --          - WAIT_FOR_ALL_VOTES  - Evaluate voting after all votes are cast
148 --                                - or a Timeout condition closes the voting
149 --                                - polls.  When a Timeout occurs the
150 --                                - voting percentages are calculated as a
151 --                                - percentage ofvotes cast.
152 --
153 --          - REQUIRE_ALL_VOTES   - Evaluate voting after all votes are cast.
154 --                                - If a Timeout occurs and all votes have not
155 --                                - been cast then the standard timeout
156 --                                - transition is taken.  Votes are calculated
157 --                                - as a percenatage of users notified to vote.
158 --
159 --          - TALLY_ON_EVERY_VOTE - Evaluate voting after every vote or a
160 --                                - Timeout condition closes the voting polls.
161 --                                - After every vote voting percentages are
162 --                                - calculated as a percentage of user notified
163 --                                - to vote.  After a timeout voting
164 --                                - percentages are calculated as a percentage
165 --                                - of votes cast.
166 --
167 --      "One attribute for each of the activities result type codes"
168 --
169 --          - The standard Activity VOTEFORRESULTTYPE has the WFSTD_YES_NO
170 --          - result type assigned.
171 --          - Thefore activity has two activity attributes.
172 --
173 --                  Y       - Percenatage required for Yes transition
174 --                  N       - Percentage required for No transition
175 --
176 procedure VoteForResultType(    itemtype   in varchar2,
177                                 itemkey    in varchar2,
178                                 actid      in number,
179                                 funcmode   in varchar2,
180                                 resultout  in out nocopy varchar2);
181 
182 -- PROCEDURE CLOSE_AND_ACK_ERES_DOC
183 --
184 -- This procedure will closed and Acknowledge ERES document once completed
185 --
186 --
187 
188    PROCEDURE CLOSE_AND_ACK_ERES_DOC  (p_itemtype   IN VARCHAR2,
189       	                              p_itemkey    IN VARCHAR2,
190       	                              p_actid      IN NUMBER,
191                                       p_funcmode   IN VARCHAR2,
192                                       p_resultout  OUT NOCOPY VARCHAR2
193   );
194 
195 
196 
197 END ENG_WORKFLOW_API_PKG;