1 package hr_workflow_utility as
2 /* $Header: hrewuweb.pkh 120.1 2005/09/23 14:56:34 svittal noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-------------------------< item_attribute_exists >------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This function returns a TRUE if the specified item attribute name for the
11 -- specified item type and key exists. Otherwise a FALSE value is returned.
12 --
13 -- Pre-Requisities:
14 -- None.
15 --
16 -- In Parameters:
17 -- p_item_type -> The internal name for the item type.
18 -- p_item_key -> A string that represents a primary key generated by the
19 -- application for the item type. The string uniquely
20 -- identifies the item within an item type.
21 -- p_name -> The item attribute name.
22 --
23 -- Post Success:
24 -- If the item attribute exists then a TRUE value is returned.
25 -- If the item attribute does not exist then a FALSE value is returned.
26 --
27 -- Post Failure:
28 -- None.
29 --
30 -- Developer Implementation Notes:
31 -- None
32 --
33 -- Access Status:
34 -- Internal Development Use Only.
35 --
36 -- {End Of Comments}
37 -- ----------------------------------------------------------------------------
38 function item_attribute_exists
39 (p_item_type in varchar2
40 ,p_item_key in varchar2
41 ,p_name in varchar2) return boolean;
42 -- -----------------------------------------------------------
43 -- ----------------------------------------------------------------
44 -- |-----------------< workflow_transition >-----------------------|
45 -- ----------------------------------------------------------------
46 --
47 -- Description:
48 -- For a given activity this procedure completes that activity and
49 -- causes workflow to transition to the next activity.
50 -- Pre Conditions:
51 -- None
52 --
53 -- In Arguments:
54 -- p_result Result of the activity
55 -- p_item_type A valid item type. Item types are defined in the
56 -- Workflow Designer.
57 -- p_item_key A string derived from the application object's primary
58 -- key. The string uniquely identifies the item within an
59 -- item type. The item type and key together identify the
60 -- new process and must be passed to all subsequent API
61 -- calls for that process
62 -- p_actid The activity identifier
63 --
64 -- Post Success:
65 -- The procedure has no output
66 --
67 -- Post Failure:
68 -- Exceptions are not handled, just raised.
69 --
70 -- Developer Implementation Notes:
71 -- None
72 --
73 -- Access Status:
74 -- Public
75 --
76 -- {End Of Comments}
77 -- --------------------------------------------------------------------------
78 PROCEDURE workflow_transition
79 (p_result IN varchar2
80 ,p_item_type IN wf_items.item_type%TYPE
81 ,p_item_key IN wf_items.item_key%TYPE
82 ,p_actid IN wf_process_activities.instance_id%TYPE);
83 -- ----------------------------------------------------------------
84 -- |-----------------< get_current_activity_details >--------------|
85 -- ----------------------------------------------------------------
86 --
87 -- Description:
88 -- For a given item this procedure returns a set of details about the
89 -- current activity that the item is on. This is done by detecting
90 -- the activity which is currently in a notified state for that item.
91 -- Pre Conditions:
92 -- None
93 --
94 -- In Arguments:
95 -- p_item_type A valid item type. Item types are defined in the
96 -- Workflow Designer.
97 -- p_item_key A string derived from the application object's primary
98 -- key. The string uniquely identifies the item within an
99 -- item type. The item type and key together identify the
100 -- new process and must be passed to all subsequent API
101 -- calls for that process
102 --
103 -- Post Success:
104 -- p_actid The activity identifier of the current activity
105 -- p_display_name The display name of the current activity
106 -- p_function The function of the current activity
107 --
108 -- Post Failure:
109 -- Exceptions are not handled, just raised.
110 --
111 -- Developer Implementation Notes:
112 -- None
113 --
114 --
115 -- Access Status:
116 -- Public
117 --
118 -- {END Of Comments}
119 -- --------------------------------------------------------------------------
120 -- --------------------------------------------------------------
121 -- |-----------------< get_activity_instance_label >-------------|
122 -- --------------------------------------------------------------
123 --
124 -- Description:
125 -- For a given activity instance the procedure will return the activity
126 -- instance_label as stored in workflow
127 -- Pre Conditions:
128 -- None
129 --
130 -- In Arguments:
131 -- p_actid The activity identifier
132 --
133 -- Post Success:
134 -- returns the value of instance label for the given activity
135 --
136 -- Post Failure:
137 -- Exceptions are not handled, just raised.
138 --
139 -- Developer Implementation Notes:
140 -- None
141 --
142 -- Access Status:
143 -- Public
144 --
145 -- {END Of Comments}
146 -- --------------------------------------------------------------------------
147 FUNCTION get_activity_instance_label
148 (p_actid IN wf_process_activities.instance_id%TYPE)
149 RETURN wf_process_activities.instance_label%type;
150 END hr_workflow_utility;