Sie sind auf Seite 1von 62

www.OracleApsVideos.

com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

Who Am I ?
I am Arunkumar Menon, an Oracle Workflow
Architect with over 10 years of experience in Workflows. I
have spent most of my career working with Oracle
Workflows, developing simple to very complex
customizations. Have designed some of the most
complicated solutions in Oracle Apps and Workflows out
there!
One of the biggest challenge in my Apps career was
when I decided to learn something extra, by taking online
courses. Most of the courses were priced very high, out of
the reach of individuals. One of the vision I have is to
create a place to provide cost effective Oracle Apps
trainings to Oracle Apps professionals.
On the way, I founded www.OracleAppsVideos.com
with this same vision in mind. The idea was to categorize
videos
in
Youtube
into
correct
Oracle
Apps
modules/technology. Please visit this site, You will find
some interesting topics! And let me know your feedback
on how to better it!

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

Am working hard to partner with other people to


create online courses/trainings on different modules at a
lower price! If you would agree with my vision, and think
you are very good in any module or tool, and would like
to partner with me to make extra money by teaching
others, then let me know at info@oracleappsvideos.com !
Lets together build a better place for Apps learning!
In this book on Oracle Workflows, I will provide an
overview of
- What is a Business Process?
- What is Oracle Workflow?
- What is Workflow Builder and Components?
- How to create Your First Workflow?
- What Next, how to take it further?
I want to provide more value to the customers, so all
these topics are explained in a simple, but yet very
detailed fashion! I am excited to know if you have
enjoyed the book! Dont forget to let me know your
feedback
at
info@oracleappsvideos.com,
or
at
www.oracleappsvideos.com! Love to have Your feedback!

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

Note: Some of the firewalls (if accessing the site from office networks) gives a Page
Verification captcha when accessing the site. It is quite fine, the site is safe, it can
come because of any of the Wordpress plugins used!

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

Overview of Oracle Workflow


Workflow is considered to the backbone of the Oracle
Applications ERP. Oracle Applications has been
developed to help ease and manage the business
processes in different areas like Purchasing, Invoicing,
Manufacturing, Inventory keeping, Planning, Human
Resource Management, Supply Chain Management, and a
number of other areas. Generally, Oracle Apps is as such
implemented and used by big Organizations because
Oracle provides high stability and performance.
Workflows are used to create the business processes
within Oracle Applications.

What is a business Process?


A business process is something which is carried out
as an everyday activity in business firms. This is true for
small organizations and big organizations alike. For
example, a street vendor who is selling books or clothes
or food items are all a small business. He is purchasing
the items from another party (who is known as supplier),
and then sells it to his customers, and he keeps the
profit.
As long as the business is very small with a limited
number of transactions per day, this process wont
require a software to manage it. In fact, buying a software
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

will be an overkill for the small businesses. But, if the


business expands, then manually managing the activities
involved takes a huge amount of time, and decreases
your revenue. In this case, a software tuned up to manage
the business can greatly reduce the expenses.
If the business is still expanding in such a way that
you have hundreds of suppliers supplying materials to
you, and your company is manufacturing a product out
of those materials, and you are keeping it in an inventory,
and later on sells it to thousands and thousands of
customers, thats when Oracle Apps kind of ERPs come
into picture. They are designed to work with huge volume
of data.
Let us say, you own a hotel business. You have one
manager to manage the hotel and you have a main chef,
and the other helpers. The aim of the hotel business, as
we know, is to cook food and supply it to customers for a
set price. To give an example of the business process,
lets consider the a normal cycle of this hotel business:
The chef collects the details from his co-workers and
he tells the manager that he would need these many
items (meat, vegetables etc), each a certain quantity.
The manager collects the details and then calls his
supplier (or vendor) or the third party who is
supplying these items, and places an order.
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

The supplier supplies the items to the hotel, it is


dispatched to the kitchen. Since it is a bulk order,
supplier will give discounts.
The manager pays the supplier daily, or comes to an
agreement and pays him once in a month or once in
two weeks.
The chef and team prepares food, and serves to the
customers.
Customers pays money, and after each day or month,
the spent and returns are calculated and the profit or
loss is reported to you since you are the owner of the
hotel.
What explained above is a simple business process.
Obviously, Oracle Apps is not needed for such simple
business processes.
Now, let us consider a bigger business like Dell, who
manufactures and supplies millions of computers per
year. Dells manufacturing units are spread across the
world. Dell is making computers doesnt mean that all the
parts of the computer is manufactured by Dell. They have
thousands of suppliers who supply them the raw parts
like processor, the circuits, bus assembly, cases etc. For
the same item/part, they can have multiple suppliers.
For example, processor can be from Intel or AMD or
some other company. The suppliers are also spread
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

across the world, in different locations. Once Dell gets all


raw parts, they have manufacturing units where all the
computers and laptops are manufactured, and they are
moved to some locations where they are kept in
inventory. Different stores (like Walmart, BestBuy etc in
US) or computer shops order bulk quantity from Dell, and
they are shipped to them.
Apart from this, thousands of customers order
computer or laptop online, and Dell supplies them. End
of every year, each subsidiary of Dell calculates the total
amount they spent and total they received, and they
calculate their own profile and loss. Each subsidiarys
spent and returns are submitted to the Dell main unit
and then the total spent and profit is calculated for Dell
as a company. This is a much much bigger business
process, and this requires an ERP system like Oracle Apps
to maintain the operations and financial reporting. Each
of the sentences explained above is in fact a business
process.
What is Oracle Workflow?
Having a good idea about business processes, let us
see what a Workflow is. Oracle workflow is a tool used to
define or lay out the business flows within Oracle Apps.
Almost all the business processes that are defined in
Oracle Apps involve workflow. Oracle, after much
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

research, has created workflows considering different


business scenarios. But there could still be business
specific
requirements
needed,
which
can
be
accommodated through customizations.
To take an example of Dell, the entire business
process of Dell cannot be made in a single Oracle Apps
module or a single workflow. The entire operations of
Dell consist of modules like Purchasing, Payables, General
Ledger, Order Management, Inventory, Manufacturing etc.
Each of these modules are big in its own way, each one of
them has a lot of complexities and nitty-gritties involved.
Each of the module has sub sections.
For example, Purchasing has sub sections like
Requisition Process, Purchase Order Process, Supplier
Management process etc. Workflows are created for each
of these sub-section levels, to define that sub section
business process. It has to be understood that even
though we call it as sub-section, they are big enough
that it will take months or years to construct a workflow
for them. Oracle has done the research on each and every
functionality needed at this level, and they have created
the workflow already and included within the Oracle
Apps, for every modules.
Workflow helps to automate the business processes,
and improves the productivity overall. It eliminates the
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

10

need of physical paper flow (Leave application form to


HR manager, Purchase Order to a supplier etc), and it
reduces cost and time.
Some Workflows in Oracle Apps
Looking at the workflow, we can get visual overview
about the business process. There are hundreds of
workflows in Oracle Apps. Some of them are specified
below module wise.
-

Purchasing
o

Requisition Approval

Autocreate

PO Approval

Requisition change order

PO Change Order

Supplier Management

General Ledger
o

Journal Approval

Order Management

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

11

Order Flow Generic

Line Flow Generic

Order Flow return with Approval

Payables
o

Invoice Approval Workflow

Why Use Oracle Workflow?


Workflow automates and streamline business
processes. With the graphical interface, you can track and
modify the business process at any time. Workflow can
route the information to various users based on business
rules. Email notifications and email response from the
users are allowed. Workflows can be customized to
accommodate specific business logic, by writing business
specific packages. Looping, Parallel flows, branching etc
are possible in a workflow, same like PL-SQL, but
Workflow has much more flexibility than PL-SQL, and is
tightly integrated with database and PL-SQL. All workflow
meta data and run time data are stored in database, so it
is very easy to track the transaction details at any time.

Workflow System Components


Workflow Builder
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

12

This is the client tool which has to be installed in the


developers machine to develop a new workflow from
scratch or to view and modify existing workflows. It has a
graphical interface, and developer can create workflow
using drag and drop feature. The components for the
development of Workflow will be discussed later.
Workflow Engine
Workflow Engine controls the execution of the
workflow. It monitors the start and end of each and every
activity of the workflow. It determines which activities are
eligible to run, it changes the activity statuses and it
controls each run of the workflow. It is basically a PL-SQL
code in the backend to check workflow metadata tables
and to control execution.
Workflow Definitions Loader
A concurrent program used to upload or download
workflow from the database. As mentioned earlier,
workflow definition is stored in the database. From the
workflow builder also, the uploading or downloading of
the workflow can be done.
Notification Mailer
Notification is a message that needs to be
communicated to another user. For example, sending a
leave application to HR manager, or sending a requisition
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

13

for approval, or sending a purchase order to supplier etc.


Workflow comes with features to add notification easily,
and helps to route it to people dynamically. The
notification mailer is a process or utility that sends the
notification as an email to the users email ID, which is
registered in his employee record. Mailer also allows
email responses.
Status Monitor
This is the place where the status of a workflow can
be seen. It is useful for debugging purpose. All the errors
reported from the workflow can be seen here. Status of
each and every activity can be viewed, and it has
diagrammatic representation also, which helps in easy
understanding.
Directory Services
The directory services allows to maintain Role
information. One role can have one or more users
attached to it. It allows to create users dynamically, and
allows to send one notification to multiple people in one
shot.
Workflow Purge
Workflow is tightly integrated with the Database.
Whenever a workflow is executed, the run time data and
parameters are stored into back end workflow tables.
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

14

Over the years, it may take a considerable amount of


space, if we are not deleting the completed workflows.
There is a concurrent program to purge the workflow run
time data from the database. This allows purging
Workflow data in a specific interval, allowing to free up
the space used by the workflow data in the system.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

15

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

16

Workflow Builder
What is WF builder and how to install?
Workflow builder is the tool used to develop or
design a workflow. It is just like a client/desktop tool as
Forms Builder or Reports Builder. The Workflows can be
developed from scratch and existing workflows can be
modified using this tool. Workflow builder has a graphic
interface which allows drag and drop of various objects
into the workflow diagram. This is how the WF builder
appears:

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

17

The above diagram is a snapshot of Requisition


Approval Workflow in Purchasing module of Oracle Apps.
As you can see, the workflow has a hierarchical structure
in WF diagram.
Note: You can download and install the Workflow
builder from Oracle support site (metalink) from the
below patches, given in the order of their release (latest
one first). You can always search on support.oracle.com
like Workflow Builder install patch and you should get
the latest till date:
1. 11i - 12 How To Download and Install the Latest
Oracle Workflow Builder (Client Tool) and XML Gateway
Message Designer for E-Business Suite (Doc ID 261028.1)
2. Patch 4066964: Workflow Client for Apps 11i10
3. Patch 2053572: WORKFLOW CLIENT 2.6.1.5.2
FOR ORACLE 9I
While installing the Setup executable from the
unzipped patch, you will come to this screen:

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

18

Click on Next, and select a folder in the hard drive. It


is better to create a new folder (like Workflow) and then
give that as the folder to install WF builder.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

19

From the next screen, select Workflow Builder


(dont select XML Message Designer), and then click on
Install. WF builder will get installed on your machine.
Sometimes, the WF builder will give a compatibility
error when you try to open it. Right click on the WF
Builder icon on the Start Menu or All Programs Menu,
click on Properties and select the compatibility mode as
Run this program in compatibility mode for: and click
OK.

So, now you have installed the WF builder in your


system, and ready for action! Open up some sample
workflows and try to understand the layout. The Oracle
seeded workflows are stored under the respective
TOP/admin/import/US (or language specific folder for
foreign languages). For example, Purchasing workflows
are stored in PO_TOP/admin/import/US , the workflow
files are stored with wft extension (eg: poxwfrqa.wft
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

20

Requisition Approval Workflow). This is how the diagram


will appear:

The left side window showing Navigator is the


Object Navigator for workflow, which allows us to browse
the different components of the workflow like Processes,
Attributes, Messages, Notifications etc. It is time for us to
understand different components of Workflow.

Different Components of Workflow


Attributes
Attributes holds the same role as local variables do
within a PL-SQL package. These are the input and output
variables needed by a workflow process. Just like there

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

21

are different data type for a pl-sql variable, workflow


attributes also have different types like Text, Number,
Date, Document, Form, URL etc. We will see about each of
this type further in the examples that we do.
Lookup Types
Lookup types have the same correlation with the AOL
lookups in Oracle Apps. In AOL lookup, we define one
lookup and store the related values for that lookup as
lookup codes. Similarly, look up type in Workflow is also
used to define a group of related values (lookup codes)
together. The lookup type can be referenced by any
component or process within WF.
Functions
Functions are used for calling PL-SQL stored
procedures from workflow. The business logic for a
business process will be broken down into small PL-SQL
procedures, and these will be called in sequence from
workflow using a function activity. The procedures can
also facilitate branching or decision making; it can be
used in getting data from a database table or inserting to
or updating a table; for performing validations in a set of
data; for triggering a concurrent program; or triggering
another workflow itself.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

22

Messages and Notifications


Notification
and
messages
are
interrelated.
Notification is a message delivered to a user, and user
can view and respond to the notification from Worklist or
from email. The message defines the content of the
notification. The content can be defined in plain text
format, or as HTML format for better look and feel. It is
also possible to have an OA Framework region rendered
in workflow notification, to display the content in an even
better look and feel. The message can be made more
dynamic by referring to attributes from within message.
While sending notification, the attribute value will be
taken by the WF. This is same as we define Application
Messages in AOL, where we can define tokens and set the
token values to give more dynamic behavior.
Processes
This is where everything starts! Processes are the
holding parent for each of the related child activities. It
is a collection of other activities like functions and
notifications. One process can be a sub process of
another process activity. The process itself can be
associated with a return value in workflow. Looking in
one angle, all these activities mentioned above can be
mapped to a PL-SQL package written to satisfy the
business process. Attributes corresponds to the PL-SQL
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

23

variables defined in the package, Function activity


corresponds to the functions and procedures, and the
Process activity corresponds to the entire package itself!
Additional flexibility is the built in Notifications
capability, and the fact that WF processes also can return
a value but a PL-SQL package cant.
Events
Events correspond to Business Events in Oracle Apps.
We will discuss more about this later on.

Main Terminologies Used in Workflow


There are some terminologies used with respect to
workflow, and it is very important to understand exactly
what they are. As you proceed more on this book, you
would get very familiar with each of these terminologies,
but still covering them in short here:
Itemtype
Itemtype is a grouping of workflow components. The
relationship would be:- Attributes and lookup types are
associated to notifications or function activities,
notifications and functions are associated to processes,
and processes are associated to an Itemtype. So, whatever
contained within that specific workflow is attached to
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

24

that itemtype. It represents various processes put


together to complete a business process. In much simpler
term, we can say, itemtype is the name of a workflow. For
example, the item type PO Approval Workflow refers to
the name of the Oracle seeded workflow used in Purchase
Order approval process.
Item
A specific instance of a workflow is called as an item.
For example, when one PO is created and submitted for
approval, one PO approval workflow is triggered, this is
one item. For next PO, another instance of PO approval
workflow is created, which is another item.

Itemkey
An itemkey is used to uniquely distinguish each item
instances. For example, the PO approval workflow can get
triggered for each and every PO. To distinguish between
each run, we need a unique identifier. Itemkey serves this
purpose. It can be a string, numeric or alpha numeric.
Activity
Everything which is meant to do a specific action in
workflow is referred to as an Activity. It can be a
notification, function, event or process. A Function

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

25

activity is meant to call a pl-sql procedure and execute a


specific business logic. Likewise, a Notification activity is
meant to send a message to a user.
Performer
A performer is usually attached to a notification. The
performer is the person to which the notification is sent.
That way, performer is a person who is performing a
certain action.
Role
A role is one or more number of users grouped by a
responsibility or a position. The performer in notification
is usually a role. For each user, Oracle creates one role in
backend. Adhoc roles can be created dynamically to
send notifications to random users derived during the
execution of the workflow.
Node
Each and every activity in a process diagram is called
Node in common.
Transition
The relationship between two activities can be
mentioned by drawing arrows between the two activities
in Workflow. This is referred to as Transition.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

26

Timeout
Workflow allows timeout for notifications. Say, one
PO approval notification is pending with one approver,
and the approver just misses to approve it. Timeout
values can be used to send reminder notification to the
approver to remind him that the notification is pending
for action.

Status Monitor and Developer Studio


Oracle provides set of front end pages to run/test the
workflow and for checking the status of the workflow.
This page is called status monitor.
Note: The screenshots in this book will be from
Oracle R12 version, and the instance names and logo is
blanked on the pictures. Note that 11i version also has
the functionality the same, only the appearance changes.
Here, System Administrator is set as the Admin resp
for Workflow. The admin resp of the workflow is defined
by the DBA, and it can differ from instance to instance. In
some instances, it would be Workflow Web Admin(User)
resp.
System Administrator > Workflow > Administrator
Workflow:

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

27

The Developer studio, as you can see above, can be


used to search for a workflow and run it. We will see
more on this shortly. The status monitor is as below,
which allows searching for a workflow with a specific
item key value, and allows to see the status. It also allows
debugging a workflow if it is in error.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

28

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

29

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

30

Time to Create Your First Workflow!


It is time to create your first workflow now! We will
proceed by creating very simple workflows, and then
proceed to complex workflows on the way.
Exercise 1: Let us try to create one workflow to send one
notification, and see and respond to the notification.
Open Workflow Builder in your system. Click on File
> Quick Start Wizard. The Quick Start Wizard is the
easiest way to create a new workflow. It automatically
adds the Oracle Standard workflow (itemtype: WFSTD)
also into the new workflow. There are some standard
activities within this WFSTD workflow which can be used
while creating a new workflow. Also, Quick Start Wizard
adds all the components needed for the new Workflow
(like the attributes, messages, processes etc). Click on File
> New and see the difference with the Quick Start Wizard.
We need to add each component separately if we are
going with File > New.
This is how Wizard appears initially:

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

31

Internal Name: This is the name by which the


workflow is going to be stored in the database. The
internal name has to be unique, meaning you cannot
create two workflows with the same internal name. If you
do so, when the second time the WF is uploaded, it will
overwrite the old version. The internal name can be a
maximum of 8 characters only. In the back end tables, the
internal name is stored as item_type field in almost all
of the WF tables.
Display Name: This is the User friendly name of the
workflow. This can have more characters, so a
meaningful name can be given here. For example,
POAPPRV is the internal name and PO Approval

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

32

Workflow is the display name of the workflow for


Purchase Order Approval.
Persistence Type: This value can be Permanent,
Temporary or Synchronous. This determines how long
the workflow run time data will be maintained in the
backend tables. If Permanent is specified, then it will be
in the table indefinitely. If it is Temporary, we also need
to specify the Number Of Days field also, which
specifies the WF Engine that after these many days, it can
be purged. Normally, for all workflows we use persistence
type as Temporary, and Number of Days as 0. There is a
concurrent program to Purge the WF runtime data from
backend, which we will discuss later.
New Process Internal and Display Name: The entire
workflow or itemtype will be embedded in one single
parent process. These two parameters specify the parent
process internal name and display name.
Note: Each and every activity in a workflow has an
internal name and display name. Internal name is the one
referred in the back end, and display name is for storing
meaningful information to the developer. Itemtype
internal name can be max 8 characters, but other
activities internal name can be max30 characters.
Let us try to create a Leave Application workflow and
enhance it at each stage when we proceed to the book
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

33

further. We are creating the workflow with the below


details:

Automatically, the Start and End activity is getting


added to the workflow. Each Process must have a
beginning point and end point, which is denoted by the

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

34

Start and End activities. Just click on the Start and End
activity, and you can see that those activities are coming
from the Standard activity, note that this Standard
workflow got added to our workflow when we created
through the Quick Start Wizard.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

35

While designing the workflow, we need to keep in


mind that we should build it as much as dynamic as
possible. That is, we shouldnt hard code any values
within the notification, or within the function and
procedures etc. In this example, the number of days an
employee requires leave is not a fixed value, it can
change. So is the dates on which leave is required. So,
instead of hard coding these values in the notification, let
us create two variables or WF attributes for entering
these values.
For a new attribute to be created, right click on
Attribute and click New Attribute, and enter the values as
below:

Note that the type of attribute is Number here. The


default value is entered as 1, so if user is not entering a
value for this attribute, the default value of 1 will be
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

36

taken. Let us create two more date attributes too, so that


we can store the start date and end date for the leave
duration.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

37

So, we have 3 attributes now. Let us create a message,


which will be the body of the leave application that goes
to the manager. The whole idea is to create one workflow
which will send a notification to the employees manager
for a leave application.

As you can see, there is a Body tab, in the message


properties box. Click on it to enter the message body.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

38

Note that we have entered a subject and a body here.


The attributes are referred within the message using their
internal names preceded with an &. This is how you
need to use attributes in Workflow to print their values.
This is same like we are defining AOL messages with
tokens in it. Here, we can also define one attribute to
store the employee name and can display it at the end of
the message (exercise for you!). Just referring the
attributes inside the message is not enough, you need to
drag the attributes from the Attributes section to the
Messages section, under our message. Note that the
attribute is getting copied to the message now.
Messages cannot stand on its own. It has to be
associated with a notification, for them to get sent to a
user. Notification is the place where we will define to
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

39

which Oracle user the notification has to be sent etc.


Right click on Notifications, and create a new notification
as below.

We have associated the Leave Message as the message


for this notification. We cant use messages directly in WF
process, we should associate them to a notification, and
use the notification within the process.
Now, where to define to which user this notification
to be sent? We will come to know soon.
The low level components for our workflow is ready
now, let us try to put them into a process and see how it
will work for us. If you look at the Object Navigator, we
have created attributes, message, notification and a
process. Attributes and Messages cannot be used directly
within a process. Among these activities we created,
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

40

notification is the only activity that can be used within a


process directly.
Our business process here is When employee
submits a leave application, this workflow should Start,
then send the notification to the Manager and then End.
We have the Start and End activities within the process,
we need to just add the notification in the middle. So,
drag and drop the notification into the process.

In this form, the workflow will not work, because


there is no connection between the activities. To define a
connection, right click on Start activity and drag to the
notification activity and drop it there. Same way, right

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

41

click on notification and drag and drop in End activity.


You can see two arrows connecting the activities now.

Now, right click on the notification activity, and


select Properties (OR double click on the activity,
Property window opens up). Go to the Node tab, in the
bottom you can see a Performer section. This is the place
where we need to specify to whom the notification should
go. You need to give a valid Oracle user name here. Since
we are creating this workflow for testing, let us hard code
the value to user SYSADMIN. If you dont have access to
SYSADMIN user in your environment, give your own
Oracle user name as performer, so that notification will
come to you.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

42

It is time for us to save the workflow. Before saving


the workflow, we need to ensure that there is no error.
Click on the validate button on the toolbar, and you
should get a message like below. If there is any error, the
validation will point it out, and we can correct it before
saving the workflow. If the messages are Warnings, WF
builder allows to save the workflow, but still we need to
make sure that the warnings will not cause any issues in
transactions.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

43

Click on File > Save As, and then choose a folder in


your own computer to save the workflow. Save the
workflow in the name XXTEST1.wft.

You can see above that while saving the WF, there are
two options:- File and Database. The File option (which we
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

44

selected above) allows to save the WF into a wft file into


the hard disk of our computer. The Database option will
allow us to connect to the Database (instance) and save
the WF directly to the DB. For this option to use, you need
to have the tnsnames.ora file in your workflow home and
need to specify the connection details (instance id etc) in
the Connect field. But, it is always preferred to use the
File option, because of performance reasons, and for
keeping Source versions. For a big workflow, the
Database option will take a long time to save to DB, and
while opening too. So, always use the File option.
Now we have saved the file into our hard disk, but we
need to upload it to the Database of the Oracle Apps
instance. There are a couple of ways to upload a
workflow to DB.

How to Upload Workflow to Database


We have two options here, either we can use WFLOAD
command in Unix or we can use Workflow Definitions
Loader concurrent program. The WFLOAD command
syntax is as below:
WFLOAD apps/<apps_password> 0 Y
UPLOAD/DOWNLOAD/UPGRADE/FORCE <wft file name> [<itemtype
name>]

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

45

We normally use the UPLOAD and DOWNLOAD


options to upload or download a workflow. For uploading
a WF to the DB, you can use it like
WFLOAD apps/<apps_password> 0 Y UPLOAD <wft file name>.wft

The download option is used to download an existing


WF from the DB. This is useful in certain scenarios where,
say, we have lost the Source file in our system and want
to get the latest workflow version from the database. In
this case, we can use the below command. Note that we
have to give the workflow internal name too as last
param to let the engine know which WF to download.
WFLOAD apps/<apps_password>
name>.wft <itemtypename>

DOWNLOAD

<wft

file

Example: WFLOAD apps/xyz 0 Y DOWNLOAD xxtest.wft XXTEST1

This command will download the XXTEST1 item type


into the file xxtest.wft file. The file will be created in the
folder from which we are running the command (Unix).
This can be transferred to our computer to open it in WF
builder.
Note: Our objective is to keep this simple as possible. So,
we are not discussing about the WFLOAD UPGRADE and
FORCE parameters in detail. The details of this are
available in the Oracle Workflow Developer Guide. In
simple sentence, UPGRADE is to prevent accidentally
overriding activities, and FORCE is to force delete all
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

46

activities of a WF from DB and UPLOAD fresh again from


the input file we give as param.
The second option to upload a WF is through the
Workflow Definitions Loader concurrent program. The
input file has to be transferred to a folder in server and
then run this program by giving the file name and path
and Upload Mode.

This program also has the Upgrade and Force


options. Also, it can download workflow to a file. The
Itemtype parameter is optional, and it has to be given for
the download scenario, to denote which item type has to
be downloaded.
Let us try to upload our first WF with this program.
Before that we need to move the file to the server. I am
using WinSCP for doing it, you can use the tool that
works for you. Here, I am copying to the
$XX_TOP/admin/import/US folder, the wft file can be
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

47

moved to any folder which the Apps has access to. The
workflow file is a text file (yes, you can open and view it
in Notepad, or any other text editor), so transfer mode
has to be Text:

After transferring the file, run the concurrent


program from View > Requests Form:

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

48

Make sure the program is finishing successfully. We


are ready to test our first workflow!

Developer Studio and Status Monitor in Action


You need to get access to the Workflow admin
responsibility in your system, or System Administrator
responsibility. Goto System Administrator > Workflow
Administrator > Developer Studio. Search with the
internal name of the WF:

Note: The Developer Studio is just a front end way of


testing small workflows with less number of parameters.
Once we get more familiar with Workflows, we will use
different ways of triggering WFs.
You can see a Run button on the right. To
start/trigger the workflow, click on this button. System
will ask for the parameters of the WF.
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

49

The item key is a unique identifier for the workflow.


We cant trigger the same workflow/item type with the
same item key more than once. The item_type item_key
is a unique combination. The other parameters
(attributes) of the workflow need to be populated while
triggering from Developer Studio.
Click on Submit, and WF will get triggered.

You can go to Status Monitor to see the status of the


workflow. This is also one of the option used to debug
any error in WF.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

50

If you click on the Status Diagram button, you would


see the flow the WF has taken in green color.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

51

You would be able to see the notification sent by the


WF by clicking on Home button, or your worklist:

Clicking on the subject will open up the notification.


We can see that the same parameters which we entered
while triggering the workflow is coming up in the
notification too (highlighted in green):

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

52

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

53

What Next?
Wow, Congratulations! You are awesome! You have
completed the basic course about Workflows! Now you
know the overview about workflow, and you know to
develop a small workflow from scratch. Putting some
more effort and creating workflows with different
business processes, you can get better and better! Also,
you need to analyze the backend tables where data is
stored to get full understanding. Seeded workflows are
quite complex because they handle complex business
processes.
With my more than 10 years experience dealing with
Workflows (and quite complex ones honestly ), I can
guide you and provide with more insights to make you a
master in Workflows!
- You will no longer be questioned about the
knowledge in Workflow
- You no longer will have to pass that strange look
when someone explains something in Workflow
- You no longer will be downgraded in your
workplace because of your lack of knowledge in
Workflows
- You will understand functional flows better

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

54

- You would position yourself with a high chance of


being selected for a job, and would even get a better
raise!

Arun, I get your point, what I need to do next?


Well, You can register yourself for my Workflow
Online FREE email course here by giving your email id:
http://www.oracleappsvideos.com/oracle-workflow-is-notthat-hard-as-you-think-really-2/

I will talk about common topics in Workflows and


solutions in the FREE course. For those of you who really
want to learn more about developing and debugging
more on Workflows, I will have an online video course to
get you in top gear the fastest route!
I will cover in detail about all the below topics, and
walk you through many exercises. Once you complete the
course, you will definitely be a master in Workflows! All
the best to take a leapfrog in your Apps career!
1. Workflow Basics
- Workflow Overview
- What is a Business Process?
- Some Workflows in Oracle E Bus Suite
- Meta data tables of Workflow
- Workflow System Components (Engine, Builder, Loader, Background Engine,
mailer, Directory Service, Status Monitor, Purge)
www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

55

2. Workflow Builder
- What is WF builder and how to install
- Object Navigator
- Processes
- Attributes different types
- Functions
- Messages
- Notifications
- Lookup Types
- Quick Start Wizard
3. Status Monitor and Developer Studio
4. Background Process and Deferred, Timeout activities
5. Create your first Workflow
6. Metadata tables population for WF
7. Sample Workflows and completed Exercises
- WF with notification body fixed, HTML
- Display Attributes in Notif. Give different input values and try from status
monitor
- Timeout (constant, and item attribute)
- Return a result value from a notif, send separate notif for each action,
verify results in status monitor
- Respond attribute
8. Quick note Business Events
9. Function Activity in Detail
10.
How to call a PL-SQL function from WF
11.
Returning Values from function, Decision making with the procedure
based on Attrib Value
12.
How to Get and Set attribute Values APIs
13.
Basic Workflows with function activity (Insert one record into a cust
table, pass params from Monitor)
14.
Setting error messages from function. Example. Checking error from
status monitor.
15.
Ways to start/trigger a WF
16.
Workflow metadata tables
- Wf_items, wf_item_types, wf_item_types_tl

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

56

- WF_ACTIVITIES, WF_ACTIVITIES_TL, WF_ACTIVITY_ATTRIBUTES,


WF_ACTIVITY_ATTRIBUTES_TL, WF_ACTIVITY_ATTR_VALUES, WF_ITEM_ATTRIBUTES,
WF_ITEM_ATTRIBUTES_TL, WF_ITEM_ATTRIBUTE_VALUES
- Wf_item_activity_statuses, wf_item_activity_statuses_v
- Wf_notifications, wf_roles, wf_local_roles, wf_messages, wf_messages_tl,
WF_LOCAL_USER_ROLES

17.
The WFSTD item type and usage
18.
Background Process and Purge Process, Loader process (upload,
download)
19.
The Directory Services and adhoc roles
20.
Customizing Seeded WF, Debugging workflow (custom and seeded),
Debugging from backend
21.
Business Events Overview
22.
Workflow Admin Scripts
23.
OAF regions in the notification
24.
Notification Mailer, mailer params, table
25.
Case Study: Requisition Approval Workflow Customizations
approval list building.
26. Some Interview Questions to get You pass through any Workflow Interview!

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

57

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

58

Thank You So Much!


I hope youve enjoyed
this eBook as much as I
loved writing it for you. I
cant thank you enough for
being
a
member
of
www.OracleAppsVideos.co
m.
I appreciate each and
every one of you for taking
time out to read my book,
and I would love to hear
what you think about it.
Please leave a comment
at:
www.OracleAppsVideo
s.com/feedback
Note: Some of the firewalls (if accessing the
site from office networks) gives a Page
Verification captcha when accessing the
site. It is quite fine, the site is safe, it can
come because of any of the Wordpress
plugins used!

www.OracleApsVideos.com
www.OracleAppsVideos.com

Or you can email me at


info@oracleappsvideos.co
m
or
Arunkumar.menon.apps@g
mail.com.
Thanks again, and I
wish you all the best for a
great Career!

Arunkumar Menon

Oracle Workflow Is Not That Hard As You Think! -

59

Disclaimer
The information contained
informational purposes only.

in

this

guide

is

for

Any information or advice that I give is my opinion based


on my own experience. You should always seek your own
justice before acting on something that I have published or
recommended.
Please understand that there are some links contained in
this guide that I may benefit from financially. The material in
this guide may include information, products, or services by
third parties. Third Party Materials comprise the products and
opinions expressed by their owners. As such, I do not assume
responsibility or liability for any Third Party material or
opinions.
The publication of such Third Party Materials does not
constitute my guarantee of any information, instruction,
opinion, products, or services contained within the Third
Party Material. Publication of such Third Party Material is
simply a recommendation and an expression of my own
opinion of that material.
No part of this publication shall be reproduced,
transmitted, or sold in whole or in part in any form, without
the prior written consent of the author. All trademarks and
registered trademarks appearing in this guide are the property
of their respective owners. Users of this guide are advised to

do their own due diligence when it comes to making business


decisions and all information, products, and services that have
been provided should be independently verified by your own
qualified professionals. By reading this guide, you agree that
myself and my company is not responsible for the success or
failure of your business or career decisions relating to any
information presented in this guide.

www.OracleApsVideos.com
www.OracleAppsVideos.com

Oracle Workflow Is Not That Hard As You Think! -

Das könnte Ihnen auch gefallen