Tuesday, November 15, 2011

Migration Business events and subscriptions

Migrating business events and subscriptions

How do migrate business events and subscription..one of them is using java command wfx load or using packages

Business Events
$AFJVAPRG oracle.apps.fnd.wf.WFXLoad -d apps apps_pwd machine_name:port_no:SID thin US Custom_File_Name.wfx EVENTS Business_Event_Name

Subscriptions:

$AFJVAPRG oracle.apps.fnd.wf.WFXLoad -d apps apps_pwd machine_name:port_no:SID thin US Custom_File_Name.wfx SUBSCRIPTIONS Business_Event_Name

$AFJVAPRG oracle.apps.fnd.wf.WFXLoad -u apps apps machine_name:port_no:SID thin US Custom_File_Name.wfx

TO force upload a Subscription:

$AFJVAPRG oracle.apps.fnd.wf.WFXLoad -uf apps apps_pwd machine_name:port_no:SID thin US Custom_File_Name.wfx

use the below package to load business event and subscription information using script


wf_event_pkg
wf_event_subscriptions_pkg

This looks easy way for me..


use wf_event_pkg.generate to generate the xml
use that xml as input data for wf_event_pkg.recieve to create a script and migrate to other instances..

l_GUID is the event unique identifier which is available in wf_events table.


declare
l_GUID raw(32000):='AAD7E8E4319215BFE04025ADD478036C';
l_xml_data varchar2(32000);
begin
l_xml_data:=wf_Events_pkg.generate(l_GUID );
dbms_output.put_line ('xml data'||l_xml_data);
end;

Use the output we got above as the input for wf_even_pkg.receive.By using the below script we can migrate the event data to other environments

The xml generated above will contain xml tags like wf_event,guid,name etc..But the some how while posting the tags are removed..




begin
wf_Events_pkg.receive(l_xml_data );
--dbms_output.put_line ('xml data'||l_xml_data);
end;


select * from wf_events where name like 'xxpor%'


Similarly use the wf_event_subscriptions_pkg.generate to generate susbscription xml and use the same XML as inpu to the recieve function
Always make sure you load the event before subscription.

One other way directly use the package insert_row procedures to load data.That requires data that needs to be derived

Monday, November 14, 2011

AME Basics--Intro

Whats AME and why?
Approval management engine...It gives the flexibility of defining business rules from Fron end thus reducing the customizations required in PLSQL to find the right approvers for the transactions


AME VS Workflow


There is no comparison between these two.
We can use AME in workflow to find the appprover and foward the document for approval

Can AME send notifications??

AME doesn't have any feature to send notifications.it is responsibility of calling application of sending notification, capturing the response and updating AME with response

Instead of customization oracle workflow can i do customizations in AME?
I heard people saying this..But it all depends on what customizations
you can move only the customizations around identifying the approver and sending notifications.
Assume you are using normal routing approval method(without AME) and there is a customization for the Requisition to be approved by the department head in case the amount more than 10000$ we cant move only this customization to AME.
If the requisition system is moved to AME then only we can handle this requirement with a AME rule and avoid customization


How can i know which all application use's ame

we can check the user guide of the module or check the in the table
select * from AME_CALLING_APPS_TL

Important tables to get approval history/App rovers list generated by AME

AME_APPROVALS_HISTORY--This contains the list of all the approvers generated
AME_TRANS_APPROVAL_HISTORY
AME_TEMP_OLD_APPROVER_LISTS



How do we know whether AME is configured or not for a application?

Check the profile AME installed at application level.It should be set to YES


Important Ame Api's

Ame_Api2.GetNextApprover()
Ame_Api2.GetAllApprover()