DBA Data[Home] [Help]

PACKAGE: APPS.FND_WF_SYNCH

Source


1 package FND_WF_SYNCH AUTHID CURRENT_USER as
2 /* $Header: AFWFSYNS.pls 120.1 2005/07/02 04:22:48 appldev noship $ */
3 
4 
5 
6 
7 --    The purpose of this package is to synchronize
8 --    FND_USER or FND_RESPONSIBILITY or FND_USER_RESP_GROUPS
9 --    table with wf tables WF_LOCAL_USERS, WF_LOCAL_ROLES,
10 --    WF_LOCAL_USER_ROLES by propagating the changes there.
11 
12 --    WARNING!!! Procedures in this package are ONLY meant to be
13 --      called from either table handlers FND_USER_PKG,
14 --      FND_RESPONSIBILITY_PKG or from the FND forms interface.
15 --      The procedures here trust that the input parameters have
16 --      already been validated by the calling procedures, and won't
17 --      do any more validation. You risk putting corrupt data
18 --      in workflow directory services tables if you call these procedures
19 --      outside of the above mentioned places.
20 
21 
22 
23 
24 -- notify workflow of event (UPDATE of a row in FND_USER)
25 -- to synchronize with workflow directory services table wf_local_users
26 -- known source:
27 -- NOTE: we need the old_employeeId before the update because need to
28 -- do some clean-up in the workflow directory tables when fnd_user is
29 -- linked to a different person, newly linked
30 -- to a person, or unlinked from a person based on the employee_id
31 procedure propagateUserUpdate
32 ( userId in number,
33   userName in varchar2,
34   employeeId in number,
35   description in varchar2,
36   emailAddress in varchar2,
37   fax in varchar2,
38   startDate in date,
39   endDate in date,
40   old_employeeId in number);
41 
42 
43 -- notify workflow of event (INSERT to FND_USER)
44 -- to synchronize with workflow directory services table wf_local_users
45 -- known source:
46 procedure propagateUserInsert
47 ( userId in number,
48   userName in varchar2,
49   employeeId in number,
50   description in varchar2,
51   emailAddress in varchar2,
52   fax in varchar2,
53   startDate in date,
54   endDate in date);
55 
56 
57 -- notify workflow of event (UPDATE of end_date in FND_USER)
58 -- to synchronize with workflow directory services table wf_local_users
59 -- known source: FND_USER_PKG.disableUser
60 -- NOTE: This procedure should be called when ONLY the end_date is updated.
61 -- Otherwise, propagateUserUpdate should be called instead.
62 procedure propagateUserDisable
63 ( old_userName in varchar2);
64 
65 
66 -- notify workflow of event (INSERT or UPDATE to FND_USER_RESP_GROUPS)
67 -- to synchronize with workflow directory services table wf_local_user_roles
68 -- known source:in the fnd_user_pkg.AddResp
69 -- this covers both the insert and update case;
70 -- wf_dir_trigger.insertUserRole will first tries to update and if
71 -- no row found, will do an insert
72 procedure propagateUserRespInsert(
73 userId in number,
74 responsibilityId in number,
75 respApplId in number, -- RESPONSIBILITY_APPLICATION_ID
76 startDate in date,
77 endDate in date);
78 
79 procedure propagateUserRespUpdate(
80 userId in number,
81 responsibilityId in number,
82 respApplId in number, -- RESPONSIBILITY_APPLICATION_ID
83 startDate in date,
84 endDate in date);
85 
86 
87 -- notify workflow of event (DELETE from FND_USER_RESP_GROUPS)
88 -- to synchronize with workflow directory services table wf_local_user_roles
89 -- known source:in the fnd_user_pkg.DelResp
90 procedure propagateUserRespDelete(
91 userId in number,
92 responsibilityId in number,
93 respApplId in number -- RESPONSIBILITY_APPLICATION_ID
94 );
95 
96 
97 -- notify workflow of event (INSERT to FND_RESPONSIBILITY)
98 -- to synchronize with workflow directory services table wf_local_roles
99 -- known source: in fnd_responsibility_pkg.INSERT_ROW
100 procedure propagateRespInsert(
101 applicationId in number,
102 responsibilityId in number,
103 responsibilityName in varchar2,
104 description in varchar2,
105 start_date in date,
106 end_date in date);
107 
108 -- notify workflow of event (UPDATE to FND_RESPONSIBILITY/FND_RESPONSIBILITY_TL)
109 -- to synchronize with workflow directory services table wf_local_roles
110 -- known source: in fnd_responsibility_pkg.UPDATE_ROW
111 -- NOTE that change will only be propagated to wf table when userenv('LANG')
112 -- is same as base language. This is because wf local tables are not TL'd,
113 -- so we can only keep one row based on the base language.
114 procedure propagateRespUpdate(
115 applicationId in number,
116 responsibilityId in number,
117 responsibilityName in varchar2,
118 description in varchar2,
119 start_date in date,
120 end_date in date);
121 
122 
123 -- notify workflow of event (UPDATE to FND_RESPONSIBILITY/FND_RESPONSIBILITY_TL)
124 -- to synchronize with workflow directory services table wf_local_roles
125 -- known source: in fnd_responsibility_pkg.TRANSLATE_ROW
126 -- NOTE that change will only be propagated to wf table when userenv('LANG')
127 -- is same as base language. This is because wf local tables are not TL'd,
128 -- so we can only keep one row based on the base language.
129 -- need this special version of propagetRespUpdate because
130 -- fnd_responsibility_pkg.TRANSLATE_ROW keeps the old value of
131 -- responsibility_name and description column if new value is null,
132 -- therefore, we cannot just update based on the passed in value, but
133 -- need to requery to get back actual value after the update
134 procedure propagateRespUpdate(
135 applicationId in number,
136 responsibilityId in number);
137 
138 
139 -- notify workflow of event (DELETE from FND_RESPONSIBILITY)
140 -- to synchronize with workflow directory services table wf_local_roles
141 -- known source: in fnd_responsibility_pkg.DELETE_ROW
142 procedure propagateRespDelete(
143 applicationId in number,
144 responsibilityId in number);
145 
146 
147 --
148 -- This procedure is to be called by LOAD_RAW, UpdateUser and
149 -- LoadUser procedures in FND_USER_PKG to synchronize workflow
150 -- directory services table wf_local_roles. This should be called
151 -- AFTER the update to fnd_user table, so we just requery to get
152 -- all the values we need for workflow synchronization.
153 procedure synchFndUser(userName in varchar2,
157 );
154    old_employeeId in number -- employee_id before the update.
155        -- this is important since we need to determine if there
156        -- would be a change in orig_system and orig_system_id
158 
159 end FND_WF_SYNCH;