DBA Data[Home] [Help]

PACKAGE: APPS.AS_LEAD_ASSIGN_WF

Source


1 package AS_LEAD_ASSIGN_WF AUTHID CURRENT_USER AS
2 /* $Header: asxlasns.pls 115.2 2002/11/06 00:43:06 appldev ship $ */
3 
4 -- Start of Comments
5 -- Package name     : AS_LEAD_ASSIGN_WF
6 -- Purpose          : Sales Leads Assignment Workflow Code
7 -- NOTE             :
8 -- History          :
9 -- END of Comments
10 
11 
12 -- PROCEDURE StartProcess
13 --
14 -- StartProcess is called to start the structured inbound workflow process.
15 -- Assigns attributes such as message ID, message size, sender name, domain
16 -- name, user id , pwd and priority.  Creates and kicks of the workflow.
17 --
18 -- IN
19 --   sales_lead_id - unique identifier of the sales lead.
20 -- OUT
21 --
22 -- None
23 
24 PROCEDURE StartProcess(
25     p_sales_lead_id             in  INTEGER,
26     p_assigned_resource_id      in  INTEGER,
27     x_return_status     in      out VARCHAR2,
28     x_item_type                 out VARCHAR2,
29     x_item_key                  out VARCHAR2
30     );
31 
32 
33 -- PROCEDURE CheckAssignID
34 --
35 -- Checks to see if the inbound sales lead has an ID assigned to it.
36 --
37 -- IN
38 --   itemtype  - type of the current item
39 --   itemkey   - key of the current item
40 --   actid     - process activity instance id
41 --   funcmode  - function execution mode.
42 --               Set by the engine as either 'RUN', 'CANCEL', or 'TIMEOUT'
43 -- OUT
44 -- result:
45 --   COMPLETE[:<result>] - activity has completed with the indicated result
46 --   WAITING - activity is waiting for additional transitions
47 --   DEFERED - execution should be defered to background
48 --   NOTIFIED[:<notification_id>:<assigned_user>] -
49 --          activity has notified an external entity that this
50 --          step must be performed.  A call to wf_engine.CompleteActivty
51 --          will signal when this step is complete.  Optional
52 --          return of notification ID and assigned user.
53 --   ERROR[:<error_code>] - function encountered an error.
54 -- None
55 
56 PROCEDURE CheckAssignID(
57     itemtype                   in VARCHAR2,
58     itemkey                    in VARCHAR2,
59     actid                      in NUMBER,
60     funcmode                   in VARCHAR2,
61     result                     out VARCHAR2
62     );
63 
64 
65 -- PROCEDURE AssignLead
66 --
67 -- Assigns sales lead to given resource id
68 --
69 -- IN
70 --   itemtype  - type of the current item
71 --   itemkey   - key of the current item
72 --   actid     - process activity instance id
73 --   funcmode  - function execution mode.
74 --               Set by the engine as either 'RUN', 'CANCEL', or 'TIMEOUT'
75 -- OUT
76 -- result
77 --   COMPLETE[:<result>] - activity has completed with the indicated result
78 --   WAITING - activity is waiting for additional transitions
79 --   DEFERED - execution should be defered to background
80 --   NOTIFIED[:<notification_id>:<assigned_user>] -
81 --          activity has notified an external entity that this
82 --          step must be performed.  A call to wf_engine.CompleteActivty
83 --          will signal when this step is complete.  Optional
84 --          return of notification ID and assigned user.
85 --   ERROR[:<error_code>] -  function encountered an error.
86 -- None
87 
88 PROCEDURE AssignLead (
89     itemtype                  in VARCHAR2,
90     itemkey                   in VARCHAR2,
91     actid                     in NUMBER,
92     funcmode                  in VARCHAR2,
93     result                    out VARCHAR2 );
94 
95 
96 -- PROCEDURE GetAcceptTime
97 --
98 -- Retrieves time to wait for sales lead acceptance
99 --
100 -- IN
101 --   itemtype  - type of the current item
102 --   itemkey   - key of the current item
103 --   actid     - process activity instance id
104 --   funcmode  - function execution mode.
105 --               Set by the engine as either 'RUN', 'CANCEL', or 'TIMEOUT'
106 -- OUT
107 -- result
108 -- COMPLETE[:<result>] - activity has completed with the indicated result
109 --   WAITING - activity is waiting for additional transitions
110 --   DEFERED - execution should be defered to background
111 --   NOTIFIED[:<notification_id>:<assigned_user>] -
112 --          activity has notified an external entity that this
113 --          step must be performed.  A call to wf_engine.CompleteActivty
114 --          will signal when this step is complete.  Optional
115 --          return of notification ID and assigned user.
116 --   ERROR[:<error_code>] - function encountered an error.
117 -- None
118 
119 PROCEDURE GetAcceptTime (
120     itemtype                   in VARCHAR2,
121     itemkey                    in VARCHAR2,
122     actid                      in NUMBER,
123     funcmode                   in VARCHAR2,
124     result                     out VARCHAR2
125     );
126 
127 
128 -- PROCEDURE CheckAccepted
129 --
130 -- Checks to see if sales lead has been accepted
131 --
132 -- IN
133 --   itemtype  - type of the current item
134 --   itemkey   - key of the current item
135 --   actid     - process activity instance id
136 --   funcmode  - function execution mode.
137 --               Set by the engine as either 'RUN', 'CANCEL', or 'TIMEOUT'
138 -- OUT
139 -- result
140 --   COMPLETE[:<result>] - activity has completed with the indicated result
141 --   WAITING - activity is waiting for additional transitions
142 --   DEFERED - execution should be defered to background
143 --   NOTIFIED[:<notification_id>:<assigned_user>] -
144 --          activity has notified an external entity that this
145 --          step must be performed.  A call to wf_engine.CompleteActivty
146 --          will signal when this step is complete.  Optional
147 --          return of notification ID and assigned user.
148 --   ERROR[:<error_code>] - function encountered an error.
149 -- None
150 
151 PROCEDURE CheckAccepted (
152     itemtype                   in VARCHAR2,
153     itemkey                    in VARCHAR2,
154     actid                      in NUMBER,
155     funcmode                   in VARCHAR2,
156     result                     out VARCHAR2
157     );
158 
159 
160 -- PROCEDURE CheckforAbandon
161 --
162 -- Determines if the action for not accepting a sales lead = to abandon it
163 --
164 -- IN
165 --   itemtype  - type of the current item
166 --   itemkey   - key of the current item
167 --   actid     - process activity instance id
168 --   funcmode  - function execution mode.
169 --               Set by the engine as either 'RUN', 'CANCEL', or 'TIMEOUT'
170 -- OUT
171 -- result
172 --   COMPLETE[:<result>] - activity has completed with the indicated result
173 --   WAITING - activity is waiting for additional transitions
174 --   DEFERED - execution should be defered to background
175 --   NOTIFIED[:<notification_id>:<assigned_user>] -
176 --          activity has notified an external entity that this
177 --          step must be performed.  A call to wf_engine.CompleteActivty
178 --          will signal when this step is complete.  Optional
179 --          return of notification ID and assigned user.
180 --   ERROR[:<error_code>] - function encountered an error.
181 -- None
182 
183 PROCEDURE CheckforAbandon (
184     itemtype                   in VARCHAR2,
185     itemkey                    in VARCHAR2,
186     actid                      in NUMBER,
187     funcmode                   in VARCHAR2,
188     result                     out VARCHAR2
189     );
190 
191 END AS_LEAD_ASSIGN_WF ;