1 PACKAGE ASP_ALERT_ENGINE as
2 /* $Header: aspaengs.pls 120.1 2005/08/19 12:58 axavier noship $ */
3 ---------------------------------------------------------------------------
4 -- Package Name: ASP_ALERT_ENGINE
5 ---------------------------------------------------------------------------
6 -- Description:
7 -- Core Alert Engine Package for Sales Alerts Backend Workflow Processing.
8 -- This package is used by the workflow activity nodes.
9 --
10 -- Procedures:
11 -- (see below for specification)
12 --
13 -- History:
14 -- 08-Aug-2005 axavier created.
15 ---------------------------------------------------------------------------
16
17 /*-------------------------------------------------------------------------*
18 | Public Constants
19 *-------------------------------------------------------------------------*/
20
21 /*-------------------------------------------------------------------------*
22 | Public Datatypes
23 *-------------------------------------------------------------------------*/
24
25 /*-------------------------------------------------------------------------*
26 | Public Variables
27 *-------------------------------------------------------------------------*/
28
29 /*-------------------------------------------------------------------------*
30 | Public Routines
31 *-------------------------------------------------------------------------*/
32
33 --------------------------------------------------------------------------------
34 --
35 -- Procedure: Get_Alert_Agent
36 -- This is a factory method, which produces appropriate agents based on the
37 -- Alert Types.
38 --
39 -- Arguments IN/OUT:
40 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
41 -- itemkey - A string generated from the application object's primary key.
42 -- actid - The function activity(instance id).
43 -- funcmode - function execution mode. This is set by the engine
44 -- as either 'RUN', 'CANCEL', 'TIMEOUT'
45 -- resultout -
46 -- ORDER_ALERT_AGENT if Alert is related to Order
47 -- SVCCONTRACT_ALERT_AGENT if Alert is related to Service Contract
48 -- INVOICE_ALERT_AGENT if Alert is related to Invoice
49 -- SERVICE_ALERT_AGENT if Alert is related to Service
50 -- CUSTOM if Alert is not supported out of the box.
51 -- Custom Agent to process the request.
52 --
53 --------------------------------------------------------------------------------
54
55 PROCEDURE Get_Alert_Agent(
56 itemtype in VARCHAR2,
57 itemkey in VARCHAR2,
58 actid in NUMBER,
59 funcmode in VARCHAR2,
60 resultout in out NOCOPY VARCHAR2);
61
62 --------------------------------------------------------------------------------
63 --
64 -- Procedure: Get_Content_Provider
65 -- This is a factory method, which produces appropriate providers based on the
66 -- Alert Types.
67 --
68 -- Arguments IN/OUT:
69 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
70 -- itemkey - A string generated from the application object's primary key.
71 -- actid - The function activity(instance id).
72 -- funcmode - function execution mode. This is set by the engine
73 -- as either 'RUN', 'CANCEL', 'TIMEOUT'
74 -- resultout -
75 -- ORDER_CONTENT_PROVIDER if Alert is related to Order
76 -- SVCCONTRACT_CONTENT_PROVIDER if Alert is related to Service Contract
77 -- INVOICE_CONTENT_PROVIDER if Alert is related to Invoice
78 -- SERVICE_CONTENT_PROVIDER if Alert is related to Service
79 -- CUSTOM if Alert is not supported out of the box.
80 -- Custom Provider to process the request.
81 --
82 --------------------------------------------------------------------------------
83
84 PROCEDURE Get_Content_Provider(
85 itemtype in VARCHAR2,
86 itemkey in VARCHAR2,
87 actid in NUMBER,
88 funcmode in VARCHAR2,
89 resultout in out NOCOPY VARCHAR2);
90
91
92 --------------------------------------------------------------------------------
93 --
94 -- Procedure: Get_Delivery_Agent
95 -- This is a factory method, which produces appropriate agents based on the
96 -- Alert Types.
97 --
98 -- Arguments IN/OUT:
99 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
100 -- itemkey - A string generated from the application object's primary key.
101 -- actid - The function activity(instance id).
102 -- funcmode - function execution mode. This is set by the engine
103 -- as either 'RUN', 'CANCEL', 'TIMEOUT'
104 -- resultout -
105 -- ASP_DELIVERY_AGENT if Alert is related to Order, Service Contract,
106 -- Invoice, and Service Request.
107 -- CUSTOM if Alert is not supported out of the box.
108 -- Custom Agent to process the request.
109 --
110 --------------------------------------------------------------------------------
111
112 PROCEDURE Get_Delivery_Agent(
113 itemtype in VARCHAR2,
114 itemkey in VARCHAR2,
115 actid in NUMBER,
116 funcmode in VARCHAR2,
117 resultout in out NOCOPY VARCHAR2);
118
119
120 --------------------------------------------------------------------------------
121 --
122 -- Procedure: NOOP
123 -- This is a No Operation method, which does nothing. This is the mathod call
124 -- associated with the Custom Activity Node, that the end customer would use for
125 -- extensibility.
126 --
127 -- Arguments IN/OUT:
128 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
129 -- itemkey - A string generated from the application object's primary key.
130 -- actid - The function activity(instance id).
131 -- funcmode - function execution mode. This is set by the engine
132 -- as either 'RUN', 'CANCEL', 'TIMEOUT'
133 -- resultout - NULL
134 --
135 --
136 --------------------------------------------------------------------------------
137
138 PROCEDURE NOOP(
139 itemtype in VARCHAR2,
140 itemkey in VARCHAR2,
141 actid in NUMBER,
142 funcmode in VARCHAR2,
143 resultout in out NOCOPY VARCHAR2);
144
145 ------------------------------------------------------------------------------
146 -- Alerts_Selector
147 -- This procedure sets up the responsibility and organization context for
148 -- multi-org sensitive code.
149 ------------------------------------------------------------------------------
150
151 PROCEDURE Alerts_Selector(
152 itemtype IN VARCHAR2,
153 itemkey IN VARCHAR2,
154 actid IN NUMBER,
155 funcmode IN VARCHAR2,
156 resultout OUT NOCOPY VARCHAR2);
157
158 END ASP_ALERT_ENGINE;