Category Archives: OracleWorkflow

Workflow with Approval Notification

Sample Oracle workflow with an Approval Notification:

Open the existing workflow which is created earlier from the database or by using WFLOAD:


Save the file on the desktop:


Once the workflow file is saved on the desktop, Now we will be modifying that wft.

The target is to send an email notification to one person using Oracle workflow.

For this as step one we are creating an Item Attribute which is similar to a Global Variable in a PLSQL Package. There are different types of item attributes like Text, number, date, lookup, form, url, document, role, attribute and event. Here we are selecting a text. We can even go for a Role type but then we need to create a role and assign it then to the attribute.


Set the item attribute properties:


Once the attribute is created then create a new message which needs to be send in the notification.


Set the properties of the new message:


In the body the actual email notification Body and in the subject the email notification subject goes in. We can also modify using html body if we need to enter the data in tables with different color coding, .etc. Here in the message body we have appended the Item attribute just for reference on how to add item attributes which change dynamically in the workflow.


As we are using standard Approve/Reject notification we are selecting an existing lookup. Else if we want to create a new, we can always create a new lookup with its values and use it here.


Add the display name and description which are mandatory.



XAOATEST Code and Details

PLSQL Package used in XAOATEST Workflow:

Sample Script to Kickoff or Trigger the workflow:

Script to test the Workflow statuses:

If you are running this Script outside of Oracle Applications like Running from any Oracle IDE then run the Workflow Background Process for your Item type to save time 🙂 to Kickoff the workflow.

Creating workflow from scratch 2

Creating workflow from scratch Part 2

Once the Process is created then we need to design the Process:


To Design any Process in Workflow it should start with One start Function and we get it from WFSTD. Just we need to drag and drop the start and end functions from the Standard Functions:


Even when we import the Start function go to its properties and we need to mention it should be a start:


Note: Any Process can have only one Start but can have any number of ends depending upon the Business logic’s complexity.

Similarly change the properties of the end function:


Click on OK button.

Now we need to create a Custom Function that has the business logic. You can have the Function call your plsql function or Java Class or any external application. We can mention the PLSQL Function Name in the Function Name field in the properties of the Function.


We can mention the result type if any Result is returned from the plsql Function:


Click OK.


Once the function is created just drag and drop the function between START and END Functions. Once the Function is placed just by using right click of the mouse draw the Flow how the process to be. Always The Process would be starting from Start and No Functions can be in the Process without coupling to another in the flow. Always the flow should end using and END function.


Now Verify the workflow and save in the data base or the (desktop and upload using wfload).



Once the workflow is saved in the data base which usually takes time we can test it using below queries:

The data in WF_PROCESS_ACTIVITIES table explains the complete details of the workflow item type. Like how many Process, Functions, etc. with its versions.

PLSQL Code of the package and Trigger the workflow:

Creating a Workflow from scratch

Creating a New workflow using WFSTD:

Download the Standard Workflow for creating a new workflow item type:

To download the workflow file we can download using wfload or from Oracle Workflow Builder.


File –> Open –> Database –> Please give Apps user credentials. It usually takes time to load all the workflows.

Select Standard from the list of workflows and press OK button.



When the WFSTD is Loaded then save on your desktop as STANDARD.wft:


Right click on Standard and create a new Item Type


The Item Type Internal name can have at the max of 8 Characters:


There are 3 types of Persistence’s as Temporary, Permanent and Synchronization.

The access levels are important to modify the workflow and can be set at workflow builder help.


Click OK


Now save the Workflow file as XAOATEST.wft on your local desktop:


Once a new Item Type is created then a new process needs to be created where the logic needs to go in:


We need to create a new Runnable Process so that we can call it from PLSQL/Form/OAF/Java. Under a Process there can be any number of sub process depending upon the complexity of the workflow logic that needs to be implemented.