0% found this document useful (0 votes)
31 views44 pages

Oracle Apps Workflow Beginners

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views44 pages

Oracle Apps Workflow Beginners

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Oracle Apps 4 Beginners: Overview of Oracle Workflow

Oracle Apps 4 Beginners: Overview of Oracle Workflow


Overview of Oracle Workflow
This post will explain the concepts of a workflow and describe the separate components
within the Oracle Workflow module.
Concepts of a Workflow
A workflow consists of numerous processes. Workflow processes represent business process
flows and information routing. Oracle Workflow defines process rules. Each workflow
process contains a set of activities, which can be notifications, PL/SQL stored procedures, or
another sub process. The flow of business processes is less efficient when the information is
not routed to the appropriate person(s) or group. The two needs are interdependent. The
flow of business processes in Oracle Workflow can have decision points (branches), parallel
flows, and loops. A decision point (branch) is where a decision must be made. Various flow
options result from choices made at the decision point. Parallel flows are business processes
that flow simultaneously. You can decide whether one, some, or all parallel flows must be
completed before moving on to the next step. Loops are business processes that flow back
to an activity completed earlier.

In the past, information routing was performed primarily on paper. Now, information routing
is usually performed through electronic messaging—emails. Electronic messaging is much
more efficient, especially if your business process flow includes external organizations or
personnel. For example, utilizing email, you can alert relevant parties that a decision needs
to be made. You can also notify users when there are current or potential problems, and
you can use notifications to solicit responses.

Oracle Workflow drives items or transactions of specific types through workflow processes.
If, for example, you use the purchase order approval workflow process, the item type would
be the purchase order. Purchase orders of one item type will comprise one specific purchase
order. All items that have the same item type share the same set of attributes. Attributes
consist of item-type data. Each item will have its own set of attribute values. In this
purchase order example, attributes can be the purchase order number and supplier; values
can be PO-12345 and ABC Supplier.

The workflow process encompasses the entire process, from purchase order creation to
completion. A completed purchase order can be approved, rejected, or cancelled. Oracle
Workflow makes sure that the created purchase order is routed to the appropriate person(s)
for approval and that the correct procedures are followed throughout the entire workflow
process.

Review Questions
1. What is a workflow?
2. What can a business process flow contain?
3. Why is Internet communication important in workflow management?
4. What information can be communicated through notifications?
5. What is the difference between a process and an activity?
Oracle Workflow Components

Oracle Workflow Components


Oracle Workflow contains six major components:
· Workflow Builder
· Workflow Engine
· Workflow Monitor
· Workflow Definitions Loader
· Workflow Directory Services
· Notification System

Workflow Builder
Workflow Builder is the component that provides a graphical user interface for creating,
reviewing, and maintaining workflow definitions. A workflow definition includes the workflow
processes, attributes, notifications, messages, and functions that make up the workflow.
Like Oracle Applications, Workflow Builder has a Navigator to help you find the various
components of your workflow definition.

Workflow Engine
Workflow Engine is the component that executes and enforces the defined workflow
processes. When a workflow process starts or a step is completed, the Workflow Engine is
signaled. The Workflow Engine receives and reads a signal from the defined workflow
processes and then determines and executes the appropriate next step. To send a signal or
to communicate with the Workflow Engine, Oracle Applications provide several standard
Workflow Engine application programming interfaces (APIs).

Workflow Monitor
Workflow Monitor is the component of Oracle Workflow that allows you to review the state
or status of an item through any particular workflow process. Workflow Monitor can also be
used by application administrators to push through certain items that have errored out.
Workflow Monitor provides an overview of a given item in the workflow and helps with
tracking.

Workflow Definitions Loader


Workflow Definitions Loader is the component that allows you to download or load workflow
definitions to and from the database or text files.

Workflow Directory Services


Workflow Directory Services is the component that identifies the directory repository to be
used, tells Oracle Workflow how to find the users, interprets the roles of each user, and
sends notifications to those users when necessary.

Notification System
The Notification Mailer is a program that concurrently sends emails and receives responses
from the Oracle Workflow Notification System. It will send out notifications and process
responses by calling the response functions and completing the notification. Unlike Oracle
Alert response processing, you do not need Oracle Office to use this functionality.
Review Questions
1. What does a Workflow Builder do?
2. What does a Workflow Engine do?
3. What does a Workflow Monitor do?
4. What does a Workflow Definitions Loader do?
5. Does Oracle Office need to be configured to run Workflow Notification?
Overview of the Workflow Engine

You now know the function of the Workflow Engine in Oracle Workflow. In this section, you
will learn more about how the Workflow Engine executes and enforces each item’s defined
workflow process. You will also learn how to use Workflow Engine APIs.
The following section explains how the workflow engine manages a process and how to
apply Workflow Engine APIs to functional activities.
How the Workflow Engine Manages a Process
The Workflow Engine drives items through workflow processes defined in Oracle Workflow.
Each item has a set of attribute values that contains information about the specific item. A
workflow process consists of a combination of activities and transitions. An activity can be a
function, a notification, or a process. At any point in time, there may be more than one item
passing through the workflow process. These items, which can be at found at any activity or
at any transition within the workflow process, have their own sets of attribute values. When
in the middle of the workflow process, each one of these items with its own set of attribute
values is referred to as one instance of the workflow process. Each instance can have a
different state. The state of the instance or item is defined by the states of all activities of
the workflow process. The Workflow Engine manages all instances of defined workflow
processes.

The following describes how the Workflow Engine manages a workflow process. The
Workflow Engine is a PL/SQL program residing on the server. It receives APIs from the
clients whenever an activity needs to change state. Valid states of an activity are Active,
Complete, Deferred, Error, Notified, Suspended, and Waiting. Once the Workflow Engine
changes the state of the activity, it evaluates the changed state of the activity. If the
activity is changed to a state of Error, the Workflow Engine rolls back the changes made by
the erred activity and initiates the defined error-handling routine. The Workflow Engine will
first try to run the error-handling routine associated with the erred activity. If no error-
handling routine is attached to the erred activity, the Workflow Engine will trace back to the
erred activity and determine the parent of the activity. If no error-handling routine is
attached to the parent activity, the Workflow Engine trace back to the parent of the parent
activity until there is an error-handling routine. Oracle Workflow comes with a default error
process, or you can create your own custom error-processing routine that will reset, retry,
or ship the erred activity.

If the activity is changed to a state of Active, the activity will be executed, unless the
activity has a processing cost higher than the Workflow Engine threshold. Executing an
activity means running a function activity in run mode, sending notification for notification
activity, or initiating a subprocess in a process activity.
In the case where an activity’s processing cost is higher than the Workflow Engine
threshold, the state of the activity will change to Deferred. Activities are marked as
Deferred in order to streamline processing. Deferred activities are run in background
batches, not in real time. The Workflow Engine running in the foreground has a defined
threshold activity processing cost. If the processing cost of an activity exceeds the defined
threshold, the foreground Workflow Engine will not execute the activity and marks it as
Deferred. The background Workflow Engine picks up all deferred activities and executes
them. You can have more than one background Workflow Engine. To further streamline
workflow processing, each Workflow Engine can have different thresholds so that other
background Workflow Engines can pick up deferred activities with varying processing costs.
Setting up background Workflow Engines is optional, but you need at least one background
Workflow Engine to handle timed-out notifications.
If the activity is changed to a state of Complete, the Workflow Engine issues a savepoint
and evaluates all of the transitions tied to the completed activity. A savepoint is different
than a commit. You can roll back to the savepoint, but you cannot roll back after commit.
The Workflow Engine never issues a commit; the calling application is responsible for the
commit. If the activities that depend on the completed activity have not been executed
before, the Workflow Engine will change the state of the dependent activities to Active. If
the activities that depend on the completed activity have been executed before, this will
cause a loop. Depending on the setup, the Workflow Engine will then do one of two things.

If the executed activities are marked as Run Once, the Workflow Engine will simply skip
those transitions. If the executed activities are marked as Loop Reset, the Workflow Engine
reverses all of the executed activities in the loop from the loop reset point and reexecutes
the activities. Reversing all of the executed activities means running the function activities
in cancel mode and marking notification activities as Cancelled. The Workflow Engine
reverses all of the executed activities in reverse order back to the loop reset point and
reexecutes the activities in the normal order from the loop reset point on. If the completed
activity also marks the completion of the workflow process, the Workflow Engine will mark
the workflow process as Complete and all outstanding or incomplete activities will be
marked Complete with a result code of #FORCE.

In summary, the Workflow Engine can perform the following functions for clients:
· Change the state of an activity
· Function activities
· Notification activities
· Process activities
· Transitions
· Error handling
· Maintain workflow history

Changing the State of an Activity


The Workflow Engine changes the state of the activity. Valid states are:
· Active The activity is ready for execution.
· Complete The activity has been completed and is ready to transition to the next
activity.
· Deferred The activity is ready for execution; however, when the processing cost is
higher than the foreground Workflow Engine cost threshold, the activity is deferred and
eventually executed in the background by the Workflow Engine.
· Error The activity erred and must be rolled back.
· Notified The notification activity needs a response and a notification has been sent to
solicit a response.
· Suspended The activity has been completed, but the transition is on hold until the
activity is resumed.
· Waiting The completed activity is waiting for other activities in a master detail process
to be completed before transitioning.

Function Activity
Function activities are stored in PL/SQL procedures. Each function activity should have two
modes: run and cancel. The run mode is for execution of the function activity, while cancel
mode is for reversing the function activity. The Workflow Engine can accept parameters
from the clients and, depending on processing cost, execute the function activity either in
real time or in the background.
Notification Activity
Notification activities are messages. The Workflow Engine can accept parameters from the
clients and send messages to users or roles, which are groups of users. A notification
activity can also solicit responses.

Process Activity
A process activity is a separate workflow process, which can be a subprocess or a process
within a process.

Transitions
When an activity is completed, the Workflow Engine evaluates the transitions and
determines whether to mark activities that depend on the completed activity as Active.
When the activity marking the completion of the workflow process is finished, the Workflow
Engine can mark the process as Complete. If the transition to Active has already been
executed, the Workflow Engine may ignore the transition or reverse and reexecute
activities.

Error Handling
If an activity erred, the Workflow Engine rolls back the activity and executes the defined
error-handling process.

Maintain Workflow History


The Workflow Engine maintains records of all completed or erred activities so that they can
be reviewed online or through reports. Workflow Monitor uses this history for reporting the
status of an item.
Review Questions
1. When will an activity be deferred?
2. What will the Workflow Engine do if the activity erred?
3. If you have Loop Reset on, and the Workflow Engine comes to an activity that has been
executed, what will happen?
4. What can happen when evaluating transitions?
Applying Workflow Engine APIs to Function Activities
Function activities are stored in PL/SQL procedures. There is a standard API format for all
stored procedures called by function activities. When the Workflow Engine executes the
function activity, the Workflow Engine passes four input variables and, if a result type is set
up for the activity, expects one output variable in return. Output variables are:

· Itemtype A category of items that share the same set of attributes (e.g., purchase order).
· Itemkey A unique identifier within the same item type for the specific item passing
through the workflow process.
· Actid The unique identifier of the activity that calls this stored procedure.
· Funcmode The execution mode of the function activity. It can be run, cancel, or timeout.
The timeout mode is used for an expired notification that was intended to solicit a response.
Each notification has a time-out value. If a notification has received no response after the
time-out value has been exceeded, the Workflow Engine will execute the dependent
activities with an execution mode of TIMEOUT.
· Result The result of the stored procedure. Results can be:
COMPLETE: result_code Stored procedure completed. The result code is specified in the
type of the function activity.
o DEFERRED: date The stored procedure is deferred, to be processed in the background or
at a specified date (optional).
o ERROR: error_code The stored procedure erred. You can, if you wish, provide the error
code.
o NOTIFIED: notification_ID: user The stored procedure sent out a notification to a user.
You may return the unique identifier for the notification, the notification ID, and the user
who sent the notification.
o WAITING The stored procedure has been completed, but there is a waiting period before
the function activity is marked as Complete. The background Workflow Engine will mark the
function activity Complete after the waiting period has expired.

The stored procedure declaration will be in the following format:


PROCEDURE your_procedure_name (
itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
result out varchar2) IS

Once the procedure declaration is completed, you will then have the stored procedure body.
A pair of BEGIN and END markers encloses the stored procedure body. In the procedure
body, you must check the Funcmode variable to execute codes that correspond to the RUN,
CANCEL, and TIMEOUT modes.

Review Questions
1. What does the input variable Itemkey represent?
2. What does the input variable Actid represent?
3. What three function activity execution modes are in a stored procedure?
4. What are the possible results of a stored procedure in a function activity?
Oracle Workflow Engine APIs
Inside a stored procedure, you must use Workflow Engine APIs to communicate with the
Workflow Engine. All Workflow Engine APIs are stored in a PL/SQL package called
WF_ENGINE. The following is the list of Workflow Engine APIs present inside the
WF_ENGINE package.

Variable(I=Input,
Procedure Name Description
O=Output)
Add a new unvalidated runtime item
AddItemAttr Item type(I)
attribute.
Item type(I)

Item key(I)
Set the value of a text item
SetItemAttrText
attribute.
Attribute name(I)

New value(I)
Item type(I)

Item key(I)
Set the value of a number item
SetItemAttrNumber
attribute.
Attribute name(I)

New value(I)
Item type(I)

Item key(I)
Set the value of a date item
SetItemAttrDate
attribute.
Attribute name(I)

New value(I)
Item type(I)

Attribute name(I)
Get type information about an item
GetItemAttrInfo Attribute type(O)
attribute.
Subtype(O)

Format(O)
GetActivityAttrInfo Get type information about an Item type(I)
activity attribute.
Item key(I)

Activity ID(I)

Attribute name(I)

Attribute type(O)
Variable(I=Input,
Procedure Name Description
O=Output)

Sub-type(O)

Format(O)
Item type(I)

Item key(I)
Set the parent/master process for a
SetItemParent Parent item type(I)
detail process.
Parent item key(I)

Parent context(I)
Set the owner of an item. Item type(I)

SetItemOwner Item key(I)

Owner(I)
Item type(I)
Set the user-friendly identifier for an
SetItemUserKey Item key(I)
item.
User key(I)
Action(I)

Context(I)

Attribute name(I)

Callback function used by the Attribute type(I)


Notification System to get and set
CB
process attributes, and mark a Text attribute
process complete. value(I,O)

Number attribute
value(I,O)

Date attribute
value(I,O)
Item type(I)
Process all deferred activities within
ProcessDeferred Minimum threshold(I)
the threshold limits.
Maximum threshold(I)
Pick up one timed-out activity and
ProcessTimeOut Item type(I)
execute time-out transition.
Pick up one stuck activity, mark
ProcessStuckProcess error status, and execute error Item type(I)
process.
Background Process all current deferred and/or Item type(I)
Variable(I=Input,
Procedure Name Description
O=Output)

Minimum threshold(I)

time-out activities within the Maximum threshold(I)


threshold limits.
Process deferred flag(I)

Process timeout flag(I)


Error buffer(O)

Return code(O)

Item type(I)
Send background process for
BackgroundConcurrent deferred and/or time-out activities Minimum threshold(I)
to the concurrent manager.
Maximum threshold(I)

Process deferred flag

Process timeout flag


Item type(I)
Create a new runtime process for an
CreateProcess Item key(I)
item.
Root process(I)
Item type(I)
StartProcess Begins execution of the process.
Item key(I)
Item type(I)
Suspends process execution.
Outstanding notifications will be
SuspendProcess Item key(I)
allowed to finish, but activity
transitions will not occur.
Process to suspend(I)
Item type(I)
Abort process execution.
Outstanding notifications are Item key(I)
AbortProcess cancelled. The process is then
considered complete, with a status Process to abort(I)
specified by the result variable.
Result(O)
Item type(I)
Returns a process to normal
ResumeProcess execution status. Used after a Item key(I)
process is suspended.
Process to resume(I)
BeginActivity Determines if the specified activity Item type(I)
may currently be performed on the
item. Item key(I)
Variable(I=Input,
Procedure Name Description
O=Output)
Activity(I)
Notifies the Workflow Engine that an Item type(I)
activity for an item has been
completed. Item key(I)
CompleteActivity
Activity(I)

Result(I)
Item type(I)

Item key(I)
Assigns the user or role (performer)
AssignActivity
who will perform an activity.
Activity(I)

Performer(I)
Item type(I)

Item key(I)
Resets the process thread to the
HandleError entered activity and begins Activity(I)
execution again from that point.
Command(I)

Result(I)

The last section of the stored procedure body is the EXCEPTION block for exception
handling. Any kind of exception handling is allowed in PL/SQL. The only thing you must do is
set the context information.

This is done by the API calls

WF_CORE.CONTEXT(‘your_package_name’, ‘your_procedure_name’, itemtype,


itemkey, to_char(actid), funcmode)

Your stored procedure can be in a PL/SQL package. The package groups store procedures
within the same category.

Review Questions
1. Which Work Engine API should you use to begin execution of an activity?
2. Which Work Engine API should you use to get information about an item’s attributes?
3. For which functions can you use the Work Engine API Background?
4. How do you notify the Work Engine about a completed activity?
How Oracle Workflow Acquires Information About a Role
In Oracle Workflow a role is a user or a group of users. Oracle Workflow gets information
about a role from the following three views:
· WF_USERS
· WF_ROLES
· WF_USER_ROLES
WF_USERS
The WF_USERS view contains information about every user who can receive notifications
and responses in Oracle Workflow. The below table shows all of the columns in the
WF_USERS view.

Column Description
The internal name of the user. This column must be all
Name uppercase and contain no spaces. This is the column that
the Workflow Engine will refer to for the user name.
Display_name The display name of the user.
Description The description of the user.
This is the column that identifies the notification preference
of the user. Valid values are MAILTEXT, MAILHTML, QUERY,
or SUMMARY. When the value is set to MAILTEXT, the user
receives notifications and responses by email. When the
value is set to MAILHTML, the user receives notifications
and responses through HTML email attachments. When the
Notification_preference
value is set to QUERY, the user receives notifications and
responses from the Notifications Web page or Notification
Viewer form. The Notification Viewer form is only available
to Oracle Applications users. When the value is set to
SUMMARY, the user receives emails that contain summaries
of all notifications.
The language to use for notification features that are
Language
language dependent.
The territory to determine the date formatting and numeric
Territory
formatting.
E-mail_address The email address of the user.
Fax The fax number of the user.
This column identifies the original system where the user
Orig_system
resides.
This column identifies the unique identifier for the user in
Orig_system_ID
the original system where the user resides.
The status of the user. Valid statuses are ACTIVE for active
Status users, EXTLEAVE for extended leave, INACTIVE for inactive
users, and TMPLEAVE for temporary leave.

WF_ROLES
The WF_ROLES view contains information about every role in Oracle Workflow that can
receive notifications and responses.
Each user in WF_USERS must be a role in WF_ROLES. If the attributes of the role are
different than the attributes of the users within the role, the attributes of the role will
override the attributes of the user. The below table shows all of the columns in WF_ROLES.

Column Description
The internal name of the role. This column must be all
Name uppercase and contain no spaces. This is the column that
the Workflow Engine will refer to for the role name.
Display_name The display name of the role.
Description The description of the role.
This is the column that identifies the notification preference
of this role. Valid values are MAILTEXT, MAILHTML, QUERY,
or SUMMARY. When the value is set to MAILTEXT, the user
receives notifications and responses by email. When the
value is set to MAILHTML, the user receives notifications
and responses through HTML email attachments. When the
Notification_preference
value is set to QUERY, the user receives notifications and
responses from the Notifications Web page or Notification
Viewer form. The Notification Viewer form is only available
to Oracle Applications users. When the value is set to
SUMMARY, the user receives emails that contain summaries
of all notifications.
The language to use for notification features that are
Language
language dependent.
The territory determines the formatting of dates and
Territory
numbers.
The email address of the role, most likely a mail distribution
E-mail_address list. You use the email address of the role if you choose not
to expand the role into its users.
Fax The fax number of the role.
This column identifies the original system where the role
Orig_system
resides.
This column identifies the unique identifier for the role in
Orig_system_ID
the original system where the role resides.

WF_USER_ROLES
In Oracle Workflow, WF_USER_ROLES is the view that resolves the many-to-many
relationship between users and roles. One role can contain many users, and one user can
belong to many roles. The below table shows all of the columns in the WF_USER_ROLES
view.

Column Description
User_name The internal name of the user.
The original system where the user resides. Use this
User_orig_system
and User_orig_sytem_ID to join to WF_USERS.
The unique identifier for the user in the original
User_orig_system_ID system where the user resides. Use this and the
User_orig_system to join to WF_USERS.
Role_name The internal name of the role.
The original system where the role resides. Use this
Role_orig_system and the ROLE_ORIG_SYSTEM_ID to join to
WF_ROLES.
The unique identifier for the role in the original system
Role_orig_system_ID where the role resides. Use this and the
ROLE_ORIG_SYSTEM_ID to join to WF_ROLES.
Review Questions
1. When is the WF_USERS view used?
2. When is the WF_ROLES view used?
3. When is the WF_USER_ROLES view used?
4. How many notification preferences do you have and what is the purpose of each one?
Mapping Oracle Workflow to a Directory Repository

To map Oracle Workflow to a directory repository, map the three views—WF_USERS,


WF_ROLES, and WF_USER_ROLES to the database tables in the directory repository
selected. If Oracle Workflow is not stand-alone, but is integrated with Oracle Applications,
you can map the roles to users and positions defined in the Oracle Human Resources
modules. Oracle Workflow provides a seeded script that you can run to map the three views
within Oracle Applications.

The three views are mapped in the following way. WF_USERS is mapped to all employees
with active primary assignments. WF_ROLES is mapped to all users listed in WF_USERS and
to all positions defined as workflow roles. WF_USER_ROLES is mapped to the combination of
WF_ROLES and WF_USERS.

In addition, Oracle Workflow provides three local tables that join the three views:
WF_LOCAL_USERS, WF_LOCAL_ROLES, and WF_LOCAL_USER_ROLES. You can use these
three local views to supplement the database tables in the directory repository.

Review Questions
1. What does the WF_USERS view map to in Oracle Human Resources?
2. What does the WF_ROLES view map to in Oracle Human Resources?
3. What are the names of and uses for the three local tables?
Components of a Workflow Process
A workflow process consists of several components. Expand the apps@vd11 line by clicking
on the plus sign (+) inside the Navigator. You will see three item types: PO Approval, PO
Standard, and Standard. You will also see a Hidden Item Types icon. Double-click on
the Hidden Item
Types icon to display the same Show Item Types window seen when you open a Workflow
file. Expand the menu attached to PO Approval and you will see the six components of the
PO Approval. They are:
· Attributes
· Processes
· Notifications
· Functions
· Messages
· Lookup types

Item Types
Item types categorize the items. Each activity in a workflow process must be associated
with an item type. To create a new item type, right-click on apps@vd11and choose New
Item Type. In this chapter, the right mouse button is assumed to be the secondary button
on your mouse. The Item Type Property window will appear. Enter an internal name for the
item type. Type the internal name using uppercase letters. The name can include numeric
characters, but cannot contain spaces. You cannot update the internal name once the item
type is defined.

The internal name must be unique across the entire workflow process. The internal name is
used in Workflow Engine APIs. Enter a display name next. The display name is what you use
to refer to this item type in any activity. You have the option of entering a description and a
selector.
A selector is mandatory if your item type is associated with more than one process. The
selector returns the process that must be executed in this multiple-process situation.
Selector is a PL/SQL stored procedure. Create a new item type calledNEW_PO with a
display name of NEW PO Item Type (see Figure 3).
Figure 3: Item Type Properties form

The Role tab is designed to let you specify the role that will read, write, and/or execute the
item type. (Unfortunately, these security features are not currently active, so you will need
to test them in future versions.) Select the Access tab. The red bar, shaded or crossed,
represents the access level that can edit objects in the Oracle Workflow Builder.

A black vertical bar identifies your access level. You can select combinations of the two
options to preserve customizations and lock in at this access level, or to generate different
access levels. If both options are checked, you can see that the three levels—Customization,
Access, and Protection—are all at 100. This means that only your current access level (100)
can update objects. If only the Preserve Customizations option is checked, customization
and access are both at level 100 while protection is at level 1000. This means access levels
100 to 1000, equal to or higher than your current access level, can update objects.

If the Lock at this Access Level option is checked, the customization level is at 0 and both
access and protection levels are at 100. This means that access levels 0 to 100, equal to or
lower than your current access level, can update objects. If neither option is checked, any
access level can update objects. Customization is at level 0 and protection is at level 1000.
The red bar will have a crossed pattern if Allow modifications of customized objectsis
checked. To find this option, execute the Help | About Oracle Workflow Builder menu
command. If you checked Allow modifications of customized objects, you can modify and
save objects even if your access level is outside of the customization and protection range.
Check Allow modifications of customized objects. You must exit the New Item Type
properties window to do this. Click OK to save your definition.

Once you have checked the box under the Help menu, open the Item Type properties
window again. Notice that you cannot change the internal name field anymore. Click on the
Access tab and check both the Preserve Customizations option and the Lock at this Access
Level option (see Figure 4). Click on OK to save your changes.

Figure 4: Item Type Properties (Access Tab) form


Attributes
All items that have the same item type share the same set of attributes. Attributes are
information and properties regarding the item type. Each item will have its own set of
attribute values. Attributes are similar to global variables in that they can be used by any
activity in the workflow process. Workflow Engine APIs allow you to get or set attribute
values for an item.
Double-click on the attribute to see the properties of the activity. If you want to add a new
attribute, right-click when your cursor is on the Attributes icon and choose New Attribute.
Either way, the Attribute Property window will appear and the item type will be displayed.

If you are creating a new item attribute, enter an internal name for the item attribute. The
internal name must be uppercase and unique across the same item type; the name cannot
contain spaces. Next, enter a display name. The display name will be used in a message or
activity. You can then enter an optional description.
Next, select an attribute type. Valid types are:
· Text The attribute value is the text datatype. You can enter an optional length for this
attribute type.

· Number The attribute value is the number datatype. You can enter an optional format
mask for this attribute type.

· Date The attribute value is the date datatype. You can enter an optional format mask for
this attribute type.

· Lookup The attribute value is one of the values specified in a lookup type. You must enter
a lookup type for this attribute type.

· Form The attribute value is the internal function name used on an Oracle Application form.
You can enter optional function parameters for this attribute type. This attribute type is only
useful when using Oracle Applications and the Notifications Viewer form. The Oracle
Application form will appear in the Notifications Viewer form. You can bring up the Oracle
Applications form from the Notifications Viewer form.

· URL The attribute value is a Universal Resources Locator (URL) to a Web location. This
attribute type is only useful if you have the Notifications Web page. The URL will appear in
the Notifications Web page. Select it to bring up the Web site.

· Document The attribute value is an attached document. The attribute value is in the
format of a document management system and the document name. In the current release,
only the PL/SQL document is supported. The PL/SQL document contains data inserted from
a database.

· Role The attribute value is a role.

· Attribute The attribute value is the value of another attribute’s value at runtime. This is
called a reference attribute.
If you enter an optional default value for your attribute, Oracle Workflow Builder provides all
of the necessary validation. For example, if you select Attribute as the attribute type, you
can only select a defined attribute within the workflow process. If you select Lookup as the
attribute type, you can only select a lookup code that is valid for the selected lookup type
Selecting the access level for attributes is the same as selecting the access level for item
types. Create a new attribute with an internal name of NEW_FLAG and a display name
of NEW Flag. Choose attribute type Lookup and lookup type Boolean. Choose True as the
default value. You are not going to use this attribute in your workflow process, but you are
going to build on it later. Click OK to save your work.

Figure 5: Attribute Properties form

Processes
Process is a workflow progression. Before you can diagram a workflow process, you must
define a process activity. To do this, right-click on the Process icon and choose New
Process. The Process Properties window appears. Enter, in uppercase and with no spaces, a
unique internal name for your process. Also, enter a display name. The display name is the
one that will appear in your process diagram. You have the option of entering a description.
Select the result type for this process. Select None if no specified result codes are necessary
for the completion of the process.

The result type must be a lookup type. Transitions in the workflow process diagram will
differ depending on the result codes of the lookup type. If you have the authority, you can
click on Edit to view or edit the result type. Check Runnable if this process can be called
from other workflow processes or from Workflow Engine APIs. Create a process activity
called NEW_PO_PROCESS.

A display name of NEW PO Approval Process appears as an Approval result type. You have
the option of checking the Runnable box. Last, select an icon to represent this process
activity. Click on Browse to locate available icons (see Figure-6).
Figure 6: Process Activity Properties form

Select the Details tab, where you can select the error-handling process.
You can also specify the maximum time to wait for notification before a time-out occurs.
Since this is a process activity and not a notification activity, the time-out parameters are
not applicable. The effective date and version are for display only. If you save your workflow
process using the Save As option, the effective date and the version number will be
changed. Check Loop Reset to identify process activity behavior if a loop condition occurs.

A loop condition occurs when the process activity is revisited by the Oracle Workflow
Engine. If Loop Reset is checked, the process activity will be reexecuted and all of the
subsequent processes will be reversed (see Figure -7). Click on OK to save your work.

Figure 7: Process Activity Properties (Details) form

The Roles and the Access tabs are the same as the item types and attributes. The next
section will demonstrate how to diagram a workflow process.
Notifications
Notifications are messages sent to users. To set up a notification activity, you can either (1)
drag and drop a defined message into the notifications arm of the same item type or (2)
you can right-click on the Notification icon and select New Notification. As in a process
activity, you must specify an internal name and a display name for a notification activity.
Enter a unique name—in uppercase and without spaces—for your process. The display name
is the one that will appear in your process diagram. Entering a description is optional. Select
the result type for this process. You can select None if no specified result codes are
necessary for the completion of the process. The result type must be a lookup type.
Transitions in the workflow process diagram will differ depending on the result codes of the
lookup type. Click on Edit to view or update the result type.

Since this is a notification activity, you must select a message. If you use the drag-and-drop
message method, the message name will already be filled in. You can click on Edit to view
or update the message. If the message you selected expects a response, a Function field
will appear. This is the response function. Next, you can check Expand Roles if you want to
expand the role to each individual user’s email instead of the role’s email. As a last step,
you must select an icon to represent this notification activity. Click on Browse to locate
available icons (see Figure-8).

Create a notification activity with the internal name of NEW_PO_APPROVE and a display
name of NEW PO Approval by dragging and dropping the Approve PO message. You do
not have the Approve PO message yet. You can drag and drop the Approve PO message
from the PO Approval item type to your item type. Once you have entered all of the data,
click on OK to save your work.

Figure 8: Notification Activity Properties form

Select the Details tab. In the Detail form, you may select the error-handling process. If you
wish, you can also specify the allowable wait time for notifications before declaring a time-
out. Since this is a notification activity, the time-out parameters are applicable. The
effective date and version are display only.
If you save your workflow process using the Save As option, the effective date and the
version number will be changed. Check Loop Reset to identify the behavior you want the
process activity to perform if a loop condition occurs. Loop conditions occur when the
process activity is being revisited by the Oracle Workflow Engine. IfLoop Reset is checked,
the process activity will be reexecuted and all of the subsequent processes will be reversed.
The Roles and the Access tabs correspond to the attributes and process activities item
types.

Functions
Functions are PL/SQL stored procedures that can have Workflow Engine APIs. To create a
new function, right-click on the Functions icon and select New Function. The Function
Properties window will appear. Enter a unique internal name in uppercase letters. The name
should not contain spaces. Then enter a display name for the function. The display name
will appear in the process diagram. You may enter a description. Next, enter the name of
the PL/SQL stored procedure in the format of package_name.procedure_name. Select the
result type for this process.

You can select None if no specified result codes are necessary for the completion of the
process. The result type must be a lookup type. Various transitions in the workflow process
diagram are possible and will depend on different lookup type result codes. Click on Edit to
view or update the result type. You can then specify the cost of the activity. Depending on
this cost and the threshold of the Workflow Engine, this function activity may be deferred
and ultimately processed by the background process. As a last step, you must select an icon
to represent this function activity. You can also click on Browse to locate icons from your
desktop (see Figure-9). You do not need to create a function activity for this exercise.

Figure 9: Function Activity Properties form

The Details tab, the Roles tab, and the Access tab are identical to the ones described in the
previous sections.
Messages
Messages are templates used by a notification activity. If you want to create new messages,
right-click on New Message. At this time, you need not create a new message. You have
already created a message called Approve PO. Double-click on the Approve PO message to
see its properties.

There is an internal name, a display name, and a description. The internal name must be
unique and typed in all uppercase with no spaces. You may select a default priority for the
message. Valid values are from 1 to 99, with 1 designated as highest priority. Priority
selection is for informational purposes only; there is no functionality attached to the
assigned priority (see Figure-10).

Figure 10: Message Properties form

Select the Body tab to enter the subject of the message and the body. You can assign
message attributes to the subject and body by adding an ampersand sign before the
attributes’ internal names (see Figure-11). The Roles tab and the Access tab are the same
as described in the previous sections.
Figure 11: Message Properties (Body) form

Notice the plus sign (+) next to the Approve PO message in the Navigator. This indicates
that the Approve PO message has message attributes. Click on the plus sign next to
Approve PO to see all of the message attributes associated with the Approve PO message. A
message attribute may have Send or Respond options. Send attributes are regular
attributes.

Respond attributes are message attributes that solicit responses in the notification message.
Display names of the respond attributes become prompts in the response section of the
notification message. Descriptions of the respond attributes are used to describe the
expected response. If the respond attribute is a lookup type, the user can respond by
selecting from a list of lookup codes. You can specify message attributes to get their values
from the item attributes. This is indicated by selecting Item Attribute as the default value
for the message attribute and selecting the associated item attribute. To create a new
message attribute, right-click on

Attribute
You must enter a unique internal name typed in all uppercase and without spaces. Next,
enter a display name. A description name is optional. Then, select the attribute type. The
attribute type of the message attribute is the same as that of the item attribute. Next,
specify whether the source is Send or Respond. As a last step, enter a default value, if
applicable. You can get the default value from an item attribute. (See Figure-12 for the
properties of the Approval Action message attribute of the Approve PO message.)

Figure 12: Message Attribute Properties form

Lookup Types
The last components are the lookup types. Lookup types are lists of lookup codes defined
for use by activities. For example, you can find the Approval lookup type in the Standard
item type. If you want to create a new lookup type, right-click on theLookup Types icon
and choose New Lookup Type. Double-click to see the properties of the Approval lookup
type. You will see the internal name, the display name, and a description for the lookup
type.
The Access tab is the same as described previously (see Figure-13). To add a new lookup
code, right-click on the Lookup Types icon and choose New Lookup Code. A Lookup Code
Properties window appears. Type the internal name and the display name for the lookup
code. You can also add an optional description (see Figure-14). Once you have defined a
lookup code, it will show up as a separate icon under theLookup Types icon.

Figure 13: Lookup Types Properties form

Figure 14: Lookup Code Properties form

Review Questions
1. How many types of activities are available?
2. What is a prerequisite for creating a notification activity?
3. When will the time-out parameters apply?
4. How can you find the lookup codes for a specific lookup type?
Define a new Workflow process
To plan a workflow process, you must identify all of the activities and transitions for your
entire workflow process. You must determine, from the start of the workflow process, how
the next activity will be selected and transitioned. You will determine how transitions should
branch to other activities based on the result codes of a completed activity, and then
establish the order of execution. You will decide who needs to be notified and who needs to
respond. You also must identify attributes needed for all of the activities and determine
where the values of the attributes will come from.
There are three type of activities: process, notification, and function. Transitions can be
based on the specified result code of an activity. For example, once your user has created a
PO, you will want Oracle Workflow to send a notification to your user’s manager. The
notification will include PO information and ask the manager to either approve or reject the
PO. The approval or rejection will be sent back to the user as a notification. If the manager
does not respond within the time-out period, a time-out notification will be sent to the user.

Every workflow process should have a start and an end function. The start and end
functions for the Standard item type is necessary only for visual purposes. In this particular
PO approval process, you will need a function activity to find the appropriate manager, and
you need four notification activities. One notification activity informs the manager that there
is a PO waiting for the manager’s approval.

This notification must solicit a response and will therefore have a respond attribute of
Lookup Type and a lookup type of Approval. Another notification informs the user that the
manager approved the PO (the manager selected Approve as the response). A third
notification informs the user that the manager rejected the PO (the manager selected Reject
as the response). The final notification reminds the manager that he or she has not
responded in a timely manner and must respond ASAP. Once the manager approves or
rejects the PO, the PO status must be updated. You will need a function to update the PO.

During planning, it is best to list all of the activities, prerequisites, and steps.

Table-5 shows the PO approval process described above.


Activity Prerequisite Steps
Processes initiated with the
Set the item attributes with
CreateProcess API with input
the input variables. Set the
Start variables such as PO number,
item owner and call the
requestor, PO dollar amount, and
StartProcess API.
other attributes.
Function activity to find the
Find manager manager based on the
requestor.
Send notification to manager
Create message to attach to the
and ask for response.
Notify manager notification with a respond attribute
Response can either be
of lookup type Approval.
Approve or Reject.
Manager Select Approve or Reject.
Activity Prerequisite Steps
responds
Manager does Send reminder to manager
not respond and ask for response again.
Update PO Manager approves or rejects PO. Update PO.
End PO update successfully completed.
Table 5: PO Approve Process Plan

Review Questions
1. What factors should you identify when you plan your workflow process?
2. Which two functions must you have in any workflow process?
How to Monitor Workflow to View its Progress
You can use the Workflow Monitor to view the progress of any workflow process. There are
two forms of Workflow Monitor. One is the Workflow Status form in Oracle Applications. The
other is the Java-based Workflow Monitor tool. There are two modes for both forms of the
Workflow Monitor: user mode and admin mode. admin mode will provide more information
and allow more functionality. (You must log in to Oracle Applications as a system
administrator to see the Workflow Status form.)

Figure 15: Workflow Status form

The Workflow Status form has the item type and the item key as the title. It lists the
activity name, type, status, result, start date, end date, assigned user, error name, error
message, error stack, activity internal name, activity description, and user name. You can
use the folder tools to change the form to fit your needs (see Figure 15).

The Java-based Workflow Monitor tool has four regions:


· Workflow process title
· Process diagram
· Detail tabs
· Administration buttons

Workflow Process Title


The process title shows the workflow process name, the item type internal name, and the
user item key that identifies the item. These are the context values of the workflow
instance.

Process Diagram
This shows the process diagram associated with the workflow process. This is for display
only. Color is used to represent the state of an activity or transition. Green means active or
in progress, yellow means suspended, and red means erred. A thin black transition means
that the transition has not been visited. A thick green transition means that the transition
has been visited. You may look at the subprocess diagram by double-clicking on any
subprocess.
Detail Tabs
Select the Detail tab to reveal the definition, usage, status, notification, and item of a node.
The Definition tab shows the item type, display name, description, activity type, message,
function, result type, any time-out parameters, cost, loop check, and error process. The
Usage tab reveals performers and comments. The Status tab shows the status, result, begin
date, end date, and any error information. The Notification tab provides recipient, status,
begin date, and end date information. The Item tab discloses the item type, item key, item
owner, begin date, end date, and item attributes.

Administration Buttons
Administration buttons are only available if you are running in the ADMIN mode. These
buttons allow you to abort process, suspend process, resume process, reassign process, or
expedite process. Each button corresponds to an API call. You may select Attribute to
change the value of an item attribute.

Review Questions
1. What is the difference between the ADMIN mode and the USER mode?
2. What do the colors in the process diagram represent?
3. What two forms monitor workflow processes?
4. For what purposes are the administration buttons used?
How to Create a Workflow Diagram
To prepare a workflow diagram, double-click on the process activity. In our example,
double-click on the NEW PO Approval Process. The Process window will appear. The Process
window shows the graphical representation of your workflow process. Initially, the Process
window is blank. Drag and drop activities from the Navigator into the Process window.
Between activities, define transitions by drawing arrows using the right mouse button. If the
result code of the source activity is None, the transitions will not have a label. If the result
code of the source activity is not None, label the transition arrow with the result code that
will initiate the transition.

To diagram the NEW PO Approval process, create the item attributes for a NEW PO. To do
this, copy the item attributes from the PO Approval item type and paste them to your NEW
PO item type. Press CTRL-C on the PO Number from the PO Approval item type. Then
press CTRL-V to paste the PO Number to your PO item type. Repeat the same copy-and-
paste step for the PO Amount, the Requestor Name Line1, and the Approver User Name
(see Figure 16).

Figure 16: Item Attributes for NEW PO item type form


You must then create the function that selects the approver, which is the next manager in
H.R. Create a PL/SQL stored procedure that will search out the next manager based on the
requestor and tie the stored procedure to a function activity. In this review question, you
can assume that the stored procedure will always retrieve a valid manager. In this case, the
result type of the function activity can be None and the function activity is NEW Get Next
Manager in H.R.

Create notifications that allow the manager to approve or reject the PO and that send a
reminder if the notification timed out. You do this by creating a message that asks the
manager to approve or reject the PO. Use NEW_APPROVE as the internal name and New
Approval as the display name. You can type a message body like the one in Figure 17.

Your message must have a Respond message attribute. Use NEW_RESULT as the internal
name. Since the display name becomes the prompt, use Approve as the display name.
Enter Please either approve or reject the PO as the description. Select Lookup as the
type and, since you are soliciting a response, select Respond as the source. Select Approval
as the lookup type. This will allow the user to respond with either Approve or Reject (see
Figure 18).
Figure 17: Exercise Message Body form

Figure 18: Exercise Message Attribute form

Once you have created the New Approval message, attach the message to a notification
activity called NEW_APPROVE_PO. Use a display name of NEW Approve PO. Select the
same result type as your message, which is Approval, and select New Approval as the
message. Click on the Details tab to change the Timeout field to 3 days. Create a reminder
notification in the same way. Now you are ready to create the workflow process diagram.

You should start the workflow process with the Start function activity. You can find the Start
function activity from the Standard item type. Drag and drop the Start function into the
Process window. You are assuming that this NEW PO Process is initiated by a CreateProcess
API and StartProcess API with the correct attributes: PO Number, PO Amount, Requestor
Name Line1, and Approver User Name.
The Start function activity will be your source activity. The destination activity, NEW Get
Next Manager in H.R., will retrieve the appropriate manager. Create a transition by right-
clicking the mouse and dragging a line between the Start function activity and the NEW Get
Next Manager in H.R. function activity. Since the result code is None, there will be no need
to select a result code. Your next activity will be NEW Approve PO notification activity. Drag
and drop the NEW Approve PO notification activity into the Process window. Since the result
code from NEW Get Next Manager in H.R. function activity is None, you can just connect the
NEW Get Next Manager in H.R. function activity to the NEW Approve PO notification
activity.

You must identify the performer for the NEW Approve PO notification activity. The performer
is the role receiving the notification. In your case, select the item attribute Approver User
Name as the performer. To select a performer, double-click on the notification activity in the
Process window and select the performer. You can only do this if you invoked the
Notification Activity Property window inside the Process window; you cannot do this if you
invoked the Notification Activity Property window in the Navigator (see Figure 11-19).

You can use the Attribute Values tab to specify a value for any selected attribute in this tab.
You do not need this feature for this review question.

Figure 19: Notification Activity Property Window (Process Window) form


The manager can ignore the notification, approve the PO, or reject the PO. Treat all three
conditions with three different transitions. If the manager approves or rejects the PO, the
workflow process is considered completed. In this case, it must flow to the End function
activity. To show the Or condition, you can use the Or function activity. Both the End and Or
function activities can be found under the Standard item type. If the manager chooses to
ignore the notification, you must send a reminder to the manager and branch back to
resend the NEW Approve PO notification activity.

To make sure that the NEW Approve PO notification can be resent, make sure thatLoop
Reset is not checked. When you create a transition between the NEW Approve PO activity
and the Or activity, a window appears and asks which result code should be tied to this
transition. Your choices are Approved, Rejected, <Default>, or <Timeout> (see Figure 11-
20). The <Default> transition is used if result codes other than any selected result codes
are returned.

Choose Approved for the transition. Repeat the same step and create a transition for
Rejected between the NEW Approve PO activity and the Or activity. Create a transition
between the NEW Approve PO activity to the NEW PO Reminder activity and select
<Timeout> for the transition. Since you want to route back from the NEW PO Reminder
activity to the NEW Approve PO activity, you must create a transition from the NEW
Approve PO activity to the NEW PO Reminder activity.

To see labels, which are display names in the Process window, you can either execute
Designer’s View | Show Label | Display Name menu command, or right-click on the Process
window and execute the Show Label | Display Name menu command. See Figure 11-21 for
the complete process you have created.
Figure 20: Result codes for transition

Figure 21: Complete PO Workflow Process form

Other options in the Process window include copying diagrams, printing diagrams, and
displaying an Overview window. All of these options are found when you click the right
mouse button in the Process window. You can verify your workflow process by executing the
File | Verify menu command.

Review Questions
1. When will you need to select a label for a transition?
2. What is the purpose of the <Timeout> label?
3. How will your NEW PO Process be invoked?
4. What is a performer and how do you specify a performer for a notification activity?

How to Incorporate Standard Activities in a Workflow Process


Oracle Workflow comes seeded with commonly used standard activities that you can use in
any workflow process. The standard activities are:
· And
· Assign
· Block
· Compare Date
· Compare Number
· Compare Text
· Continue Flow
· End
· Get Monitor URL

· Loop Counter
· NoOp
· Or
· Role Resolution
· Start
· Default Voting Message Yes/No
· Wait
· Wait For Flow

And
When multiple transitions flow into the And function activity, the And function activity is
considered complete when all of the transitions are completed.

Assign
The Assign function activity has four attributes: Item Attribute, Date Value, Numeric Value,
and Text Value. Use the Assign function activity to assign an item attribute specified in the
Item Attribute value with the Date Value, Numeric Value, or Text Value. Determine whether
to use the Date Value, Numeric Value, or Text Value based on the date type of the item
attribute.

Block
The Block function activity blocks the activity until a complete activity API call is made.

Compare Date
The Compare Date function activity has two attributes: Test Value and Reference Value.
Reference Value contains an item attribute. The Test Value is a constant. The Compare Date
function activity compares the value of the item attribute in Reference Value to the constant
in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null (if the
reference value is null). The Compare Date attributes are both of datatype Date.

Compare Number
The Compare Number function activity has two attributes: Test Value and Reference Value.
The Reference Value contains an item attribute. The Test Value is a constant. The Compare
Number function activity compares the value of the item attribute in Reference Value to the
constant in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null
(if the reference value is null). The Compare Number attributes are both of datatype
Number.

Compare Text
The Compare Text function activity has two attributes: Test Value and Reference Value. The
Reference Value contains an item attribute. The Test value is a constant. The Compare Text
function activity compares the value of the item attribute in Reference Value to the constant
in Test Value and produces results labeled Equal, Greater Than, Less Than, or Null (if the
reference value is null). The Compare Text attributes are both of datatype Text.

Continue Flow
Continue Flow is used for master and detail coordination. The master process can start
detail processes, and you can use the Continue Flow and Wait for Flow function activities to
coordinate a process flow between master and details. The Continue Flow function activity
signals the flow of a waited process to continue. The Continue Flow function activity has two
attributes: Waiting Activity Label and Waiting Flow. The Waiting Activity Label identifies the
label of the activity that was waiting for the completion of this Continue Flow function
activity. Waiting Flow identifies whether the waiting activity is a master process or a detail
process.
End
The End function activity marks the end of a process. You can use it to return result codes.
The End function activity is not required; it is only for visual purposes.

Get Monitor URL


The Get Monitor URL function activity retrieves the Workflow Monitor and stores the URL in
the item attribute specified. You can use the other attribute, administration Mode, to specify
whether the Workflow Monitor should be run in admin mode.

Loop Counter
You can use the Loop Counter function activity to limit the number of times the Workflow
Engine can transition through any particular activity. Use the Loop Limit attribute to specify
the limit. If the loop limit is not reached, the activity completes with a result code of Loop;
otherwise, the activity will complete with a result code of Exit.

NoOp
The NoOp function activity has no functionality. Use it as a placeholder in the workflow
process.

Or
When multiple transitions flow into the Or function activity, the Or function activity is
considered complete when any one of the transitions is completed.

Role Resolution
The Role Resolution function activity selects one user from a role with multiple users. You
can use its Method attribute to specify whether you want the user to be selected based on
the number of open notifications or just sequentially assigned. The first method is Load
Balance and the second method is Sequential.

Start
The Start function activity marks the beginning of a process. The Start function activity is
not required; it is only for visual purposes.

Default Voting Message


The Voting Message is a message you can use to create a notification activity that tallies
responses from users or roles, depending on whether Expand Roles is checked. The
message subject and the body make up the message that will be sent to the users or roles.
It has a Respond message attribute with the internal name of RESULT.

You can specify the list of possible responses for this Respond message attribute using a
specific lookup type. In the notification activity that uses the voting message, you must
create a Number Type attribute with each possible response value as the name. These
attributes will capture the percentages necessary for the response values to become the
result. If the value of the attribute is set to Null, then the value will be treated as the default
value. In other words, if you have two response values, Yes and No, and you have the
attribute Yes set with a value 50 and the attribute No set as Null, anything less than 50
percent Yes will be a No.

You can specify the voting option using the Voting Option attribute. You can selectRequire
All Votes to have the Workflow Engine tally all responses only after all votes have been cast.
If not all votes are received before the notification times out, then the timed-out transition
is used. Tally on Every Vote instructs the Workflow Engine to keep a running tally after each
vote is cast. If the notification times out, the response percentage to date is used. Wait for
All Votes instructs the Workflow Engine to wait until all votes come in before tallying
response percentages.

The only difference between this option and the Require All Votes option is that, if the
notification times out before all of the votes came back, the Wait for All Votesoption will still
tally the response percentages before the time-out occurred.

Wait
The Wait function activity defines the specified waiting period for a response. It has six
attributes. The wait mode specifies whether the wait is calculated by absolute date, day of
month, day of week, relative time, or time of day. If the Wait mode is set to absolute date,
enter the final date into the Absolute Date attribute. If the Wait mode is set to day of
month, enter the day into the Day of Month attribute. If the Wait mode is set to day of
week, enter the day of the week into the Day of Week attribute. If the Wait mode is set to
relative time, enter the number of days you want to wait in the Relative Time attribute. If
the Wait mode is set to time of day, enter the time of day into the Time of Day attribute.

Wait for Flow


Wait for Flow is used for master and detail coordination. The master process can start detail
processes, and you can use the Continue Flow and Wait for Flow function activities to
coordinate the process flow between the master and details. The Wait for Flow function
activity signals the process flow to wait. The Wait for Flow function activity has two
attributes: Continuation Activity Label and Continuation Flow. The Continuation Activity
Label identifies the activity label that must be completed before the Wait for Flow function
activity continues. The Continuation Flow activity identifies whether the waiting activity is a
master process or a detail process.

Review Questions
1. How do they Continue Flow and Wait for Flow function activities work together?
2. How does the Voting activity work?
3. How can you use the Role Resolution function activity?
4. Do you need the Start and End function activities?
Oracle Workflows interview Questions
 Workflow processes represent business process flows and information routing.

 Each workflow process consists of a set of activities and transitions.

 Activities can be process activities, notification activities, and function activities.

 The business process flow in Oracle Workflow can have decision points (branches), parallel
flows, and loops.

 The Workflow Builder is a graphical interface for diagramming the workflow process.

 The Workflow Engine enforces and executes the workflow process and drives items through
the workflow processes.

 The Workflow Monitor displays any instances/items and their status within a workflow
process.

 The Workflow Definitions Loader loads the workflow definition from a flat file or from
another database.

 Workflow Directory Services obtains the email addresses for roles from the directory
repository.

 The Notification System sends out messages and solicits responses.


 The Workflow Engine is a PL/SQL program that resides on the server and drives items
through workflow processes defined in Oracle Workflow.

 Each item has a set of attributed values that contains information about the specific item.
Each one of these items, with its own set of attribute values in the middle of the workflow
process, is referred to as one instance of the workflow process.

 Valid states of an activity are Active, Complete, Deferred, Error, Notified, Suspended, and
Waiting.

 If the state is Error, the changes will roll back to the last savepoint and the error-handling
process will be initiated.

 Active activities are deferred to the background Workflow Engine if the operating cost is
higher than the threshold specified in the Workflow Engine.

 If an activity is completed, the Workflow Engine will issue a savepoint and the activities
that depend on the completed activity will be set to Active, if appropriate.

 If Loop Reset is on and the Workflow Engine comes to an activity that has been executed,
then all of the activities will be reversed; otherwise, the transition will be ignored.

 Workflow Engine APIs are found in the WF_ENGINE package.

 The CreateProcess API creates a new runtime process for an item of an instance.

 The StartProcess API begins execution of the workflow process.

 The CompleteActivity API notifies the Workflow Engine that an activity has been completed
for an item.

 GetItemAttrInfo obtains type information about an item attribute.

 Oracle Workflow obtains information about a role from three views: WF_USERS,
WF_ROLES, and WF_USER_ROLES.

 Groups of users, as well as individual users, are assigned to roles.

 The Email field in WF_ROLES is used if Expand Role is not checked; otherwise, the Email
field of the users in the role will be used.

 To add more roles and users, you can use the three local tables: WF_LOCAL_USERS,
WF_LOCAL_ROLES, and WF_LOCAL_USER_ROLES.

 An item type consists of six components/objects: attributes, processes, notifications,


functions, messages, and lookup types.

 The internal name of Workflow Builder components must be unique, typed in uppercase,
and should not contain spaces.

 If there is more than one process attached to an item type, a selector is needed to select
the correct process.
 Each notification activity must have an attached message.

 A message can have its own attributes, and a respond attribute will solicit users to select a
valid respond value.

 You can attach a time-out to the notification activity. If time passes and a response is not
received within the specified time, a <Timeout> transition will be executed.

 Lookup types are used to define lists of lookup codes. Result types must be lookup types.

 To monitor workflow and to view its progress, you can use either the Workflow Status form
in Oracle Applications or the Java-based Workflow Monitor tool.

 There are two modes for both forms: ADMIN and USER.

 To diagram a workflow process, drag and drop activities into the Process window and draw
lines between them by holding down the right mouse button.

 Fill in the performer for a notification activity.

 The Continue Flow function and Wait for Flow function work together to coordinate the
master/detail process flow.

 The Oracle Applications Implementation Wizard—wizard for short—is a module in Oracle


Applications that guides you through the setup steps of Oracle Applications.

 The Oracle Applications Implementation Method (AIM) is a methodology that guides you
through every phase of the implementation process and is complemented by the
Implementation Wizard.

 The process hierarchy ensures that the common setups are finished before the specific
setups.

 Primary processes are common processes that span the entire application, requiring setup
steps that cross multiple modules across the financial, distribution, and manufacturing
product families.

 Secondary processes are common processes that cross modules within the product family.

 Final processes are processes that are specific to an individual module and have no cross-
module dependencies. Enter the context for setup steps that are dependent on organization
context. Organization contexts are Business Group, Set of Books, Operating Unit, and
Inventory Organization. Start the implementation process by launching it through the
Implementation Wizard form.

 If you are assigned a setup step through the wizard, you will receive notification through
Workflow, and you can see the notification in the Notifications Summary form.

 You can complete the setup and respond with a Done result.

 You can respond with a Skipped result and ask the wizard to skip the setup steps.

 You can reassign the setup steps to another role.


 You can run the wizard installation process to ensure that the wizard is installed correctly.

Sample Interview Questions


1. When will an activity be deferred?
A. Activity cost = 0
B. Activity cost < Workflow Engine threshold
C. Activity cost > Workflow Engine threshold
2. What is the primary purpose of a workflow?
A. Routes information
B. Sends notifications
C. Creates audit trails
D Defines process rules
3. What job does the SetItemUserKey API perform?
A. Sets the unique identifier for an item
B. Sets the role to be notified
C. Sets the user-friendly identifier for an item
D. Sets the activity ID for an item
4. How will you define the possible results of an activity in order to drive different
transitions?
A. As item attributes for an item
B. As lookup codes for a lookup type
C. Separate the activity into two
D. Use a process activity
5. Time-out parameters apply to which activity?
A. Function
B. Process
C. Notification
D. All of the above
6. What will solicit responses from a notification activity?
A. Having a time-out parameter
B. Having a performer
C. Having a Send message attribute
D. Having a Respond message attribute
7. Which Work Engine API should you use to begin execution of an activity?
A. CreateProcess
B. StartProcess
C. ResumeProcess
D. BeginActivity
8. Which implementation process group comes before the product family
processes?
A. Common application processes
B. Product family processes
C. Product-specific processes
D Common financial
9. What is the proper format for an internal name in the Workflow Builder
component?
A. Uppercase
B. No spaces
C. Unique within item type
D. All of the above
10. Which of the following statements is true?
A. Role can be created in Workflow Builder.
B. A user is a role if it has at least one active responsibility.
C. A role can only have one user.
D. A user must be a role.
11. Which component in Oracle Workflow is the graphical interface for workflow
processes?
A. Workflow Builder
B. Workflow Engine
C. Workflow Monitor
D. Workflow Definitions Loader
12. When do you need a selector for an item type?
A. When you must perform role resolution
B. When performing a voting activity
C. When more than one process is associated with an item type
D. When multiple result codes are possible
13. What does the Workflow Engine do when a function activity has finished?
A. Issue a savepoint
B. Issue a commit
C. Generate a log file
D. Notify the user

Answer to the above Questions


1. C. Activity cost > Workflow Engine threshold
Explanation An activity is deferred when the activity cost is greater than the Workflow
Engine threshold. If the activity cost = 0 or if the activity cost is less than the Workflow
Engine threshold, the activity will become Active.

2. A., B., D. Routes information, Sends notifications, Defines process rules


Explanation The primary purposes of a workflow are to route information, send
notification, and define process rule. Although some history is maintained automatically by
Oracle Workflow, it will not be considered as creating audit trails.

3. C. Set the user-friendly identifier for an item


Explanation The SetItemUserKey API is used for setting a user-friendly identifier for an
item.

4. B. As lookup codes for a lookup type


Explanation You define the possible results of an activity to drive different transitions
using lookup codes for a lookup type. You cannot use item attributes. Separating the
activity into two does not make sense since you want to drive two transactions with the
same activity, but with two result codes. A process activity will not help in this scenario.

5. C. Notification
Explanation A time-out parameter only applies to a notification activity since the time-out
parameters are used to measure when a notification expires. It does not apply to a function
activity or a process activity.

6. D. Having a Respond message attribute


Explanation Having a Respond message attribute will solicit responses from a notification
activity. The display name will become the prompt and the description will be the
instruction. Nothing else, such as a time-out parameter, a performer, or a Send message
attribute, will have
an affect in soliciting responses.

7. B. StartProcess
Explanation The StartProcess API begins the execution of an activity. The CreateProcess
API creates a new runtime process for an item. The ResumeProcess API resumes a
suspended item. The BeginActivity determines if the specified activity may currently be
performed on the item.

8. A. Common application processes


Explanation Common application processes come before the product family processes,
which come before product-specific processes. Common financial is one of the product
family processes. It does not come before product family processes.

9. D. All of the above


Explanation An internal name for a Workflow Builder component must be in uppercase,
have no spaces, and be unique within item type.

10. D. A user must be a role.


Explanation A user must be a role. A role cannot be created in the Workflow Builder.
Having one active responsibility is not a requirement for a user to be a role. A role can have
more than one user.

11. A. Workflow Builder


Explanation The Workflow Builder in Oracle Workflow is the graphical interface for
workflow processes. The Workflow Engine drives items through workflow processes. The
Workflow Monitor allows you to view and monitor workflow process instances and the
Workflow Definitions Loader loads workflow definitions from a text file or database.

12. C. More than one process associated with an item type


Explanation When you have more than one process associated with an item type, you
need a selector to select a process. You use the Role Resolution standard activity to perform
role resolution. Voting is another standard activity. Multiple result codes drive different
transitions, but this is not related to the selector.

13. A. Issue a savepoint


Explanation The Workflow Engine issues a savepoint when a function activity is
completed. The Workflow Engine never issues a commit; the calling application issues a
commit. The Workflow Engine does not generate a log file or notify users.

You might also like