YOur Work Flow mailer is triggering Mail often when you clone your Instance and you are unable to test the New stuff using work Flow Mailer 

Here is the solution for the Work flow mailer to stop sending older mails in the Test Instance 

UPDATE WF_NOTIFICATIONS

SET STATUS = ‘CLOSED’
where status =’OPEN’;
UPDATE WF_NOTIFICATIONS
SET MAIL_STATUS = ‘SENT’
where status =’OPEN’;

commit; 
Simple , but very Effective steps to Control your work flow mailer , sending old mails

Check this Steps:

Application Manager — > Application Dashboard ->

Application System– > Dev–> service Components –> Component Details

Set override Address : Dev: Work Flow Notification Mailer

Enter the Over Ride Address : *******. Mail .Com

Update the scripts:

update fnd_svc_comp_param_vals fscpv
set fscpv.PARAMETER_VALUE = ‘<override email address>’
where fscpv.parameter_id in (select fscpt.parameter_id
from fnd_svc_comp_params_tl fscpt
where fscpt.display_name = ‘Test Address’);

If this is Entered he/She will receive all the notification mails which has been triggered in the DEV or UAT 

Step 1Login to “Workflow Administrator Web Applications”
Image

Step 2
Ensure that Notification Mailer is running, and then click on icon as below
Image

Step 3
Click on “View Details”
Image

Step 4.
Click on “Set Override Address”
Image

Step 5.
Finally you can change the email address here. Please read the instructions in red carefully.
Image

Following is a simple step by step guide to use Business Events feature of Oracle Workflow in Oracle Applications (E-Business Suite).
Step 1) Navigate to the workflow administrator responsibility and choose the Business Events function. Define a Business Event.Owner name should be application name and owner tag should be the application short name.
Step 2) Define a Subscription for the Business Event defined in Step 1

  1.  System => should be the name of the database where the workflow is installed
  2. Phase => Keep the value for phase as 99 if you want the workflow to run immediately.
  3. Event Filter => Name of the event



Step 3) In workflow builder create a workflow item type and define 3 attributes as follows



Step 4) Create a event as follows



Step 5) Create a process as follows

Note: The starting node should be the Event that we have created



Associate the attributes that were created with the Event in the process.



Step 6) Test the event



Click “Raise in PLSQL”.


Now check if the workflow has been triggered in the Status Monitor

When you want to view the status diagram of workflow process on status monitor page from the workflow administrator responsibility, maybe you get the error page like below:
The solution for the above issue is set the Server Timezone profile option on the Site level.
After that you can able to see the status diagram in workflow status monitor.
 

Parameters for a PL/SQL :

When the Workflow Engine calls a stored procedure for a unction activity, it passes four parameters to the procedure and may expect a result when the procedure completes.

Itemtype (IN) : Internal name of the item
Itemkey (IN) : A string to uniquely identify the item type instance
Actid (IN) : ID of the activity from where this procedure is called.
Funcmode (IN) : Execution mode of the activity
Resultout (OUT) : Result Type of the activity

FUNCMODE : For functions, it can be RUN or CANCEL
For notifications, it can be RESPOND, FORWARD, TRANSFER or TIMEOUT

RESULTOUT :
COMPLETE:: Activity successful.
WAITING : Pending for some other activity
DEFERRED: : Activity deferred till
NOTIFIED::: Activity notified to with a . Externally, must be completed using WF_ENGINE.CompleteActivity.
ERROR: :Activity encounters an error

PL/SQL Coding Standards

Procedure
( itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out varchar2 )
is
;
Begin
if ( funcmode = ’RUN’ ) then
resultout := ’COMPLETE:’;
return;
end if;
if ( funcmode = ’CANCEL’ ) then
resultout := ’COMPLETE’;
return;
end if;
if ( funcmode = ’RESPOND’ ) then
resultout := ’COMPLETE’;
return;
end if;
if ( funcmode = ’FORWARD’ ) then
resultout := ’COMPLETE’;
return;
end if;
if ( funcmode = ’TIMEOUT’ ) then
resultout := ’COMPLETE’;
return;
end if;
if ( funcmode = ’TRANSFER’ ) then
resultout := ’COMPLETE’;
return;
end if;
Exception
When others then
WF_CORE.CONTEXT (’’, ’’, , , to_char(),
);
raise;
End ;

==========================================================================

Example for Custom Requisition WF :

PROCEDURE Req_App_Process(Requisitionid IN VARCHAR2,
RequisitionDesc IN VARCHAR2,
RequisitionAmount IN NUMBER,
RequestorUsername IN VARCHAR2,
ProcessOwner IN VARCHAR2,
Workflowprocess IN VARCHAR2 DEFAULT NULL,
item_type IN VARCHAR2 DEFAULT NULL ) IS

ItemType VARCHAR2(30) := NVL(item_type,’WFDEMO’);
ItemKey VARCHAR2(30) := RequisitionNumber;
ItemUserKey VARCHAR2(80) := RequisitionDesc;

BEGIN

— Start Process :
— If workflowprocess is passed, it will be run.
— If workflowprocess is NOT passed, the selector function
— defined in the item type will determine which process to run.

Wf_Engine.CreateProcess( ItemType => ItemType,
ItemKey => ItemKey,
process => WorkflowProcess );

Wf_Engine.SetItemUserKey (ItemType => ItemType,
ItemKey => ItemKey,
UserKey => ItemUserKey);

— Initialize workflow item attributes

Wf_Engine.SetItemAttrText (itemtype => itemtype,
itemkey => itemkey,
aname => ‘REQUISITION_NUMBER’,
avalue => RequisitionNumber);

Wf_Engine.SetItemAttrText (itemtype => itemtype,
itemkey => itemkey,
aname => ‘REQUISITION_DESCRIPTION’,
avalue => ItemUserKey);
Wf_Engine.SetItemAttrNumber( itemtype => itemtype,
itemkey => itemkey,
aname => ‘REQUISITION_AMOUNT’,
avalue => RequisitionAmount );

Wf_Engine.SetItemAttrText (itemtype => itemtype,
itemkey => itemkey,
aname => ‘REQUESTOR_USERNAME’,
avalue => RequestorUsername);
Wf_Engine.SetItemOwner ( itemtype => itemtype,
itemkey => itemkey,
owner => ProcessOwner );

Wf_Engine.StartProcess( itemtype => itemtype,
itemkey => itemkey );
EXCEPTION
WHEN OTHERS THEN

Wf_Core.context (‘WF_REQDEMO’,’StartProcess’,RequisitionNumber,RequisitionAmount,
RequestorUsername,ProcessOwner,Workflowprocess);
RAISE;

END Req_App_Process;
========================================================================

Allow Modification to Customized Objects

“Allow modifications of customized objects” check box in the “About Oracle Workflow Builder”

When Checked :
The range of editable access levels can appear as a combination of solid green and crosshatch grey areas.
The levels depicted by grey crosshatches represent levels that usually cannot modify customized objects, but can now do so because Oracle Workflow Builder is operating in ’upload’ mode.
Upload mode means that Oracle Workflow Builder can save your edits, overwriting any protected objects that you have access to modify as well as any previously customized objects.

When Unchecked :
The range of editable access levels appears as a solid green area.
This indicates that when you save your work, Oracle Workflow Builder is operating in ’upgrade’ mode, only saving edits to protected objects that you have access to change and leaving objects that have been previously customized untouched.
Note: An object appears with a small red lock over its icon in the navigator tree to indicate that it is a read–only if you are operating at an access level that does not have permission to edit an object, that is, your access level is in a white area of the Range of Editable Access Levels’ indicator bar.

Default Protection Levels :
The following range of levels are presumed by Oracle Workflow:
0-9 Oracle Workflow
10-19 Oracle Application Object Library
20-99 Oracle Applications development
100-999 Customer organization.
You can determine how you want this range to be interpreted. For example, 100 can represent headquarters, while 101 can represent a regional office, and so on.
1000 Public