DBA Data[Home] [Help]

PACKAGE BODY: APPS.WF_BES_DYN_FUNCS

Source


1 package body WF_BES_DYN_FUNCS as
2 /* $Header: WFBESDFNB.pls 120.2 2005/07/02 08:18:36 appldev noship $ */
3 
4 
5 --
6 -- Generate
7 PROCEDURE Generate(p_func_name in varchar2,
8                   p_event_name in varchar2,
9                   p_event_key in varchar2,
10                   p_parameter_list in wf_parameter_list_t,
11                   x_msg      in out nocopy clob,
12                   x_executed  out nocopy boolean)
13 
14 is
15    l_func_name VARCHAR2(240);
16 begin
17    l_func_name := upper(p_func_name);
18    if (l_func_name = 'WF_XML.GENERATE') then --<rwunderl:2769455>
19       x_msg := WF_XML.Generate(p_event_name, p_event_key, p_parameter_list);
20       x_executed := TRUE;
21    else
22       x_msg := null;
23       x_executed := FALSE;
24    end if;
25 end Generate;
26 
27 --
28 -- Rule Function
29 PROCEDURE RuleFunction(p_func_name in varchar2,
30                       p_subscription_guid in     raw,
31                       p_event             in out nocopy wf_event_t,
32                       x_result            in out nocopy varchar2,
33                       x_executed          out nocopy boolean)
34 
35 is
36   l_func_name VARCHAR2(240);
37 begin
38   l_func_name := upper(l_func_name);
39   if (l_func_name = 'WF_RULE.DEFAULT_RULE') then
40     x_result := wf_rule.default_rule(p_subscription_guid, p_event);
41     x_executed := TRUE;
42   elsif (l_func_name = 'WF_RULE.DEFAULT_RULE2') then
43     x_result := wf_rule.default_rule2(p_subscription_guid, p_event);
44     x_executed := TRUE;
45   elsif (l_func_name = 'WF_RULE.DEFAULT_RULE3') then
46     x_result := wf_rule.default_rule3(p_subscription_guid, p_event);
47     x_executed := TRUE;
48   elsif (l_func_name = 'WF_RULE.INSTANCE_DEFAULT_RULE') then
49     x_result := wf_rule.instance_default_rule(p_subscription_guid, p_event);
50     x_executed := TRUE;
51   elsif (l_func_name = 'WF_RULE.ERROR_RULE') then
52     x_result := wf_rule.error_rule(p_subscription_guid, p_event);
53     x_executed := TRUE;
54   elsif (l_func_name = 'WF_RULE.SETPARAMETERSINTOPARAMETERLIST') then
55     x_result := wf_rule.setparametersintoparameterlist(p_subscription_guid, p_event);
56     x_executed := TRUE;
57   elsif (l_func_name = 'WF_RULE.SUCCESS') then
58     x_result := wf_rule.success(p_subscription_guid, p_event);
59     x_executed := TRUE;
60   elsif (l_func_name = 'WF_RULE.WORKFLOW_PROTOCOL') then
61     x_result := wf_rule.workflow_protocol(p_subscription_guid, p_event);
62     x_executed := TRUE;
63   elsif (l_func_name = 'WF_XML.ERROR_RULE') then
64     x_result := wf_xml.error_rule(p_subscription_guid, p_event);
65     x_executed := TRUE;
66   elsif (l_func_name = 'WF_XML.RECEIVE') then
67     x_result := wf_xml.receive(p_subscription_guid, p_event);
68     x_executed := TRUE;
69   elsif (l_func_name = 'WF_XML.SENDNOTIFICATION') then
70     x_result := wf_xml.sendnotification(p_subscription_guid, p_event);
71     x_executed := TRUE;
72   elsif (l_func_name = 'WF_XML.SUMMARYRULE') then
73     x_result := wf_xml.summaryrule(p_subscription_guid, p_event);
74     x_executed := TRUE;
75   else
76     x_result := null;
77     x_executed := FALSE;
78   end if;
79 end RuleFunction;
80 
81 end WF_BES_DYN_FUNCS;