Oracle Workflow
Oracle Workflow
Oracle Workflow
Prepared by: -
Chinmay Sarkar
Workflow Training
Workflow Training
INDEX
1. Overview of workflow
2. Workflow Process Components
Item Types
Lookup Types
Messages/Notifications
Attributes
3. Workflow process Diagram
Process Window
Transitions
Start and end activities
Initiating a process
4. Procedures and Functions
5. Application Navigation
6. Access/protection/customisation
7. WFLOAD command
Workflow Training
Overview of workflow
Why we need workflow?
Business process today involves getting many types of information to
multiple people as per business rules that are constantly changing.
Workflow is just a mean to automate business process as per business rules.
Item Types
Suppose we have some processes related to Purchase Order like PO
approval, notify approver etc.
We will include these processes under the item type PO as they are helping
in managing Purchase Order.
Following figures depicts how to create new item type:
Workflow Training
Open workflow builder, click on file menu then new to create new data
store.
Data store is nothing but a file that stores your WF definition. Save it with a
name you desire.
Right Click on data store created and select new item type
Workflow Training
Now item type is created. Click on expand beneath item type in navigation
tree to see components attached with item type.
Attributes
Attributes are like a global variable which are required to store information
necessary to complete wf process.
For example, PO Number, PO description, sends to role etc. which will be
required by an activity in a process like PO Validation.
Following figures depict how to create attributes:
Workflow Training
Workflow Training
Look Types
It is just a static list of values which can be referenced by
activities, notifications etc.
Messages
The messages branch lists all the available WF messages for
the current item type. A message is what a notification activity sends to role
or a user. A message can prompt a user for an action to take that determines
what the next activity in a process should be.
First you need to define message by right clicking on the messages branch in
the navigation tree. Provide the following information:
Internal Name: PO_INFO
Display Name: PO Information
Description: Information related to PO
Priority: normal/high/low
Workflow Training
Suppose we want to give the description of the PO also along with the
message, then copy the attribute with & as a prefix. To have PO description
in a message simply drag an item attributes PO_DESCRIPTION number and
drop under current message.
Workflow Training
After providing values for the above mentioned fields, double click on the
process you have just created. A process window opens.
Workflow Training
Select Start function under function branch in the standard item type and
drag it to your process window.
After doing so, process window look like as shown below:
Workflow Training
Transitions
It just represents a flow between activities.
For example, we have an activity in a process which selects an approver and
depending on the result it decides whether to end the process or send a
notification to approver for his approval.
Workflow Training
We have already added the start activity, now right on the process diagram
and select new function and provide the following in the pop up window:
Item Type:
Requisitiontest
Internal Name: SELECTAPPROVER
Display Name: SELECT APPROVER
Description: Select the appropriate approver from the employee approval
hierarchy
Icon: FNDUSER.ICO
Function Name: WF_REQDEMO.SELECTAPPROVER
Function Type: PL/SQL
Result Type: Boolean
Workflow Training
To represent a flow fro, the start activity to select approver, right click on
start activity and drag till select approver activity. Your process window will
look like as shown below:
Workflow Training
Now depending on the result of this activity, we will decide what will be the
next activity should be.
If the PO is being validated then we can decide what will be the next step,
we can set the role whosoever is validating the PO.
If the PO is being validated then the status of the flag will be changed to
VALIDATED and notification will be send to the user.
This is been depict in the following figures:
Workflow Training
Right click on process window and select new function. It pops up a window
requiring following information:
Item Type: Training Workflow
Internal Name: SET_ROLE
Display Name: Set Role
Icon: LOCK_KEY.ICO
Function Name: xxx_po_wf_training_pkg.set_wf_approve_role
Function Type: PL/SQL
Result Type: None
Workflow Training
Workflow Training
In same way, add all the functions needed to complete the workflow.
Workflow Training
Workflow Training
Workflow Training
Now right click on validate PO and drag till end activity, it will prompt for a
result Yes/. Same needs to be done for other functions as well. After
completing all the validations, it will look like as shown below:
Initiating a process
To initiate a process, first we need to call the
set of APIs for initiating a WF. For reference, code is given below:
PROCEDURE start_training_wf(p_po_id IN INTEGER) IS
l_itemtype VARCHAR2(30) := 'XXXWF';
l_itemkey VARCHAR2(300) := 'TRAINING-' || p_po_id;
CURSOR c_get IS
SELECT *
FROM xxxx_po_headers
Workflow Training
Workflow Training
Workflow Training
All the processes which we run will be displayed with the unique item
key as shown in the below mentioned picture.
Workflow Training
Select one of the process and click on Active History. The details will be
seen which we have filled in the API at the time of insertion in the table.
As you can see the performer in the below attached screenshot, the mail
will go the mentioned ID.
Workflow Training
Now go back and click on the status diagram, the latest workflow
process will be displayed as.
Click on each function to know the definition, Usage, Status and
Notification.
Workflow Training
Go Back and click on Workflow Details:You will able to see the Workflow Attributes and Workflow Definition as
shown below.
Workflow Training
Pls Note:Mailer Notifications should be ON, incase you want to receive mails , in
above case the mailer notification is DOWN, hence not able to receive
mails.
Please follow the below navigation to know whether mailer is ON/OFF.
Go to Workflow Administrator Web Applications -Workflow
Manager.
Check the Notification mailer as shown below.
Workflow Training
Access/protection/customisation
Oracle protects some key business critical activities from being modified
using this concept.
We can preserve customizations using this concept.
The access levels are defined as follows:
0-9
10 - 19
20 - 99
100-999
1000
Workflow Training
Workflow Training
Workflow Training
Workflow Training
Access 100 is not between 0 to 20.so he will not be able to modify this
activity.
Now Oracle Corp. developer works at an access level 20 and change the
lock property so a developer at customer site can customize the activity.
Workflow Training
Workflow Training
Now developer at customer site customize the activity and want to preserve
customization been done.
Workflow Training
Now, Oracle corp. developer cant modify this activity since it is been
locked at 100. and 20 is not between 100-100 or 100-1000.
Hence oracle patch cant modify this activity.
Workflow Training
Workflow Training
Workflow Training
Workflow Training
WFLOAD COMMAND
Oracle delivers workflows via patches which use WFLOAD command to
load their definitions to the database.
Syntax:
WFLOAD apps/apps_pwd 0 Y < UPLOAD_MODE> WFDEMO.wft
Different upload modes are:
UPGRADE - Honours both protection and customization levels of data
UPLOAD - Honours only protection levels of data
Workflow Training
THANK YOU!!!!
Workflow Training