576: p_creationDate => sysdate, /*Bug3626390 sysdate*/
577: p_lastUpdatedate=> sysdate,
578: p_assignmentReason=>description);
579:
580: wf_event.raise('oracle.apps.fnd.security.user.assignment.change',
581: Insert_Assignment.user_id||':'||
582: Insert_Assignment.responsibility_id,
583: null, null);
584: --we have to raise a differnt event as for USER_INFO_CACHE
582: Insert_Assignment.responsibility_id,
583: null, null);
584: --we have to raise a differnt event as for USER_INFO_CACHE
585: --the key should be just the user_id
586: wf_event.addparametertolist(p_name => 'FND_USER_ID',
587: p_value => Insert_Assignment.user_id,
588: p_parameterlist => l_parameters);
589:
590: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
586: wf_event.addparametertolist(p_name => 'FND_USER_ID',
587: p_value => Insert_Assignment.user_id,
588: p_parameterlist => l_parameters);
589:
590: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
591: p_value => Insert_Assignment.responsibility_id,
592: p_parameterlist => l_parameters);
593:
594: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
590: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
591: p_value => Insert_Assignment.responsibility_id,
592: p_parameterlist => l_parameters);
593:
594: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
595: p_value => appsname,
596: p_parameterlist => l_parameters);
597:
598: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
594: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
595: p_value => appsname,
596: p_parameterlist => l_parameters);
597:
598: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
599: p_value => Insert_Assignment.responsibility_application_id,
600: p_parameterlist => l_parameters);
601:
602: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.insert',
598: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
599: p_value => Insert_Assignment.responsibility_application_id,
600: p_parameterlist => l_parameters);
601:
602: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.insert',
603: p_event_key => to_char(Insert_Assignment.user_id)||':'||to_char(Insert_Assignment.responsibility_id)||':'||appsname||':'||to_char(Insert_Assignment.responsibility_application_id),
604: p_event_data => NULL,
605: p_parameters => l_parameters,
606: p_send_date => Sysdate);
801: p_assignmentReason=>description,
802: p_updatewho => l_update_who); -- Bug5467610
803:
804:
805: wf_event.raise('oracle.apps.fnd.security.user.assignment.change',
806: Update_Assignment.user_id||':'||
807: Update_Assignment.responsibility_id,
808: null, null);
809: --Raise the invalidation event attached to the USER_INFO_CACHE
809: --Raise the invalidation event attached to the USER_INFO_CACHE
810: --(ideally this should be done by the wf API once the propagation
811: --has been sucessful) / or if they are not doing it then we should attach
812: --our business event to the CACHE as we do not really know what
813: --subscriptions are attcahed to the wf event.
814: --o.k putting our event (but we need to change the b3664848.ldt
815: --and the event-subscription file to attach this event to the
816: --bes control group.
817: wf_event.addparametertolist(p_name => 'FND_USER_ID',
813: --subscriptions are attcahed to the wf event.
814: --o.k putting our event (but we need to change the b3664848.ldt
815: --and the event-subscription file to attach this event to the
816: --bes control group.
817: wf_event.addparametertolist(p_name => 'FND_USER_ID',
818: p_value => Update_Assignment.user_id,
819: p_parameterlist => l_parameters);
820:
821: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
817: wf_event.addparametertolist(p_name => 'FND_USER_ID',
818: p_value => Update_Assignment.user_id,
819: p_parameterlist => l_parameters);
820:
821: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
822: p_value => Update_Assignment.responsibility_id,
823: p_parameterlist => l_parameters);
824:
825: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
821: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_ID',
822: p_value => Update_Assignment.responsibility_id,
823: p_parameterlist => l_parameters);
824:
825: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
826: p_value => appsname,
827: p_parameterlist => l_parameters);
828:
829: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
825: wf_event.addparametertolist(p_name => 'FND_APPS_SHORT_NAME',
826: p_value => appsname,
827: p_parameterlist => l_parameters);
828:
829: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
830: p_value => Update_Assignment.responsibility_application_id,
831: p_parameterlist => l_parameters);
832:
833: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.update',
829: wf_event.addparametertolist(p_name => 'FND_RESPONSIBILITY_APPS_ID',
830: p_value => Update_Assignment.responsibility_application_id,
831: p_parameterlist => l_parameters);
832:
833: wf_event.raise(p_event_name => 'oracle.apps.fnd.user.role.update',
834: p_event_key => to_char(Update_Assignment.user_id)||':'||to_char(Update_Assignment.responsibility_id)||':'||appsname||':'||to_char(Update_Assignment.responsibility_application_id),
835: p_event_data => NULL,
836: p_parameters => l_parameters,
837: p_send_date => Sysdate);
1190: -- Insert or update role in workflow.
1191: -- Need to do this even if role already exists, to update
1192: -- attribute values.
1193: wf_parameters := NULL;
1194: wf_event.AddParameterToList('USER_NAME',
1195: role_name , wf_parameters);
1196: if(secgrpkey = 'STANDARD') then
1197: role_display_name := resp_name;
1198: else
1198: else
1199: role_display_name := resp_name||':'||secgrp_name;
1200: end if;
1201:
1202: wf_event.AddParameterToList('DISPLAYNAME',
1203: role_display_name, wf_parameters);
1204: wf_event.AddParameterToList('DESCRIPTION',
1205: descr, wf_parameters);
1206: wf_event.AddParameterToList('OWNER_TAG',
1200: end if;
1201:
1202: wf_event.AddParameterToList('DISPLAYNAME',
1203: role_display_name, wf_parameters);
1204: wf_event.AddParameterToList('DESCRIPTION',
1205: descr, wf_parameters);
1206: wf_event.AddParameterToList('OWNER_TAG',
1207: applsname, wf_parameters);
1208: wf_event.AddParameterToList('RAISEERRORS',
1202: wf_event.AddParameterToList('DISPLAYNAME',
1203: role_display_name, wf_parameters);
1204: wf_event.AddParameterToList('DESCRIPTION',
1205: descr, wf_parameters);
1206: wf_event.AddParameterToList('OWNER_TAG',
1207: applsname, wf_parameters);
1208: wf_event.AddParameterToList('RAISEERRORS',
1209: 'TRUE', wf_parameters);
1210:
1204: wf_event.AddParameterToList('DESCRIPTION',
1205: descr, wf_parameters);
1206: wf_event.AddParameterToList('OWNER_TAG',
1207: applsname, wf_parameters);
1208: wf_event.AddParameterToList('RAISEERRORS',
1209: 'TRUE', wf_parameters);
1210:
1211: -- Bug4507634 added WFSYNCH_OVERWRITE and ORCLISENABLED parameters.
1212:
1209: 'TRUE', wf_parameters);
1210:
1211: -- Bug4507634 added WFSYNCH_OVERWRITE and ORCLISENABLED parameters.
1212:
1213: wf_event.AddParameterToList('WFSYNCH_OVERWRITE',
1214: 'TRUE', wf_parameters);
1215: if ((my_exp is null) OR
1216: (trunc(sysdate) between my_start and my_exp)) then
1217: wf_event.AddParameterToList('ORCLISENABLED', 'ACTIVE', wf_parameters);
1213: wf_event.AddParameterToList('WFSYNCH_OVERWRITE',
1214: 'TRUE', wf_parameters);
1215: if ((my_exp is null) OR
1216: (trunc(sysdate) between my_start and my_exp)) then
1217: wf_event.AddParameterToList('ORCLISENABLED', 'ACTIVE', wf_parameters);
1218: else
1219: wf_event.AddParameterToList('ORCLISENABLED', 'INACTIVE', wf_parameters);
1220: end if;
1221:
1215: if ((my_exp is null) OR
1216: (trunc(sysdate) between my_start and my_exp)) then
1217: wf_event.AddParameterToList('ORCLISENABLED', 'ACTIVE', wf_parameters);
1218: else
1219: wf_event.AddParameterToList('ORCLISENABLED', 'INACTIVE', wf_parameters);
1220: end if;
1221:
1222: -- Bug4864465 Adding the WHO column values to be propagated.
1223:
1220: end if;
1221:
1222: -- Bug4864465 Adding the WHO column values to be propagated.
1223:
1224: wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
1225:
1226: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1227:
1228: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1224: wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
1225:
1226: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1227:
1228: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1229: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask),wf_parameters);
1230: wf_event.AddParameterToList('CREATED_BY',my_createdby,wf_parameters);
1231:
1232: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1226: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1227:
1228: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1229: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask),wf_parameters);
1230: wf_event.AddParameterToList('CREATED_BY',my_createdby,wf_parameters);
1231:
1232: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1233:
1234: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1230: wf_event.AddParameterToList('CREATED_BY',my_createdby,wf_parameters);
1231:
1232: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1233:
1234: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1235: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1236: my_lastupdatelogin,wf_parameters);
1237:
1238: wf_local_synch.propagate_role(p_orig_system=>'FND_RESP',
1231:
1232: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1233:
1234: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1235: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1236: my_lastupdatelogin,wf_parameters);
1237:
1238: wf_local_synch.propagate_role(p_orig_system=>'FND_RESP',
1239: p_orig_system_id=>respid,
1242: p_expiration_date=>enddate);
1243:
1244: -- Insert or update role in workflow for old_rolename.
1245: wf_parameters := NULL;
1246: wf_event.AddParameterToList('USER_NAME',
1247: old_rolename , wf_parameters);
1248:
1249: role_display_name := resp_name||':Any security group';
1250:
1247: old_rolename , wf_parameters);
1248:
1249: role_display_name := resp_name||':Any security group';
1250:
1251: wf_event.AddParameterToList('DISPLAYNAME',
1252: role_display_name, wf_parameters);
1253: wf_event.AddParameterToList('DESCRIPTION',
1254: descr, wf_parameters);
1255: wf_event.AddParameterToList('OWNER_TAG',
1249: role_display_name := resp_name||':Any security group';
1250:
1251: wf_event.AddParameterToList('DISPLAYNAME',
1252: role_display_name, wf_parameters);
1253: wf_event.AddParameterToList('DESCRIPTION',
1254: descr, wf_parameters);
1255: wf_event.AddParameterToList('OWNER_TAG',
1256: applsname, wf_parameters);
1257: wf_event.AddParameterToList('RAISEERRORS',
1251: wf_event.AddParameterToList('DISPLAYNAME',
1252: role_display_name, wf_parameters);
1253: wf_event.AddParameterToList('DESCRIPTION',
1254: descr, wf_parameters);
1255: wf_event.AddParameterToList('OWNER_TAG',
1256: applsname, wf_parameters);
1257: wf_event.AddParameterToList('RAISEERRORS',
1258: 'TRUE', wf_parameters);
1259:
1253: wf_event.AddParameterToList('DESCRIPTION',
1254: descr, wf_parameters);
1255: wf_event.AddParameterToList('OWNER_TAG',
1256: applsname, wf_parameters);
1257: wf_event.AddParameterToList('RAISEERRORS',
1258: 'TRUE', wf_parameters);
1259:
1260: -- Bug4507634 added WFSYNCH_OVERWRITE parameter.
1261:
1258: 'TRUE', wf_parameters);
1259:
1260: -- Bug4507634 added WFSYNCH_OVERWRITE parameter.
1261:
1262: wf_event.AddParameterToList('WFSYNCH_OVERWRITE',
1263: 'TRUE', wf_parameters);
1264:
1265: -- Bug4699363 added parameter for ORCLISENABLED.
1266:
1265: -- Bug4699363 added parameter for ORCLISENABLED.
1266:
1267: if ((my_exp is null) OR
1268: (trunc(sysdate) between my_start and my_exp)) then
1269: wf_event.AddParameterToList('ORCLISENABLED', 'ACTIVE', wf_parameters);
1270: else
1271: wf_event.AddParameterToList('ORCLISENABLED', 'INACTIVE', wf_parameters);
1272: end if;
1273:
1267: if ((my_exp is null) OR
1268: (trunc(sysdate) between my_start and my_exp)) then
1269: wf_event.AddParameterToList('ORCLISENABLED', 'ACTIVE', wf_parameters);
1270: else
1271: wf_event.AddParameterToList('ORCLISENABLED', 'INACTIVE', wf_parameters);
1272: end if;
1273:
1274: -- Bug4864465 Adding the WHO column values to be propagated.
1275:
1272: end if;
1273:
1274: -- Bug4864465 Adding the WHO column values to be propagated.
1275:
1276: wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
1277:
1278: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1279:
1280: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1276: wf_event.AddParameterToList('LAST_UPDATED_BY',my_lastupdatedby,wf_parameters);
1277:
1278: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1279:
1280: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1281: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask), wf_parameters);
1282: wf_event.AddParameterToList('CREATED_BY',my_createdby, wf_parameters);
1283: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1284: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1278: -- Bug5729583 - Updated date values to use WF_CORE.canonical_date_mask.
1279:
1280: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1281: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask), wf_parameters);
1282: wf_event.AddParameterToList('CREATED_BY',my_createdby, wf_parameters);
1283: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1284: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1285: my_lastupdatelogin, wf_parameters);
1286:
1279:
1280: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1281: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask), wf_parameters);
1282: wf_event.AddParameterToList('CREATED_BY',my_createdby, wf_parameters);
1283: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1284: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1285: my_lastupdatelogin, wf_parameters);
1286:
1287: wf_local_synch.propagate_role(p_orig_system=>'FND_RESP'||appid,
1280: wf_event.AddParameterToList('LAST_UPDATE_DATE',
1281: to_char(my_lastupdatedate,WF_CORE.canonical_date_mask), wf_parameters);
1282: wf_event.AddParameterToList('CREATED_BY',my_createdby, wf_parameters);
1283: wf_event.AddParameterToList('CREATION_DATE',to_char(my_creationdate,WF_CORE.canonical_date_mask),wf_parameters);
1284: wf_event.AddParameterToList('LAST_UPDATE_LOGIN',
1285: my_lastupdatelogin, wf_parameters);
1286:
1287: wf_local_synch.propagate_role(p_orig_system=>'FND_RESP'||appid,
1288: p_orig_system_id=>respid,