0% found this document useful (0 votes)
1K views84 pages

Workflow Interview Questions and Answers

Workflow automation allows businesses to define and automate routing of information according to configurable business rules. Key benefits include creating clear process definitions, automating routings, monitoring processes, and easily changing process definitions. Workflows provide an audit trail, ensure the right information reaches the appropriate person, and force examination of business processes to find areas for improvement. However, designing workflows requires time and effort to map out processes. (150 words)
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)
1K views84 pages

Workflow Interview Questions and Answers

Workflow automation allows businesses to define and automate routing of information according to configurable business rules. Key benefits include creating clear process definitions, automating routings, monitoring processes, and easily changing process definitions. Workflows provide an audit trail, ensure the right information reaches the appropriate person, and force examination of business processes to find areas for improvement. However, designing workflows requires time and effort to map out processes. (150 words)
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/ 84

WORKFLOW

1)

What is workflow and what are the benefits of using workflow?


Oracle Workflow lets you automate and continuously improve business
processes,
Routing information of any type according to business rules you can
easily change
To people both inside and out side your enterprise. One of the key
features of
Oracle Workflow is the ability to adapt to the business process of
process of any enterprise and also be able to adapt to the continuous
changes in business processes with ease.

Benefits:
1)
Create a clear business process definition
2)
Automate the business routings
3)
Monitor the process
4)
Allow users to define their own business process to suit their
organization needs.
5)
Readily change the business process definitions in case of a
change business process
Workflow Advantages and Disadvantages?
Setting up workflows for your business processes can provide
several advantages:
Workflows provide good reporting metrics; by using workflows,
an audit trail can
be created of who signed off on content at various points of the
life cycle of the
Content.
Workflows help you get the right information to the relevant
person, and the
Relevant information to the right person.
Designing a workflow forces you to examine and understand
your business
Processes, helping you find areas that can be improved.
The same elements that provide advantages can also be
disadvantages: you will
be forced to examine your business processes and map out how
you want to use
workflows.This can be a time-consuming process, but the end
result is worth it.

Page 1 of 84

WORKFLOW

Where is Workflow Used in the Applications?


In Release 10.7x
o Engineering change orders
o WEB Applications
Release 11x
o ITS EVERYWHERE!!!!
Examples: Order processing in OM
Credit memo approval in AR
Requisition processing in PO
Or
If you have oracle Database we can use the Oracle workflow
Why we Required Oracle Workflows?
We use workflow for Streamlines of Business process, it is internal And Beyond the
Organizations
And we can upload Documents up to 4 GB .Mainly Required For creating New Process
or Modifying Existing process Definitions

Types of Workflows
There are three types of workflows:
A criteria workflow is used for content that enters a workflow automatically
based on metadata that matches predefined criteria.
A basic workflow defines the review process for specific content items, and
must be initiated manually.
In addition to these two basic types, sub-workflows can be used. Subworkflows do not have an initial contribution step, but are entered via a
workflow jump. They are created in the same manner as criteria workflows.
Sub-workflows are useful for splitting large, complex workflows into
manageable pieces.
2)

Which workflow u have customized?


Custmization
Process.docx

Page 2 of 84

WORKFLOW

3)

What is need of customization and what have u done?

4)

How can u send the email notification?

5)

What is the performer?

The performer is the role to whom the notification is


sent. You may either select a constant role name or an item type
attribute that dynamically determines the role at runtime.
Note that you must first create an item attribute of type role to store
the dynamic role name before we can reference that item attribute in
the performer field.
Note: If you set the Performer Type to Constant and you are connected to the
database and have loaded roles from the database, you can select a constant
role name from the Performer populist. If you are working in a .wft file data
store without any open connection to the database, you can directly type in a
valid role display name in the Performer field. When you upload the file to a
database, the role will be resolved to the appropriate role data stored in the
database based on the role display name you entered.
Note: When you assign a notification to a multiuser role, the Workflow
Engine keeps track of the individual from that role that actually responds to
the notification

6)

7)

How can u launch workflow from oracle apps forms and


through oracle apps
Only?
Can u call function from workflow?
Yes we can call

8)

What are the different types of attribute and how they can
be used?

Attributes & Their


Usage.docx

9)

How to create new workflow? Explain step by step?


In two ways :
1.Quick Wizard
Page 3 of 84

WORKFLOW

2. Manual
10)

11)

What are the mostly used lookup types?

YES/NO
APPROVAL

BOLLEAN
(TRUE/FALSE)
LOOP COUNTER
(EXIT/LOOP)
Routing Action
(FORWARD/ NOOP/ RESPOND/TRANSFER)
<DEFALUT>
SUCCESS/FAILURE

(APPROVE /REJECT)

Have can we create your own lookup types?

To define a lookup type:


1. In the Oracle Workflow Builder, select the item type you want in the
navigator tree. Then choose New Lookup Type from the Edit menu.
2. In the Lookup Type property page, enter an internal name for the lookup
type. The internal name must be all uppercase without any colons or leading
or trailing spaces.
3. Enter a display name for the lookup type.
4. Enter a description of the lookup type.
5. Choose Apply to save your changes.
(To define a lookup code:
1. In the Oracle Workflow Builder, select the lookup type you want in the
navigator tree. Then choose New Lookup Code from the Edit menu.
2. In the Lookup Code property page, enter an internal name for the lookup
code. The internal name must be all uppercase without any colons or leading
or trailing spaces.
3. Enter a display name for the lookup code.
4. Enter a description of the lookup code.
5. Choose Apply to save your changes. )
12)

How can we attach attributes to messages?


Page 4 of 84

WORKFLOW

To define a message attribute:


1. In the Oracle Workflow Builder, select the message you want in the
navigator tree. Then choose New Attribute from the Edit menu.
2. In the Attribute property page, enter an internal name for the attribute.
The internal name must be all uppercase without any colons or leading or
trailing spaces.
3. Enter a display name for the attribute.
4. Enter a description of the attribute.
5. In the Type field, select the data type for the attribute.
6. Depending on the data type, enter format information, if applicable.
7. Specify either Send or Respond in the Source field to indicate whether
the attribute should send information to the recipient or prompt the recipient
for a response, respectively. You should set the source to Send for any
message attributes that you include in the message subject and message
body for token substitution.
8. Set the default value of a Send attribute to reference either a constant
or the runtime value of an item type attribute. You can optionally set a
default value for a Respond attribute as well.
9. Choose Apply to save your changes.
Note: To define a message attribute that references an existing item
attribute, you can also select the item attribute in the navigator tree and
drag it onto the message you want in the navigator tree. Then edit the
property page that appears, making sure the message attribute has the
appropriate source. The default type is automatically set to Item Attribute
and the default value references the originating item attribute.
13)
same?
14)
15)

Can u delete the existing workflowif yes how can u do the


Explain different workflow table and what for they used?
How version of workflow can be maintained?
Page 5 of 84

WORKFLOW

16)

How can u know which workflow is being used using tables?

17) Suppose u have modified a workflow and if want to get the


earlier version of
WF how could u get the same?
18) Can u write commit in a workflow and why?
19) What is the WF standard?
20) How to pass parameters to WF from forms?
21) Can u call WF from sql?
YES because we can call plsql procedure from sql so same like we can also
call workflow procedure API from sql.
22) What is time out mode?
Time Out.docx

23) Can u used call a process in same process? Means suppose u


have got one
process say A and u are using process B in process A. so can
u call process B
again in process A?
24) What are workflow APIs? Which API u has to used? Whats
use?
25) Can u debug the workflow? If yeshow can u do this?

26) How can I launch WF from concurrent program?

Page 6 of 84

WORKFLOW

Concurrent Progrm in
Workflow.docx

27) How can u display notifications in HTML format? What are the
steps?
28) How can I restrict the data base to enter the data in WF tables
which maintain
The log of launching of workflows?
29) What is event in workflow?
30) How can I set the notification format?(either text or HTML)
31) How can I run the workflow from the same position where WF
has been stuck
up because of error?
32) Launch Workflow from PLSQL Code?
declare
v_itemtype
v_itemkey
v_process
v_userkey
begin

VARCHAR2(50);
VARCHAR2(50);
VARCHAR2(50);
VARCHAR2(50);

v_itemtype := 'DEMOIT';
v_itemkey := '1233';
v_userkey := '1233';
v_process := 'DEMOPROCESS';
WF_ENGINE.Threshold := -1;
WF_ENGINE.CREATEPROCESS(v_itemtype, v_itemkey, v_process);
wf_engine.setitemuserkey(v_itemtype, v_itemkey, v_userkey );
wf_engine.setitemowner (v_itemtype, v_itemkey,'SYSADMIN');
WF_ENGINE.STARTPROCESS(v_itemtype, v_itemkey);
commit;
exception when others
then
dbms_output.put_line(SQLERRM);
end;

What are roles in workflow and how they are used?


Page 7 of 84

WORKFLOW

Roles are similar to email distribution lists. Roles holds group of users to send
email.
How do you download or upload a workflow from a server?
We can do in two ways
1. from command prompt using wfload
2. Open workflow in standalone builder and then do save as and select
database.
To Start Oracle Workflow Builder from the MSDOS Prompt:
Rather than starting Oracle Workflow Builder by doubleclicking on its
Windows icon, you can also type in a command at the MSDOS
prompt and specify the file or database to connect to.
1. In an MSDOS prompt window, type the following command to Start Oracle
Workflow Builder with a specific workflow data file, Where <filename.wft>
represents the full path and name of the data file:
wfbldr <filename.wft>
2. To start Oracle Workflow Builder with a specific database connection, type
the
following
command
at
the
MSDOS
prompt,
where
<username/password@connect>
represents
the
database
account
information to connect to:
wfbldr c <username/password@connect>
Note: If you run Oracle Workflow Builder in Microsoft Windows 98 or
Windows NT 4.0 or higher, you can also Doubleclick on a workflow data file
(.wft) from the Windows Explorer to automatically open that file and start
Oracle Workflow Builder.
Note: If you are using the version of Oracle Workflow Embedded in Oracle
Applications, use the APPS schema to Connect to the database.
3. To start Oracle Workflow Builder and open a specified item type in a data
store, append the following to the appropriate command shown in Step 1 or
2, where <item_type> represents the internal name of the item type you
want to open:
E <item_type>
For example:
wfbldr wfdemo.wft E wfdemo
4. To start Oracle Workflow Builder and open a specified process diagram in a
data store, append the following to the appropriate command shown in Step
1 or 2, where <item_type:process> represents the internal names of the
item type and process you want to open:
E <item_type:process>
For example:
wfbldr wfdemo.wft E WFDEMO:NOTIFYAPPROVER
How to retry multiple errored workflow processes?
Page 8 of 84

WORKFLOW

It can be done from Oracle Application Manager available in System


administrator responsibility.
What is the access level in workflow used for?

How do you define start and end functions in workflow? How does
they differ from normal functions?
Using the standard functions available in WFSTD Item type we define start
and end functions. They are standard to which we dont need to link any
PL/SQL function and return any value to it.
What are the activity status in workflow ?
An Activity May have the following status :
Active
-Activity is Running
Complete
-Activity Completed Normally
Waiting
-Activity is Waiting to Run
Notified
-Notification Activity is Delivered And Open
Deffered
-Activity is Deffered
Error
-Activity is Completed With Error
Suspended
-Activity is Suspended

What is the difference between a function and notification in


workflow?
Function is used perform some PL/SQL operation and finally received input
from PL/SQL procedure or function. It can not send emails to users. Where
are Notification can be used to send email notification to users and also
perform PL/SQL operations.
I have sent two different notifications to two different users and I
want to wait till both they are approved to send 3rd notification.
How can you achieve it?
Use AND function from WFSTD item type.
What is item type and item key in workflow?
Item Type is the boss in hierarchy or workflow components. Item type holds
all sub components like functions, notifications, lookups, messages,
attributes, events etc Item Key is unique key which need to be provided for
item type while running an instance or workflow. Combination of item type,
item key should be always unique.
How do you use attribute values in workflow messages?

Page 9 of 84

WORKFLOW

How do you use lookups in workflow?

What are roles in workflow and how they are used?

How do you download or upload a workflow from a server?


What are steps to customize the workflow?

What functions can you perform from workflow administrator


responsibility?

To send an email to the user workflow notification is the only way or


is there any other ways to send it?

Give me some workflow standard procedures?

How can you run/start/kickoff workflow?

A workflow can be initiated from PL/SQL using 2 methods, Launch Process and Start
Process. I have given examples of both methods below
Launch Process
CREATE OR REPLACE PACKAGE launchwflow_pkg
AS
PROCEDURE launchwf;
END launchwflow_pkg;
/
CREATE OR REPLACE PACKAGE BODY launchwflow_pkg
AS
PROCEDURE launchwf
IS
l_wfsequence
NUMBER;
BEGIN
l_wfsequence := '123456';
-- Kick off the workflow

Page 10 of 84

WORKFLOW
wf_engine.launchprocess (itemtype => 'PKWFPROP',
itemkey => l_wfsequence,
process => 'PKPROPOSAL',
userkey => '3456456466',
owner
=> 'OPERATIONS'
);
COMMIT;
RETURN;
END launchwf;
END launchwflow_pkg;
/
Start Process
CREATE OR REPLACE PACKAGE BODY wflowproc
AS
PROCEDURE start_test_wf
IS
ret_stat
NUMBER;
l_wfsequence
NUMBER;
l_itemtype
VARCHAR2 (40);
l_process
VARCHAR2 (40);
l_userkey
VARCHAR2 (40);
l_owner
VARCHAR2 (40);
l_parent_itemtype
VARCHAR2 (40);
l_parent_itemkey
VARCHAR2 (40);
BEGIN
l_itemtype := 'PKWFPROP';
l_process := 'PKPROPOSAL';
l_userkey := 'ABCD1234';
l_owner := 'OPERATIONS';
l_wfsequence := '12345';
-- Create the workflow process instance
wf_engine.createprocess (itemtype => l_itemtype,
itemkey => l_wfsequence,
process => l_process,
user_key => NULL,
owner_role => NULL
);
-- Set the user key of the workflow (the user key can be set in the
-- CreateProcess step also. Then this step will not be required)
wf_engine.setitemuserkey (itemtype => l_itemtype,
itemkey => l_wfsequence,
userkey => l_userkey
);
-- Set the workflow item owner
wf_engine.setitemowner (itemtype => l_itemtype,
itemkey => l_wfsequence,
owner
=> l_owner
);
-- Set the initial values for the attributes
wf_engine.setitemattrtext (itemtype => l_itemtype,
itemkey => l_wfsequence,

Page 11 of 84

WORKFLOW
aname => 'REQUESTOR',
avalue => 'OPERATIONS'
);
wf_engine.setitemattrtext (itemtype => l_itemtype,
itemkey => l_wfsequence,
aname => 'APPROVER',
avalue => 'MANAGER'
);
-- If the workflow we are about to execute is going to be a child
process
-- for another workflow then we need to connect the running parent
process
wf_engine.setitemparent (itemtype => l_itemtype,
itemkey => l_wfsequence,
parent_itemtype
=>
l_parent_itemtype,
parent_itemkey
=>
l_parent_itemkey,
parent_context
=> NULL
);
-- Kick off the workflow
wf_engine.startprocess (itemtype => l_itemtype, itemkey =>
l_wfsequence);
COMMIT;
END start_test_wf;
END wflowproc;
/

What is wf_engine package used for?

How many processes can each workflow contain?

What is Runnable option in workflow? At what level it exists?

What are different types of attributes in workflow?

How do you reassign a notification?

What is process in workflow?

Page 12 of 84

WORKFLOW

How can you send direct oracle form link through workflow
notifications?

How can you send a notification to multiple users? Can you change
the list dynamically?

Can you send html code in workflow notification?

I have sent two different notifications to two different users and I


want to wait till atleast one is approved to send 3rd notification.
How can you achieve it?

2. What are the steps involved in oracle workflow?


design & create a Workflow using Oracle Workflow Builder
start the Oracle Workflow process from pl/sql
integrate Oracle Workflow with pl/sql for validation and DML etc.
build Oracle Workflow Notifications
attach roles/people to notifications in Oracle Workflow
3. How do you send a particular Oracle Apps Workflow
Activity/Function within a workflow process into background mode?.
If cost of the workflow activity is greater than 50, then the
workflow activity will
be processed in background mode only, and it won't be processed
in online mode.
4. What are the various ways to kick-off a workflow?
You can eiter use wf_engine.start_process or
you can attach a runnable process such that it subscribes to a workflow
event.
5. When starting (kicking off) an oracle workflow process, how do
you ensure that it

Page 13 of 84

WORKFLOW

happens in a background mode?


a) if initiating the process using start_process, do the below
wf_engine.threshold := -1;
wf_engine.createprocess(l_itemtype,l_itemkey,'<YOUR PROCESS
NAME>');
wf_engine.startprocess(l_itemtype, l_itemkey)
b) When initiating the workflow process through an event subscription,
set the Execution Condition Phase to be equal to or above 100 for it to
be executed by
background process
6. Give me one example where apps uses partitioning in Oracle
workflow?
WF_LOCAL_ROLES
7. Can you send blob attachments via workflow notifications?
Yes, you can send BLOB Attachments.
8.

When will an activity be deferred in Oracle workflow?


Activity cost > Workflow Engine threshold

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.
9.

What is the primary purpose of a oracle workflow?


Routes information, Sends notifications, Defines process rules

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.

Page 14 of 84

WORKFLOW

10.
How will you define the possible results of an activity in order
to drive
different transitions?
As lookup codes for a lookup type
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.
11.
Time-out parameters apply to which activity in Oracle
workflow?
Notification
A time-out parameter only applies to a notification activity since the timeout parameters
are used to measure when a notification expires.
It does not apply to a function activity or a process activity.
12.

What will solicit responses from a notification activity?

Having a Respond message attribute


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.
13.
Which Work Engine API should you use to begin execution of
an activity in
Oracle workflow?
StartProcess
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
Page 15 of 84

WORKFLOW

specified activity may currently be performed on the item.


14. Which implementation process group comes before the product
family
processes?
Common application processes
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.
15.
What is the proper format for an internal name in the
Workflow Builder
Component?
An internal name for a Workflow Builder component must be in uppercase,
have no spaces, and be unique , max 8 charaters size within item type.
16. Which of the following statements is true?
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.
17. Which component in Oracle Workflow is the graphical interface
for
Workflow processes?
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.
18. When do you need a selector for an item type?
When you have more than one process associated with an item type,
you need a
Page 16 of 84

WORKFLOW

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.
19. What does the Workflow Engine do when a function activity has
finished?
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.
20.

What job does the SetItemUserKey API perform?

Set the user-friendly identifier for an item


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

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
Page 17 of 84

WORKFLOW

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
Page 18 of 84

WORKFLOW

B.
C.
D.

Issue a commit
Generate a log file
Notify the user

Answer to the above Questions


1.

C.Activity cost > Workflow Engine threshold

ExplanationAn 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

ExplanationThe 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
ExplanationThe SetItemUserKey API is used for setting a user-friendly
identifier for an item.
4.

B.As lookup codes for a lookup type

ExplanationYou 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

ExplanationA 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

ExplanationHaving 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.
Page 19 of 84

WORKFLOW

7.
B.StartProcess
ExplanationThe 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
ExplanationCommon 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

ExplanationAn 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.
ExplanationA 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
ExplanationThe 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
ExplanationWhen 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.
Page 20 of 84

WORKFLOW

1. What are threshold in Workflows?


Each function activity and event activity has a cost or thresh hold associated
with it. The cost is a value representing the number of seconds it takes for
the Workflow Engine to execute the activity- minimum and maximum.
Minimum Threshold- Specify the minimum cost that an activity must have for
this background engine to execute it, in hundredths of a second.
Maximum Threshold - Specify the maximum cost that an activity can have
for this background engine to execute it, in hundredths of a second.
By using Minimum Threshold and Maximum Threshold you can create
multiple background engines to handle very specific types of activities. The
default values for these arguments are 0 and 100 so that the background
engine runs activities regardless of cost.
The Workflow Engine threshold is set to 50 as a default. Activities with a cost
higher than 50 are deferred for background engines to process.
Answer Question
2. What are the Access Levels to be set for various requirements
such as Read Only, Customizable etc..?
Each user of Oracle Workflow Builder operates the system at a certain access
level.
The access levels are defined as follows:
0-9: Reserved for Oracle Workflow
10-19: Reserved for Oracle Application Object Library
20-99: Reserved for Oracle E-Business Suite
100-999: Reserved for customer organizations
1000: Public
To ensure that your customizations are preserved during an upgrade of
Oracle Workflow:
Check your access level before you make your modifications to the
predefined workflow process.
Oracle E-Business Suite: 100
Standalone Oracle Workflow: 100 or higher
3. How are Deferred Activities started again?
Page 21 of 84

WORKFLOW

The process can be restarted by the Notification System,such as when a


user responds to a notification; by the background engine, such as when a
deferred activity is executed; or by the Business Event System, such as when
an event message is dequeued from an inbound queue and sent to the
workflow process.
With an asynchronous process, the user does not have to wait for the
process to complete to continue using the application. However, the results
of the process are not available until the process is completed at a later
time.
4. How to Launch a Workflow?
-The Launch Process activity lets you launch another workflow process from
the current process.
This activity calls the PL/SQL procedure named
WF_STANDARD.LAUNCHPROCESS.
5. What are the APIs are generally used in Workflows?
- The Workflow Engine APIs can be called by an application program or a
workflow
function in the runtime phase to communicate with the engine and to change
the status of each of the activities. These APIs are defined in a PL/SQL
package called WF_ENGINE.
Workflow Engine APIs 2-19
getItemAttributes setitemattributs
Event HandleError SetItemParent ItemStatus getProcessStatus -

******************************************************************************
********

I am not getting a notification, what is wrong ?


Check the following:
The event and subscriber are enabled.
Page 22 of 84

WORKFLOW

There is a valid AME Rule is defined.


There is a valid Validity Rule for the item
There is a workflow queue defined for the wf_in, wf_deferred
and wf_out listeners that runs periodically.
Detailed screenshots are available.
How do i check that the event/subscriber are enabled?
1)
2)
3)
4)
5)
6)
7)
8)

Choose the Responsibility: Workflow Administrator Event Manager.


Choose the Function: Add Events/Event Groups.
Search for oracle.apps.gmi.inventory.created.
Make sure the status column is enabled.
Click on Edit Subscription.
Make sure the status is Enabled.
Click on Edit.
Make sure the phase is 101 (i.e. Anything higher than 100 is fine).

How do i check that the AME rule?


1)
Choose the Responsibility: AME Application Administrator then select
Approvals.
2)
Define/verify a condition for a specific item.
3)
Define/verify an approval group.
4)
Define/verify a rule for that item to use the approval group. It is
advised to make
a rule that is always true or has no conditions, at least initially.
How do i check the Specification and Validity Rule?
1)
Make sure the item has a valid Specification and Specification
Validity Rule.
2)
If the transaction is WIP, make sure you have a valid WIP Spec
Validity Rule; if
Supplier, a valid Supplier Validity Rule. It maybe advisable to create very
simple
and general Specs and Spec Validity Rules initially such as Organization
based.
3) Both Spec and Spec VR have to be approved.
How do i ensure the workflow queue is working?
1) Choose the Responsibility: Workflow Administrator Event Manager.
2) Choose the Function: Check Event Manager Setup.
3) In the listeners table, there should be valid WF_IN and WF_DEFERRED
schedulers (if not, create them).
Page 23 of 84

WORKFLOW

4) For each of the two listeners, create the Edit link in the Action column.
5) Click on Edit.
6) Erase the value in Run Date then click on Submit.
How do i see the progress of the workflow process?
1) Choose the Responsibility: Workflow Administrator Web applications
2) Choose the Function: Find Processes
3) Look for processes for your workflow (i.e. OPM Quality Sample
Creation)
4) Listed are the workflow processes; Find the one with the transaction id
or date
5) Click on the hyper link for the process.
6) Click on "View Diagram"
7) The diagram shows you the progress of the process.
I see a Form Link in my notification but it is not enabled.?
-

Make sure the user has the responsibility function to access the
Samples Form.

I see a Form Link in my notification and it is enabled; When I click it,


it does not
Start Forms?
- This may be a Jinitiator setup issue; you may need version 1.1.8.6
I am not getting an ERES, what is wrong?
Check the following:
The event and subscriber are enabled.
There is a valid AME Rule is defined.
The Transcation Configuration variables eSignature Required
is changed to Y
The EDR profile EDR: eRecords and eSignatures is changed to
Yes for the application/responsibility/user

1) How to handle Exceptions in workflow?


Either make the exception notify someone to take a corrective action, or go
into error and train your WF Admins how to correct these exceptions

Page 24 of 84

WORKFLOW

2) Steps in mind before transporting a workflow?


Check your transports for all business objects. Check for other things that
the Workflow relies on, such as configuration. When the transports get to the
next environment, check the Business Object, the workflow, and the assorted
config.

3. Two workflows say WS1 FOR PURCHASE ORDER WS2 FOR


PURCHASE REQUISITION. How to do both the workflows in a
single one?
Model your workflow to follow the desired approval path regardless of the
business object involved. Then ensure that each business object can call a
common routine for determining approvals based on object type.

4. There are 2 managers say MANAGER1 AND MANAGER2. If there


is a purchase order of more than 5000 then manager1 has to
approve it, if PO>5000 then first MANAGER1 then MANAGER2
has to approve simultaneously. How is it done?
check the amount of the object. Write a rule or responsibility
that routes the object to the appropriate manager based on the amount. If
necessary, put the approval task into a loop to ensure that the PO gets all
the appropriate levels of approval.

5) How to debug a WORKFLOW.?


There are too many ways to debug a workflow to be described
in this post - Try reading thru the forums, reading the documentation,
purchasing a book, etc.

1..Are there advantages to building workflows using only XAML?


Are there
Page 25 of 84

WORKFLOW

Disadvantages?

1. What are the pros and cons of using an ExternalDataExchange


service versus going directly to the WorkflowQueuingService?

2. When are attached dependency properties useful in WF


programming?

3. What behavior does the default scheduling service provide?

4. How can my code participate in a database transaction with a


workflow instance?

5. Why would I use a tracking service?

Page 26 of 84

WORKFLOW

6. Describe a scenario where the WF runtime will cancel an


executing activity.

7. Describe a scenario where I'd need to spawn an


ActivityExecutionContext.

8. Tell me why I'd use a compensation handler.

9. Tell me about the following activities: Replicator, Parallel, and


Policy.

1. How to find the latest version of a current workflow process, and


how to revert to the old version of workflow?

2. Name five very important base tables of oracle workflow and their
significance.

Page 27 of 84

WORKFLOW

WF_ITEM_TYPES
The WF_ITEM_TYPES table defines an item that is transitioning through a workflow
process. NAME (PK), PROTECT_LEVEL, CUSTOM_LEVEL, PERSISTENCE_TYPE
WF_ITEM_ATTRIBUTES
The WF_ITEM_ATTRIBUTES table stores definitions of attributes associated with a
process. Each row includes the sequence in which the attribute is used as well as the
format of the attribute data. ITEM_TYPE (PK), NAME (PK), SEQUENCE, TYPE,
PROTECT_LEVEL, CUSTOM_LEVEL
WF_ACTIVITIES
WF_ACTIVITIES table stores the definition of an activity. Activities can be processes,
notifications, functions or folders.ITEM_TYPE (PK), NAME (PK), VERSION(PK), TYPE,
RERUN, EXPAND_ROLE, PROTECT_LEVEL, CUSTOM_LEVEL, BEGIN_DATE,
RROR_ITEM_TYPE, RUNNABLE_FLAG
WF_ACTIVITY_ATTRIBUTES
The WF_ACTIVITY_ATTRIBUTES table defines attributes which behave as parameters for
an activity. Activity attributes are only used by function activities.Examples of valid
attribute types are DATE, DOCUMENT, FORM, ITEMATTR, LOOKUP, and VARCHAR2.
ACTIVITY_ITEM_TYPE (PK), ACTIVITY_NAME (PK), ACTIVITY_VERSION (PK), NAME (PK),
SEQUENCE, TYPE, VALUE_TYPE, PROTECT_LEVEL, CUSTOM_LEVEL
WF_MESSAGES
WF_MESSAGES contains the definitions of messages which may be sent out as
notifications. TYPE (PK), NAME (PK), PROTECT_LEVEL, CUSTOM_LEVEL
WF_MESSAGE_ATTRIBUTES
WF_MESSAGE_ATTRIBUTES contains message attribute definitions.
WF_NOTIFICATIONS
WF_NOTIFICATIONS holds the runtime information about a specific instance of a sent
message. A new row is created in the table each time a message is sent.
WF_NOTIFICATION_ATTRIBUTES
WF_NOTIFICATION_ATTRIBUTES holds rows created for attributes of a notification. When
each new notification is created, a notification attribute row is created for each message
attribute in the message definition. Initially, the values of the notification attributes are
set to the default values specified in the message attribute definition.
WF_ITEMS
WF_ITEMS is the runtime table for workflow processes. Each row defines one work item
within the system. ITEM_TYPE (PK), ITEM_KEY (PK), ROOT_ACTIVITY,
ROOT_ACTIVITY_VERSION, BEGIN_DATE

Page 28 of 84

WORKFLOW

WF_ITEM_ACTIVITY_STATUSES
The WF_ITEM_ACTIVITY_STATUSES TABLE is the runtime table for a work item. Each row
includes the start and end date, result code, and any error information an activity
generates. ITEM_TYPE (PK), ITEM_KEY (PK), PROCESS_ACTIVITY (PK)
WF_ITEM_ACTIVITY_STATUSES_H
The WF_ITEM_ACTIVITY_STATUSES_H table stores the history of the
WF_ITEM_ACTIVITY_STATUSES table. ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY
WF_PROCESS_ACTIVITIES
WF_PROCESS_ACTIVITIES stores the data for an activity within a specific process.
PROCESS_ITEM_TYPE, PROCESS_NAME, PROCESS_VERSION, ACTIVITY_ITEM_TYPE,
ACTIVITY_NAME, INSTANCE_ID (PK), INSTANCE_LABEL, PERFORM_ROLE_TYPE,
PROTECT_LEVEL, CUSTOM_LEVEL
WF_ACTIVITY_TRANSITIONS
The WF_ACTIVITY_TRANSITIONS table defines the transitions from one activity to
another in a process. Each row includes the activities at the beginning and end of the
transition, as well as the result code and physical location of the transition in the
process window. FROM_PROCESS_ACTIVITY (PK), RESULT_CODE (PK),
TO_PROCESS_ACTIVITY (PK), PROTECT_LEVEL,CUSTOM_LEVEL
WF_ACTIVITY_ATTR_VALUES
The WF_ACTIVITY_ATTR_VALUES table contains the data for the activity attributes. Each
row includes the process activity id and the associated value for the attribute.
PROCESS_ACTIVITY_ID (PK), NAME (PK), VALUE_TYPE, PROTECT_LEVEL, CUSTOM_LEVEL

3. Name five oracle workflow apis and their significance and use

4. How would you clear stuck or deferred workflows and what is


meant by a deferred workflow

5. What is the difference between workflow wait activity and block


activity, what is the api which is used in this regard to put a wait
and to put a block.

Page 29 of 84

WORKFLOW

6. How would you continue the workflow which is in wait and which
is in block mode, name the api which is responsible for that

7. What is access level in oracle workflow and how it is significant.

8. Apart from loading the workflow from workflow builder is there


any other method of loading the workflow from database to local
machine.

9. How many types of attributes are present in workflow and what is


a document type attribute

10. How would you force a user to not re-assign the workflow to
other user.

Oracle Workflow - Important Queries


Select all workflow items for a given item type
SELECT item_type,
item_key,
to_char(begin_date,
'DD-MON-RR HH24:MI:SS') begin_date,
to_char(end_date,
'DD-MON-RR HH24:MI:SS') end_date,
root_activity activity
FROM apps.wf_items

Page 30 of 84

WORKFLOW
WHERE item_type = '&item_type'
AND end_date IS NULL
ORDER BY to_date(begin_date,
'DD-MON-YYYY hh24:mi:ss') DESC;
-- notifications sent by a given workflow
select

wn.notification_id nid,
wn.context,
wn.group_id,
wn.status,
wn.mail_status,
wn.message_type,
wn.message_name,
wn.access_key,
wn.priority,
wn.begin_date,
wn.end_date,
wn.due_date,
wn.callback,
wn.recipient_role,
wn.responder,
wn.original_recipient,
wn.from_user,
wn.to_user,
wn.subject
from
wf_notifications wn, wf_item_activity_statuses wias
where wn.group_id = wias.notification_id
and wias.item_type = 'WSHSUPI'
and wias.item_key = 'CMS21408'
/
--prompt **** Find the Activity Statuses for all workflow activities of a
given item type and item key
SELECT execution_time,
to_char(ias.begin_date,
'DD-MON-RR HH24:MI:SS') begin_date,
ap.display_name || '/' || ac.display_name activity,
ias.activity_status status,
ias.activity_result_code RESULT,
ias.assigned_user ass_user
FROM wf_item_activity_statuses ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = '&item_type'
AND ias.item_key = '&item_key'
AND ias.process_activity = pa.instance_id
AND pa.activity_name = ac.name
AND pa.activity_item_type = ac.item_type
AND pa.process_name = ap.name

Page 31 of 84

WORKFLOW
AND
AND
AND
AND
AND
AND

pa.process_item_type = ap.item_type
pa.process_version = ap.version
i.item_type = '&item_type'
i.item_key = ias.item_key
i.begin_date >= ac.begin_date
i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
UNION ALL
SELECT execution_time,
to_char(ias.begin_date,
'DD-MON-RR HH24:MI:SS') begin_date,
ap.display_name || '/' || ac.display_name activity,
ias.activity_status status,
ias.activity_result_code RESULT,
ias.assigned_user ass_user
FROM wf_item_activity_statuses_h ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = '&item_type'
AND ias.item_key = '&item_key'
AND ias.process_activity = pa.instance_id
AND pa.activity_name = ac.name
AND pa.activity_item_type = ac.item_type
AND pa.process_name = ap.name
AND pa.process_item_type = ap.item_type
AND pa.process_version = ap.version
AND i.item_type = '&item_type'
AND i.item_key = ias.item_key
AND i.begin_date >= ac.begin_date
AND i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
ORDER BY 2,
1
/
--Get a list of all Errored Workflow Activities for a given item type/
item key
SELECT ac.display_name
activity,
ias.activity_result_code RESULT,
ias.error_name
error_name,
ias.error_message
error_message,
ias.error_stack
error_stack
FROM wf_item_activity_statuses ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = '&item_type'
AND ias.item_key = '&item_key'
AND ias.activity_status = 'ERROR'
AND ias.process_activity = pa.instance_id

Page 32 of 84

WORKFLOW
AND
AND
AND
AND
AND
AND
AND
AND
AND

pa.activity_name = ac.name
pa.activity_item_type = ac.item_type
pa.process_name = ap.name
pa.process_item_type = ap.item_type
pa.process_version = ap.version
i.item_type = '&item_type'
i.item_key = ias.item_key
i.begin_date >= ac.begin_date
i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
ORDER BY ias.execution_time
/
--prompt *** Error Process Activity Statuses
SELECT execution_time,
to_char(ias.begin_date,
'DD-MON-RR HH24:MI:SS') begin_date,
ap.display_name || '/' || ac.display_name activity,
ias.activity_status status,
ias.activity_result_code RESULT,
ias.assigned_user ass_user
FROM wf_item_activity_statuses ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = i.item_type
AND ias.item_key = i.item_key
AND ias.process_activity = pa.instance_id
AND pa.activity_name = ac.name
AND pa.activity_item_type = ac.item_type
AND pa.process_name = ap.name
AND pa.process_item_type = ap.item_type
AND pa.process_version = ap.version
AND i.parent_item_type = '&item_type'
AND i.parent_item_key = '&item_key'
AND i.begin_date >= ac.begin_date
AND i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
UNION ALL
SELECT execution_time,
to_char(ias.begin_date,
'DD-MON-RR HH24:MI:SS') begin_date,
ap.display_name || '/' || ac.display_name activity,
ias.activity_status status,
ias.activity_result_code RESULT,
ias.assigned_user ass_user
FROM wf_item_activity_statuses_h ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = i.item_type

Page 33 of 84

WORKFLOW
AND
AND
AND
AND
AND
AND
AND
AND
AND
AND
AND

ias.item_key = i.item_key
ias.process_activity = pa.instance_id
pa.activity_name = ac.name
pa.activity_item_type = ac.item_type
pa.process_name = ap.name
pa.process_item_type = ap.item_type
pa.process_version = ap.version
i.parent_item_type = '&item_type'
i.parent_item_key = '&item_key'
i.begin_date >= ac.begin_date
i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
ORDER BY 2,
1
/
prompt **** Error Process Errored Activities
SELECT ac.display_name
activity,
ias.activity_result_code RESULT,
ias.error_name
error_name,
ias.error_message
error_message,
ias.error_stack
error_stack
FROM wf_item_activity_statuses ias,
wf_process_activities
pa,
wf_activities_vl
ac,
wf_activities_vl
ap,
wf_items
i
WHERE ias.item_type = i.item_type
AND ias.item_key = i.item_key
AND ias.activity_status = 'ERROR'
AND ias.process_activity = pa.instance_id
AND pa.activity_name = ac.name
AND pa.activity_item_type = ac.item_type
AND pa.process_name = ap.name
AND pa.process_item_type = ap.item_type
AND pa.process_version = ap.version
AND i.parent_item_type = '&item_type'
AND i.parent_item_key = '&item_key'
AND i.begin_date >= ac.begin_date
AND i.begin_date < nvl(ac.end_date,
i.begin_date + 1)
ORDER BY ias.execution_time
/
prompt **** Attribute Values
SELECT NAME attr_name,
nvl(text_value,
nvl(to_char(number_value),
to_char(date_value))) VALUE
FROM wf_item_attribute_values
WHERE item_type = upper('&item_type')
AND item_key = nvl('&item_key',

Page 34 of 84

WORKFLOW
item_key)
/
--Count of all workflow deferred activities based
SELECT COUNT(1),
was.item_type
FROM apps.wf_items
wi,
apps.wf_item_activity_statuses was,
apps.wf_process_activities
pra
WHERE wi.item_type = was.item_type
AND wi.item_key = was.item_key
AND wi.end_date IS NULL
AND was.end_date IS NULL
AND was.activity_status = 'DEFERRED'
--AND was.item_type = 'REQAPPRV'
AND was.item_type = wi.item_type
AND pra.instance_id(+) = was.process_activity
GROUP BY was.item_type;
--check the various workflow agent listeners and their statuses
SELECT t.component_name,
p.owner,
p.queue_table,
t.correlation_id
FROM applsys.fnd_svc_components t,
applsys.wf_agents
o,
dba_queues
p
WHERE t.inbound_agent_name || t.outbound_agent_name = o.name
AND p.owner || '.' || p.name = o.queue_name
AND t.component_type LIKE 'WF_%AGENT%';
--query to find records that are pending in each of the workflow agent
listener queues
SELECT 'select ''' || t.component_name || ' (queue_table: ' ||
p.queue_table ||
')''||'' Count: ''||count(*) c from ' || p.owner || '.' ||
p.queue_table ||
' where deq_time is null and nvl(delay,enq_time)<sysdate-1/24 ' ||
nvl2(t.correlation_id,
'and corrid like ''' || t.correlation_id || ''' ',
NULL) || 'having count(*)>0;'
FROM applsys.fnd_svc_components t,
applsys.wf_agents
o,
dba_queues
p
WHERE t.inbound_agent_name || t.outbound_agent_name = o.name
AND p.owner || '.' || p.name = o.queue_name
AND t.component_type LIKE 'WF_%AGENT%';
--Look for deferred events in wf_deferred. this can also be used to track
the status of notifications/business events that are waiting to be
processed/that have errored out

Page 35 of 84

WORKFLOW
SELECT a.user_data.geteventname(),
decode(a.state,
0,
'0 = Ready',
1,
'1 = Delayed',
2,
'2 = Retained/Processed',
3,
'3 = Exception',
to_char(a.state)) state,
a.user_data.PARAMETER_LIST,
a.user_data.event_data,
a.user_data.event_key,
a.*
FROM apps.wf_deferred a
WHERE corrid LIKE '%oracle.apps.wsh.sup.ssro'
AND rownum < 10;

Just to search required tables


--------------------------------SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE='TABLE'
AND OBJECT_NAME LIKE '%WF%ITEM%TYPE%'
1) TO CHECK ITEM TYPE CREATED (Create Item Type)
SELECT * FROM WF_ITEM_TYPES_TL
WHERE NAME LIKE '%ZEN%'

Page 36 of 84

WORKFLOW

2) TO CHECK ATTRIBUTES IN A TABLE (Create Item Attributes)


SELECT * FROM WF_ITEM_ATTRIBUTES_TL
WHERE ITEM_TYPE LIKE '%ZEN%'
3) To check message AND attributes attached to the message
A)

SELECT * FROM WF_MESSAGES_TL


WHERE NAME LIKE '%ITEM_MSG%'
AND TYPE='ZENITI'

B) Check attributes attached to the message


SELECT * FROM WF_MESSAGE_ATTRIBUTES_TL
WHERE MESSAGE_NAME='ITEM_MSG_I'
--AND MESSAGE_TYPE='ZENITI'
4) TO CHECK NOTIFICATIONS
SELECT * FROM WF_NOTIFICATIONS
WHERE SUBJECT LIKE '%has been create%'
WHERE MESSAGE_NAME LIKE '%ITEM_MSG%'
5) After submitting the workflow from front-end
SELECT * FROM WF_NOTIFICATIONS WHERE MESSAGE_NAME='ITEM_MEG_I' --???
SELECT * FROM WF_ACTIVITIES_TL WHERE ITEM_TYPE='ZENITI'
SELECT * FROM WF_ITEM_ACTIVITY_STATUSES
WHERE ITEM_TYPE = 'ZENITI'

WorkFlow FAQ General


1. About Workflow General
2. Oracle Workflow 2.6
3. License
4. Background Engine
5. Builder
6. Commit Issues
7. Delete Issues
8. Install Problems
9. Error handling
10. Applications
11. Mailer Setup
12. Utilities
13. Looping
14. Monitor
Page 37 of 84

WORKFLOW

15. Notifications
16. Problem Spotting
17. Security
About Workflow General
1. What is Oracle Workflow Cartridge and how does this relate to earlier
Workflow products ?
2. What platforms is it available on?
3. When will translated versions be available?
4. If I create custom workflows in 2.03, how do I upgrade to 2.5?
5. If I create custom workflows in 2.5, how do I upgrade to 2.6?
6 What are the major components of the workflow system?
8 Does Workflow integrate with LDAP or NDIS compliant directory
9 Can Workflow work on a distributed database?
10 What platform is Workflow currently available on?
11 How does Oracle Workflow differ from Oracle Alert?
12 What electronic mail systems can I use in conjunction with Oracle
Workflow Notifications?
13 How do I ensure that the correct mail APIs are linked into WFMAIL?
14 What electronic mail systems can I use in conjunction with Oracle
Workflow Notifications?
15 What version of Oracle Workflow is supported with Web Apps 2.0.1? For
example, can Applications 10.7 Prod 16/16.1 and Oracle Applications for the
Web 2.0.1 run with Oracle Workflow 1.x and 2.x ?
16 How do I ensure that the correct mail APIs are linked into WFMAIL?
17 How do I verify the version of Oracle Workflow that I have installed?
18 How do I shut down the Oracle Workflow Notification Mailer in Oracle
Applications?
19 How do I send a Summary Only Notification from Oracle Workflow?
20 How do I reorder the information displayed in the Notifications screen on
the Web.
21 How do I select the 'File, Load Roles' option when it is greyed out?
22 How does 'Expand Roles' work?
23 How to force a Workflow activity to run in background.
24 How do I create a new Workflow ?
25 Why does Oracle Workflow Builder drag and drop not work the same way
as other editors and Object Navigators?
26 How do I improve performance of my Oracle Workflow Views?
27 How do I define my Workflow time-out periods in business days instead of
in hours?
28 How do I display the Internal Name of an object in the Object Navigator?
29 How do I display the Performer of a Notification in the Process Detail
screen ?
30 How do I create a shortcut to my Workflow instance?
31 How do I customize the Account Generator Workflow process for my
Page 38 of 84

WORKFLOW

company?
32 What Access Level should I be using in Oracle Workflow Builder?
33 How do I trace errors in my Workflow processes?
34 When attempting to view concurrent request output or log information in
workflow 2.0.3 with Microsoft Internet Explorer, you receive the error
Authentication failed. What do you do?
What is Oracle Workflow Cartridge and how does it relate to earlier Workflow
products?
Oracle Workflow Cartridge is the name given to Oracle Standalone and the
Workflow Option to the database. As such, it has all the same licensing
restrictions as Standalone did before. Please check the licensing page for
more details.
What platforms is it available on?
Oracle Workflow 2.6 has been released on ALL platforms.

When will translated versions be available?


Translation of Workflow Embedded in Apps will appear as Oracle Apps is
translated
(this does not include the builder because which is considered an admin
tool).
Translation of WF Standalone (including the builder) is ongoing.

If I create custom workflows in 2.03, how do I upgrade to 2.5?


Do you have workflow 2.0.3 embedded in Oracle Apps 11 or standalone
version?
If standalone, then you would obtain the Workflow 2.5 cd and select the
option to perform an upgrade from 2.0.3 to 2.5 instead of an install of 2.5.
If your workflow 2.0.3 is embedded in Oracle Apps 11 then when you
upgrade to Oracle Apps 11i it would include upgrading to workflow 2.5.
Oracle Apps 11i uses Workflow 2.5. As part of an upgrade your custom
workflow definitions stored in the database are upgraded to the 2.5 data
model.
If you are concerned about any flat file workflow definitions you may have,
the Workflow Builder and Workflow Loader for 2.5 can "read" the 2.0.3 flat
file format.
However, once "read" into a 2.5 Workflow Builder and saved to flat file

Page 39 of 84

WORKFLOW

format again, your 2.0.3 flat files will be saved in the 2.5 flat file format.

If I create custom workflows in 2.5, how do I upgrade to 2.6?


If standalone, then you would obtain the Workflow 2.6 cd and select the
option to perform an upgrade from 2.5 to 2.6 instead of an install of 2.6.
If your workflow 2.5 is embedded in Oracle Apps 11i then when you upgrade
to Oracle Apps 11i it would include upgrading to workflow 2.6.
Oracle Apps 11i uses Workflow 2.5 and in the future will use 2.6.
As part of an upgrade your custom workflow definitions stored in the
database are upgraded to the 2.5 data model.
If you are concerned about any flat file workflow definitions you may have,
the Workflow Builder and Workflow Loader for 2.6 can "read" the 2.5 flat file
format.
However, once "read" into a 2.5 Workflow Builder and saved to flat file
format again, your 2.5 flat files will be saved in the 2.6 flat file format.

What are the major components of the workflow system?


The main components of Oracle Workflow are the Workflow Engine, Business
Event System, the Notification Service, the Workflow BUilder, and
administrative and monitoring tools.
The Workflow Engine is a set of tables and PL/SQL stored procedures that
manages the execution of workflow processes and tracks work-in- process. It
maintains the state information of all the workflow items and generates
complete audit trails. It executes workflow rules which are PL/SQL functions,
and it delivers notifications as human activities become eligible. Most
Workflow Engine APIs are also available from Java.
The Business Event System is an application service that uses the Oracle
Advanced Queuing (AQ) infrastructure to communicate business events
between systems. The Business Event System consists of the Event
Manager, which lets you register subscriptions to events that are significant
to your systems, and event activities, which let you model business events
within workflow processes.
The Notification Service sends notifications to appropriate users via a Formbased connected viewer, as well as via email or WWW. It also interprets
responses and delivers response information to the sender.
Page 40 of 84

WORKFLOW

The Workflow Builder is a native Windows program written in C++. It allows


the user to graphically define a workflow process and its components
including activities, users, notifications, etc.
Oracle Workflow includes a comprehensive set of tools that let the user
graphically monitor and administer workflow transactions as well as view and
analyze transaction history.

Does Workflow integrate with LDAP compliant directory services?


Currently, the Workflow "directory service" is a set of views and PL/SQL APIs
that are implemented to reference existing user and role information in the
database. With the correct mapping of these directory service views,
Workflow can integrate with any user and role information that is stored in an
Oracle database.
In the case of Workflow for Oracle Applications, we provide a mapping of the
directory service views over the Oracle Human Resources tables. The standalone Workflow product includes a template directory service view definition
that should be customized to reference the customer's existing repository of
user and role information.
Since Oracle Workflow is resident inside the Oracle Database, integration
with LDAP services will be achieved when the database itself offers LDAP
integration (planned for Oracle 8.1). Until then could still reference this
information if the LDAP service actually stores user information in an Oracle
database.

Can workflow work on a distributed database?


Yes - Oracle Workflow 2.6 includes a major new feature called the Business
Event System which supports the sending and receiving of messages
between databases.
It is also possible using standard Oracle Database links to have your
workflow engine and application on different databases. So far the only
limitation we have come across is the inability to perform commit/rollback
across databases, a problem inherent to distributed databases, however a
simple workaround exists

Page 41 of 84

WORKFLOW

What platform is workflow currently available on?


Oracle Workflow embedded in Oracle Applications is available on all
platforms that Oracle Applications is available on.
The standalone Workflow cartridge is available on a variety of platforms
and is being ported to most.
The builder of course is a client product running on Windows
95/98/2000/NT.
How does Oracle Workflow differ from Oracle Alert?
Oracle Alert is a database event detection tool. Oracle Workflow technology
enables automation and continuous improvement to business processes,
routing information according to user-defined business rules. Oracle Alert is
designed to detect database events, Oracle workflow is designed to manage
the execution complex of business processes that result from database
events.
Oracle Alert does contain some workflow type features such as response
processing, that allow a sequence of actions to be taken depending on a
users response to a message. Oracle Workflow's response processing
capabilities are more advanced than Oracle Alert and it is recommended to
use Oracle Workflow for new development.

What electronic mail systems can I use in conjunction with Oracle Workflow
Notifications?
The Oracle Workflow Notification Mailer can be used in conjunction with
Oracle Office/Oracle InterOffice (Oracle Internet Messaging 4.2 can be used
with Workflow 2.5), UNIX Sendmail, or MAPI-compliant mail applications.

How do I ensure that the correct mail APIs are linked into WFMAIL?
Oracle Workflow Standalone can be run using WFMAIL.snd for Unix Mail or
WFMAIL.ofc for Oracle InterOffice. Within Oracle Applications, there is only
one WFMAIL executable file, so this must be linked according to the mail
system you are using.
For example, if you wish to use Oracle InterOffice as your Oracle Workflow
notification mail system, you must perform the following link:
adrelink force=Y ranlib=Y "fnd WFMAIL_OFC"
Page 42 of 84

WORKFLOW

(to create a WFMAIL_OFC executable)


Note: the name of this executable is WFMAILOO in Oracle Workflow 2.0.3
(used in Applications Release 11)
mv WFMAIL_OFC WFMAIL
(to replace the existing WFMAIL executable)
After you complete the above steps, when you start the Workflow
Notifications Mailer, it will pick up the new WFMAIL file and send Notifications
using Oracle InterOffice.
Note: When you install Oracle Applications 10.7 Prod 16/Prod 16.1 (or
Release 11), the WFMAIL file is automatically linked to use the Unix
Sendmail executable, so you must only relink (using the above
instructions) if you decide to use Oracle InterOffice.
What electronic mail systems can I use in conjunction with Oracle Workflow
Notifications?
The Oracle Workflow Notification Mailer can be used in conjunction
with Oracle Office/Oracle InterOffice (Oracle Internet Messaging 4.2
can be used with Workflow 2.5), UNIX Sendmail, or MAPI-compliant
mail applications.
What version of Oracle Workflow is supported with Web Apps 2.0.1? For
example, can Applications 10.7 Prod 16/16.1 and Oracle Applications for the
Web 2.0.1 run with Oracle Workflow 1.x and 2.x ?
Oracle Applications for the Web 2.0.1 requires Oracle Workflow 2.0 but it is
NOT compatible with Oracle Workflow 1.0.
Oracle Applications Release 10.7 Prod 16 and Prod 16.1 are now shipped with
Oracle Workflow version 2.0.3.
How do I ensure that the correct mail APIs are linked into WFMAIL?
Oracle Workflow Standalone can be run using WFMAIL.snd for Unix Mail or
WFMAIL.ofc for Oracle InterOffice. Within Oracle Applications, there is only
one WFMAIL executable file, so this must be linked according to the mail
system you are using.
For example, if you wish to use Oracle InterOffice as your Oracle Workflow
notification mail system, you must perform the following link:
adrelink force=Y ranlib=Y "fnd WFMAIL_OFC"
(to create a WFMAIL_OFC executable)
Note: the name of this executable is WFMAILOO in Oracle Workflow 2.0.3
(used in Applications Release 11)

Page 43 of 84

WORKFLOW

mv WFMAIL_OFC WFMAIL
(to replace the existing WFMAIL executable)
After you complete the above steps, when you start the Workflow
Notifications
Mailer, it will pick up the new WFMAIL file and send Notifications using
Oracle InterOffice.
Note: When you install Oracle Applications 10.7 Prod 16/Prod 16.1 (or
Release 11), the WFMAIL file is automatically linked to use the Unix
Sendmail executable, so you must only relink (using the above
instructions) if you decide to use Oracle InterOffice.
How do I verify the version of Oracle Workflow that I have installed?
For Workflow versions prior to 2.5:
----------------------------------(If you are running Oracle Workflow Embedded in Oracle Applications)
(a) Connect to SQL*Plus as APPS user
(b) Then type, select TEXT from WF_RESOURCES where
NAME='WF_VERSION';
Note: In the Prod 16 version of Oracle Workflow, the version 2.0.0
is displayed when the actual version is 2.0.1
(If you are running Oracle Workflow Standalone)
(a) Connect to SQL*Plus using the Oracle Workflow user id
(b) Then type, select TEXT from WF_RESOURCES where
NAME='WF_VERSION';
For Workflow 2.5:
----------------(If you are running Oracle Workflow Embedded in Oracle Applications)
(a) cd $FND_TOP/sql
(b) Connect to SQL*Plus as APPS user
(c) Start wfver.sql
(this script details the Workflow Server version, status and version
information for the Workflow
packages and version information for the Workflow views)
(If you are running Oracle Workflow Standalone)
Page 44 of 84

WORKFLOW

(a) cd $ORACLE_HOME/wf/admin/sql
(b) Connect to SQL*Plus using the Oracle Workflow user id
(c) Start wfver.sql
(this script details the Workflow Server version, status and version
information for the Workflow
packages and version information for the Workflow views)
How do I shut down the Oracle Workflow Notification Mailer in Oracle
Applications?
The Notification Mailer is an executable program that continually poles for
messages that must be sent to users (Notifications).
To stop this program, you must place the shutdown file in the required
directory.
If you have the environment variable $APPLCSF set, then your notification
mailer shutdown file should be placed in the $APPLCSF/$APPLLOG directory.
If $APPLCSF is NOT set, then the notification mailer shutdown file should be
placed in the $FND_TOP/$APPLLOG directory.
How do I send a Summary Only Notification from Oracle Workflow? For
example, I may want to send a message to a user listing all notifications that
are currently open (i.e. awaiting a response) instead of a message for each
notification that they have outstanding.
To do so, you must set up summary only messages by doing the following:
(a) Ensure that the NOTIFICATION_PREFERENCE field in WF_USERS for that
particular user is set to 'SUMMARY'
(in Workflow 2.5, use the 'User Preferences' link from the Workflow Home
Page)
(b) Define a notification mailer with SUMMARY_ONLY set to 'Y':
(c) Create a new mail configuration file (use $FND_TOP/resource/wfmail.cfg
as a starting point).
(d) If you already have a notification mailer running, you should set
NODE to something different than the one already defined.
How do I reorder the information displayed in the Notifications screen on the
Web.
Mouse click the underlined column heading for the column you want to
reorder
(e.g., ascending vs descending) and the notifications are reordered
automatically.
Page 45 of 84

WORKFLOW

How do I select the 'File, Load Roles' option when it is greyed out?
To use the 'File, Load Roles' option you must store your workflow definition
in the database so that you have a database connection through which you
can
bring back records from the database.
How does 'Expand Roles' work?
Expand Roles = N
---------------If you have Expand Roles set to 'N' and you are sending a Notification to a
Role Name, then a message is sent to every user in that role, and each
individual user will see that Notification in their Notification queue until
a single user in the role replies to that Notification. After which time, the
Notification is wiped from each user's Notification queue.
Expand Roles = Y
---------------If you have Expand Roles set to 'Y' and you are sending a Notification
to a Role Name, then a message is sent to every user in that role, and each
individual user will see that Notification in their Notification queue until
they reply or close that notification.
You will generally want to have Expand Roles set to 'Y' if you want to be sure
that every user in a particular role sees the message.
How to force a Workflow activity to run in background.
The workflow background engine threshold is set to 50 by default.
If you do not want the current job to run on-line then call
WF_ENGINE.THRESHOLD:=n; (where n is less than the cost setting for the
current job/activity), hence the workflow engine runs the job in background.
You should set the threshold limit back to 50 in SQL*Plus or in the next
function activity so that other activities are processed as expected.
How do I create a new Workflow ?
See Note:47711.1 for a step-by-step guide to creating
a new Workflow.
Why does Oracle Workflow Builder drag and drop not work the same way as
other editors and Object Navigators?
For Workflow 2.0.3:
------------------You need to use the 'split window' function to be able to drag
and drop.
Page 46 of 84

WORKFLOW

For Workflow 2.5:


----------------You can perform drag and drop within the Object Navigator.
How do I improve the performance of my Oracle Workflow Views?
The performance of Workflow is reliant on the Workflow Administrator
correctly creating and tuning the Workflow views (specifically WF_USERS and
WF_ROLES).
The Workflow analytical scripts will be available in Oracle Workflow 2.0.3
(Oracle Applications Release 11) and can be used against any Release 2
version
of Oracle Workflow.
Reference
--------How do I define my Workflow time-out periods in business days instead of in
hours?
This is not a standard feature of Workflow itself, however, a workaround has
been documented in Note:50468.1
How do I display the Internal Name of an object in the Object Navigator?
For Workflow versions prior to 2.5:
----------------------------------Choose View, Show Label, Internal Name (from the pull-down menu)
(The display name will be displayed in the Object Navigator with the
Internal Name in brackets afterwards)
For Workflow 2.5:
----------------Choose View, Developer Mode (this toggles on/off)
With Developer Mode ON, the Internal Name is displayed in the Navigator
and the Display Name appears in brackets.
With Developer Mode OFF, the Display Name is displayed in the Navigator.
How do I display the Performer of a Notification in the Process Detail screen ?
For Workflow versions prior to 2.5:
Page 47 of 84

WORKFLOW

----------------------------------Choose View, Show Label, Performer in Designer (from the pull-down menu)
(the Performer will be displayed alongside the notification icon instead of the
display name of the notification itself)
For Workflow 2.5:
----------------Choose View, Show Label in Designer, Choose Performer (from the pull-down
menu).
How do I create a shortcut to my Workflow instance?
Open up the Oracle Workflow Builder
Choose File, Open (from the pull-down menu)
Click on the 'Database' radio button
Enter the relevant database connection information
Choose which Item Types you want to display in the Object Navigator
Choose File, Create Shortcut (from the pull-down menu)
Enter a shortcut name if you do not wish to use the default (default is
username<database connect string> e.g. apps@R11DEMO)
You can then use this shortcut to open up the Oracle Workflow Builder and
connect to that database automatically (you will be prompted to enter the
password to then connect to the database).
If you need to see more item types than you initially selected when you
created
the shortcut, choose File, Show/Hide Item Types (from the pull-down menu)
and
select the item types to show from the list.
How do I customize the Account Generator Workflow process for my
company?
Customers are expected to customize the Account Generator process. You
can do
this by editing the existing process or creating your own process, but this
Page 48 of 84

WORKFLOW

MUST be within the seeded 'Item Type'. You should NOT create a NEW 'Item
Type'
as this would NEVER be run by Account Generator.
If you create a new process, you must ensure it is "Runnable".
You must then assign the appropriate process to the Accounting Flexfield
structure in the Account Generator Process window in Oracle Applications
(login
as System Administrator, Application -> Flexfields -> Key -> Accounts and
query
up the required Accounting flexfield structure).
What Access Level should I be using in Oracle Workflow Builder?
You should be running the Workflow Builder with an Access Level of 100
(viewable from Help -> About Workflow Builder), if you lower the access level
you run the risk of overwriting SEED workflow and applications workflow
data,
which cannot be supported. If this should happen it will be necessary for you
to reinstall the original SEEDED workflow process, using the WFLOAD
concurrent
program in UPGRADE mode.
How do I trace errors in my Workflow processes?
If a customized workflow process errors you should check the error
stack (using the Workflow Monitor and/or wfstatus.sql script), if the
procedure
in error does NOT begin with WF_.. OR <app_short_name>_... then you need
to
debug your own pl/sql procedures.
If standards in the Workflow Guide for exception handling have not been
followed,
you can still tell whether the problem is with your code, because Oracle
Workflow
traps external exceptions and reports these as
Activity Status: ERROR
Activity Result: #EXCEPTION
This is what would show up in the workflow monitor or any status report or
form
inquiry for the failing activity.

Page 49 of 84

WORKFLOW

A NAME=END HREF=#_TOP> IMG


SRC=/images/webiv/arrows/bw/up.gif
border=0 ALT="Top of Page" ALIGN=right><>
Common Questions for Version 2.6
1 What's new about Oracle Workflow 2.6?
2 Can Oracle Workflow 2.6 meet my customers Business Process Integration
requirements?
3 Does Oracle Workflow 2.6 integrate in with MQ*Series or other messaging
solutions?
4 What communication protocols are supported by Oracle Workflow 2.6?
5 Can custom Java code be integrated in with Oracle Workflow 2.6?
6 What Data Transformation services does Oracle Workflow 2.6 offer?
7 What will be the uptake of 9i AQ functionality in future releases of Oracle
Workflow 2.6?
8 What database versions can Oracle Workflow 2.6 be installed in?
9 Can Oracle Workflow 2.0.3 be upgraded to 2.6 in one step?
10 In which products is Oracle Workflow 2.6 bundled?
11 What Web Servers are certified with Oracle Workflow 2.6?
12 My customer already uses Advanced Queues with their own defined
datatype.
Are they a candidate for Oracle Workflow 2.6?
13 When I go into Global Preferences either as System Administrator or
WorkFlow Administrator I get the following message: "Only Administrators
can edit Default settings"
What do I need to do in order to be able to modify the default settings ?
14How do I ensure that workflow processes that are deferred, timed out or
that become stuck after the current background engine starts are processed
by the next background engine that is invoked?
15How do I run a Workflow Background Process as a Concurrent Program?
16In which products is Oracle Workflow 2.6.1 bundled?
17How do I access the Workflow Monitor in Standalone Workflow 2.6?
Whats new about Oracle Workflow 2.6?
The Oracle Workflow Business Event System is an application service that
leverages the Oracle Advanced Queuing (AQ) infrastructure to communicate
business events between systems. The Business Event System consists of
the Event Manager and workflow process event activities.
The Event Manager contains a registry of business events, systems, named
communication agents within those systems, and subscriptions indicating
that an event is significant to a particular
system. Events can be raised locally or received from an external system or
the local system through AQ. When a local event occurs, the subscribing
code is executed in the same transaction as the code that raised the event.

Page 50 of 84

WORKFLOW

Subscriptions can include the following types of processing:


Executing custom code on the event information

Sending event information to a workflow process

Sending event information

to other queues or systems


Business events are represented within workflow processes by event
activities. By including event activities in a workflow process, you can model
complex processing or routing logic for business events beyond the options
of directly running a predefined function or sending the event to a predefined
recipient.
Can Oracle Workflow 2.6 Business Event System meet my customers
Business Process Integration Requirements?
Yes.
The uses of the Business Event System include:

System integration messaging

hubs--Oracle Workflow with the Business Event System can serve as a


messaging hub

for complex system integration scenarios. The Event Manager can be


used to "hard-wire"

routing between systems based on event and originator.


Workflow

process event activities can be used to model more advanced routing,


content-based

routing, transformations, error handling, and so on.

Distributed applications
messaging--Applications can supply Generate and Receive event
message handlers for
Page 51 of 84

WORKFLOW

their business entities. For example, message handlers can be used to


implement Master/Copy

replication for distributed applications.

Message-based system integration--You

can set up subscriptions which cause messages to be sent from one


system to another

when business events occur. In this way, you can use the Event
Manager to implement

point-to-point messaging integration.

Business-event based workflow processes--You

can develop sophisticated workflow processes that include advanced


routing or processing

based on the content of business events.

Does Oracle Workflow 2.6 integrate in with MQ*Series or other messaging


solutions?
Yes.
Oracle Workflow 2.6 integrates with Oracle Message Broker compliant single
consumer
queues, and OMB can integrate with MQ*Series and TIBCO
What communication protocols
are supported by Oracle Workflow 2.6?
We offer SQL*Net support
out of the box. HTTP/HTTPS support is offered through integration with Oracle
Message
Broker compliant single consumer queues. We plan to support
additional protocols as AQ offers support for additional protocols.

Page 52 of 84

WORKFLOW

Can custom Java code be integrated in with Oracle Workflow 2.6? <BR>YES.
class=""

What Data Transformation services does Oracle Workflow 2.6 offer?


Oracle Workflow 2.6
allows you to apply a stylesheet to an XML document. It is anticipated that in
calendar
Q1 2001, queue handlers will be available to enqueue and dequeue from
Oracle Applications Interconnect queues.

What will be the uptake of 9i AQ functionality in future releases of Oracle


Workflow 2.6?
<BR>ORACLE

What database versions can Oracle Workflow 2.6 be installed in?


8.1.6 and 8.1.7.
The 9i database will be shipped with a newer version of Oracle Workflow 2.6,
this
is the version that should be installed on 9i. Oracle Workflow 2.6 also
requires
the JServer database option to be installed.

Can Oracle Workflow 2.0.3 be upgraded to Oracle Workflow 2.6 in one step?
No. Oracle
Workflow 2.0.3 standalone customers must first upgrade to Oracle Workflow
2.5.1 or
Page 53 of 84

WORKFLOW

2.5.2, and then upgrade to Oracle Workflow 2.6.

In which products is Oracle Workflow 2.6 bundled?


Oracle Workflow 2.6 should be included in the cd packs for 8.1.6 and 8.1.7
Enterprise Edition databases. For 9i database, Oracle Workflow 2.6 will be in
the 9i cd. For 9i AS, Workflow
will be shipped as part of the CD pack until 9i AS v2, when workflow will be
on the
9i AS v2.0 cd.
Note: Workflow 2.6 Client and Mailer will ship on the 9i Client
CD and 9i AS client cd when Workflow Server 2.6 is included on the 9i db cd
and 9i
AS cd.

What Web Servers are certfied with Oracle Workflow 2.6?


The Oracle HTTP Server (powered by Apache) with mod*plsql component will
be the only certified web server with Oracle Workflow 2.6. The Oracle HTTP
Server(powered by Apache) with mod*plsql is included in 8i/9i iAS, and also
shipped with the database enterprise edition.

My customer already uses Advanced Queues with their own defined


datatype. Are they a candidate for Oracle Workflow 2.6?
Yes. As they have a custom datatype, what they need to
do is define these queues as Agents in the the Business Event Systems, and
write
their own queue handler code to enqueue and dequeue from their queues.
The
queue handler code will also map from their datatype, to the Oracle
Workflow Business
Page 54 of 84

WORKFLOW

Event datatype. After they have done this, they could either rebuild their
complex business rules in Oracle Workflow, or minimally, they could wrap
their old
code in our Event Subscription Rule Function API.

When I go into Global


Preferences either as System Administrator or WorkFlow Administrator I get
the following message:
"Only Administrators can edit Default settings"

What do I need to do in order to be able to modify the default settings ?


See Note:148639.1
How do I ensure that workflow processes that are deferred, timed out or that
become stuck after the current background engine starts are processed by
the next background engine that is invoked?
The background engine executes all activities that satisfy the given
arguments at
the time that the background engine is invoked. This procedure does not
remain running
long term, so you must restart this procedure periodically. Any activities that
are
newly deferred or timed out or processes that become stuck after the current
background engine
starts are processed by the next background engine that is invoked. You may
run a
script called wfbkgchk.sql to get a list of the activities waiting to be
processed
by the next background engine run. See: Wfbkgchk.sql: page 16 7.
If you are using the standalone version of Oracle Workflow, you can use one
of the
sample background engine looping scripts described below or create your
own script
to make the background engine procedure loop indefinitely. If you are using
the version
Page 55 of 84

WORKFLOW

of Oracle Workflow embedded in Oracle Applications, you can use the


concurrent program
version of this procedure and take advantage of the concurrent manager to
schedule
the background engine to run periodically. To Schedule Background Engines:
page 2 45.
How do I run a Workflow
Background Process as a Concurrent Program?
In which products is
Oracle Workflow 2.6.1 bundled?
Oracle Workflow 2.6.1 is included on the product installation CD for Oracle9i
Enterprise and Standard Edition databases version 9.0.1, under the Oracle9i
Management
and Integration installation type. Oracle Workflow 2.6.1 is also included on
the product
installation CD for Oracle9i Application Server Release 2.
How do I access the Workflow Monitor
in Standalone Workflow 2.6?
1. Start up your web browser and navigate to the workflow home page
for Sysadmin by entering the following URL:
http://://wfa_html.home
where
= machine on which WAS 3.x or OAS 4.x is installed
= tcp/ip port on which your PL/SQL agent will accept requests
= the virtual path defined for your PL/SQL agent
2. Choose Find Processes. Leave all the defaults and click the Find button.
3. Find all or any particular process that has a diagram.
4. After the Find notifications returns click 'View Diagram' to view a diagram
of the process.
5. This will invoke the WorkFlow Monitor and show a diagram depicting the
status of the process you chose.
Licensing Issues
1. When does a customer receive Oracle Workflow Standalone?
2. Any other requirement for Oracle Workflow?

Page 56 of 84

WORKFLOW

When does a customer receive Oracle Workflow Standalone?


Oracle Workflow is included as part of Oracle 8i Standard Edition, Oracle 8i
Enterprise Edition, Oracle 9i AS(1.0.2 and above), and the Oracle eBusiness
Suite. Note: eBusiness Suite customers are not required to purchase any
additional licenses to build custom workflows.

Any other requirement for Oracle Workflow?


Please check the requirements page in the documentation's install notes.
Essentially, you will need a Java 1.1 browser with full Java AWT support for
the Workflow monitor (such as Netscape Communicator 4.0.4). You will need
Oracle 8i AS or higher.

Background Engine
1 How do I defer a process to the background engine?
2 How is WF_STANDARD.Wait implemented? is there any cost involved?
3 Background process is stuck. Can I kill it?
4 Why can I not find WFRESGEN on my pc in the Submit Requests form?
5 What is the difference between WFLOAD and wfload?
How do I defer a process to the background engine?
When launching a process, you can do this immediately by lowering
the threshold level.
-- Set engine to defer everything to the bg-engine for this session
-- This provides faster user response time, at the expense of
-- delaying workflow progress until the background engine runs.
save_threshold := wf_engine.threshold;
wf_engine.threshold := -1;
-- Launch the process
wf_engine.CreateProcess(...);
wf_engine.SetAttr...(...);
wf_engine.StartProcess(...);
-- Reset the threshold
Page 57 of 84

WORKFLOW

wf_engine.threshold:=save_threshold;
exception
-- ensure threshold is reset
wf_engine.threshold:=save_threshold;

We recommend that you always defer after a user interaction so the


user is not left waiting for a responce. For example,
responding to a notification, launching a new process from a form,
clearing a block activity from a web page etc. When you know you
always want to defer at a given point you can increase the cost of the
activity in the Builder at design time.
How is WF_STANDARD.Wait implemented? is there any cost involved?
When the engine executes the wait function, it returns "DEFERRED:<date>"
where <date> is the date the engine should wait until (using
canonical format: YYYY/MM/DD HH24:MI:SS). The engine
updates the main runtime table and sets the activity
status = 'DEFERRED' with a BEGIN_DATE = <date>
The Background engines job is to poll for deferred activities that
are valid (ie where
BEGIN_DATE is less than SYSDATE). There is no cost associated with
the amount of time the activity waits because the background engine
will not pick up the activity until the waiting period is over.

Background process is stuck. Can I kill it?

The background engine is designed to avoid any


contention/deadlocks. However, if you suspect a lockup or other
inactivity, there is no danger in killing the existing background

Page 58 of 84

WORKFLOW

process and starting another one. The process will simply be rolled
back and picked up again by the next background engine.

Why can I not find WFRESGEN on my pc in the Submit Requests form?


Four concurrent programs are automatically created when you install
the Applications version of Workflow. They are:

Workflow Background Process (FNDWFBG)

Notification Mailer (FNDWFMAIL)

Workflow Definitions Loader (FNDWFLOAD)

Workflow Resource Generator (FNDWFRESGEN)

In order to run these programs through the Submit Requests form, you
will need to add them to the request group of the responsibility under
which you wish to run them. To do this, under System Administrator
responsibility, go to /Security/Responsibility/Requests, query the
group assigned to the desired responsibility, and add the programs.

Concurrent programs can be run from the command line as well:

WFRESGEN <apps/password> 0 Y FILE

<res filespec> <source filespec>...

WFRESGEN <apps/password> 0 Y DATABASE <source filespec>...

Page 59 of 84

WORKFLOW

WFLOAD <apps/password> 0 Y DOWNLOAD <output filespec> <item type>

WFLOAD <apps/password> 0 Y UPLOAD <input filespec>

WFLOAD <apps/password> 0 Y UPGRADE <input filespec>

WFMAIL <apps/password> 0 Y <config filespec>

where a filespec is specified as


@<application_short_name>:[<dir>/.../]file.ext
or
<native path>
for example
WFLOAD apps/apps
WFLOAD apps/apps
WFLOAD apps/apps
WFLOAD apps/apps

0
0
0
0

Y
Y
Y
Y

UPGRADE @fnd:install/data/wferror.wft
UPLOAD @po:install/data/poreq.wft
DOWNLOAD myprocess.wft POREQ
UPGRADE c:\orant\wf20\res\US\wfstd.wft

What is the difference between WFLOAD and wfload?


There is some confusion about WFLOAD versus wfload. To the untrained eye
these may look very similar... but there is an important difference.
UPPERCASE executable names usually refer to the Concurrent Manager
variant of the program. Lowercase executable names usually refer to the
stand-alone unix version. These two programs do the same thing, but take
different arguments.

Builder
1 Cant save to the database: it says "activity ABC has no transition defined
for it"?
2 Q: I get error 1602: cant save to the database? but I can save to a flat file?
Q: I get error 1300: could not load? when loading from the database.

Page 60 of 84

WORKFLOW

3 I get an error in the builder:


319: 'SAVE' validation failed for attribute 'ATTR' value
WFXXXV_VTYPE_INCOMPATIBLE ITYPE=VARCHAR2 ATYPE=ITEMATTR
Cant save to the database: it says "activity ABC has no transition defined for
it"?
If Activity A in the example below has the Lookup "YES_NO_OTHER" attached
to it then ALL possible values of the lookup must be modeled in the process.
The only exception is if a default transition is present.
Lookup = YES_NO_OTHER
Codes = Yes
= No
= Other
In this example the "Other" value has no transition defined for it
and the default transition has not been modelled.
-------- Yes
---| A |-------->
-------|
| No
I get error 1602: cant save to the database? but I can save to a flat file?
1602: Could not save.
1400: Could not save to database. MODE=UPGRADE EFFDATE=1998/03/12
16:39:50
210: Oracle Error: ORA-06550: line 1, column 55:
PLS-00302: component 'UPLOAD_MODE' must be declared
ORA-06550: line 1, column 47: PL/SQL: Statement ignored.SQL text: BEGIN
WF_CORE.SESSION_LEVEL := :level; WF_CORE.UPLOAD_MODE := :mode;
END;
This means your builder/loader version is not compatible with the WF engine.
You must upgrade everything to the same version. Example: you are running
the 2.0.3 loader executable against
a 2.0.2 or earlier WF server installation. You can check the server version
with the following SQL:
select text from wf_resources where name='WF_VERSION';
Similarly, if your Builder is behind in versions to you server, you will not be
able to load from the database. Please update you Builder.
Page 61 of 84

WORKFLOW

I get error in the builder:

319: 'SAVE' validation failed for attribute 'ATTR' value

WFXXXV_VTYPE_INCOMPATIBLE ITYPE=VARCHAR2 ATYPE=ITEMATTR


For defining activity attributes, there are 4 values.

Attribute name

Attribute type

value name

value type

The attribute name/type are already set. The user must input the value
name/type. The value type must EITHER be a constant so that the value will
be of the same type as the attribute type (so a constant value = 22 may
either be character 22 or numeric 22 depending on the activity attribute
type) OR it can be "item attribute", in which case the value is the name of an
item attribute which must
be of the same type as the attribute type.

Page 62 of 84

WORKFLOW

In the case of the ASSIGN activity, this is complicated because the activity
attribute is actually of type "attribute". This means it is already expecting an
item attribute name so you should input a CONSTANT type and the name of
the item attribute you want to reference.
A common mistake is to set the value type to "item attribute" because you
want to reference an item attribute. However because
attribute_type=attribute, it is already expecting an item attribute name.
Then, because of the OR rule noted above, you are limited to reference an
item attribute which is of type "attribute" which in turn is a substitution.
What this ends up meaning is "get the value you are expecting (in this case
the item attribute name) from the item attribute which refernces another
item attribute (because it is of type attribute)". This is a double reference
which is probably not required. So remember, whenever you use type
"[item] attribute", substitution occurs.

Commit Issues
1 Can I commit in PL/SQL packages? Why not?
2 What constitutes a single commit cycle in Workflow?
3 Can a workflow process be restarted from the point of failure?
4 How do we send the same item through the same work flow process more
than once?
5 How can I tell if a work item already exists?
6 I have a workflow with 2 activities. Are both activities executed in the same
SQL session?
7 Can I rollback beyond the activity I am in?
8 Are there any restrictions with starting a WF process from a DB-trigger?
Can I commit in PL/SQL packages? Why not?
You CANNOT commit inside a PL/SQL procedure which is called by the
workflow engine.
Page 63 of 84

WORKFLOW

If you issue a commit you are committing the workflow state as well as your
application state. If you do commit and your pl/sql function fails
subsequently the workflow engine will not be able to rollback
to a consistent state.
Example:
SP SP
SP
SP
SP
start ---> activity A -----> activity B ---> activity C ---> end
The workflow engine issues a savepoint (SP) before executing each activity.
It marks the activity as active and proceeds to execute the underlying pl/sql

If you commit in the middle of an activity and the activity subsequently fails,
the engine cannot rollback to it's savepoint. Therefore the work done in both
the engine and the application before
the commit cannot be rolled back.

More over, even if the activity does not fail, another process (such as a
background engine) gains visibility to the status information just committed
and may start processing prematurely leading to conflicts and unusual
errors. Similarly, you cannot ROLLBACK across pl/sql procedures. If you do,
REALLY strange things happen when an error occurs. Either the activity
status line wont exist (because its rolled back) so WF cant write the error, or
it may succeed in writing the error but then continues along the process
rather than stopping because other status info has been rolled back.
If you must undo something then ensure you rollback to a save point within
your own package and not to one in a previous function activity.

What constitutes a single commit cycle in Workflow?

Page 64 of 84

WORKFLOW

Here are some facts about the Workflow Engine activity execution and
commits:
1. The Workflow engine does not perform any internal commits.
2. The caller of the Workflow API should always perform the actual
commit.
3. Exceptions that occur in activity functions are not propagated back to
the original Workflow API caller. If an activity function
4.

raises an exception, the activity status is set to 'ERROR', and

5.

execution on that path is halted. If other activities are still

6.

eligible for execution, the engine will continue with those activities.

7. Exceptions that occur in activity functions do not invalidate the fact


that earlier activities executed and completed successfully. In the
engine this is implemented by setting a savepoint just before each
activity function is executed. If the function fails, the engine performs
an internal rollback to the save point, marks the activity status as
'ERROR' and goes about its other business.
Therefore, Oracle Workflow never commits and its up to your calling program
to perform the commit which is necessary for other users to see the changes
that have occurred. For example, notifications,
deferred processes and any other data inserts will have taken place but will
not be visible until
the commit.
CreateProcess();
SetItemAttribute();
StartProcess();
commit;
Note: The background engine performs a commit after every piece of work (a
piece of work is defined as a synchronous thread which starts from the
activity that requires processing and ends when the engine cant proceed any
further).
Can a workflow process be restarted from the point of failure?
Yes, Wf_Engine.HandleError is designed for this. When the cause of the error
has been corrected, the HandleError procedure can be called with the
'RETRY' option which will attempt to re-execute the specified activity.

Page 65 of 84

WORKFLOW

Our users have the ability to modify the Work Item which then needs to be
resubmitted through the workflow. How do we send the same item through
the same work flow process more than once?
When you submit a work item to Oracle Workflow you must identify it by an
item key. Item keys must be unique within an item type. If you need to
submit a document to workflow twice you must pass
unique item keys each time.
If you original process hasnt ended, then you can ask the user if they wish to
resubmit the document which will loop back to the start of the process. Many
workflows are actually built like this. For example, an approval process may
permit modification of the work item throughout the approval process. After
each approval step, a function checks if the work item has been modified
and if it has then it checks if the approver has authorization to approve this
new item and send it on a new path accordingly. Alternatively you can set up
a 1:many relationship between your application item (app_id) and the
workflow (wf_id) using a table. An active_flag can identify which of the
workflows is active for the parent item (only one wf-id would ever be active
for that app_id)

How can I tell if a work item already exists?


There is an API for this: WF_ITEM.ITEM_EXISTS

I have a workflow with 2 activities. Are both activities executed in the same
SQL session?
Only if both activities are part of a synchronous thread (eg flexbuilder).
However, even with synchronous flows, you cannot rely on all activities being
executed in the same session
because the user may modify them and break them into asynchronous flows:
1. A customer may introduce a notification activity which causes the
2. process flow to stop as it waits for a response. When it starts up again
it will be in different commit cycle.
3. A customer may change the cost of any activity which causes the
activity to be deferred so executed in a different commit cycle.
Page 66 of 84

WORKFLOW

Can I rollback beyond the activity I am in? For example, after several
activities, I need to rollback to the beginning?
Rollbacks are only permitted within a function activity to rollback a specific
unit of work using savepoints. We do not permit rollbacks across activities
because this would also rollback Workflow's processing data which includes
all audit trails. If you foresee the possibility that you may need to rollback to
an earlier function, then incorporate this into you business rules and model
as a branch back. Then you can incorporate Cancel-logic to rollback any
changes either in each activity under cancel-mode or all together in a single
API which is only ever called when rolling back. This
solution is acceptable to all flows and not just limited to synchronous flows as
a rollback would be (you cannot rollback to a savepoint set in another sql
session but you can branch back to
something executed in an earlier session).
Are there any restrictions with starting a WF process from a DB-trigger?
You are NOT allowed to issue savepoints or rollbacks in database triggers
and the WF engine does exactly that when (it issues a savepoint before
executing each function activity in the event that it needs to rollback on an
error). Therefore, to initiate a workflow process from a database trigger you
must ensure that the initial process threads are deferred to a background
engine.
This is best achieved by setting the engine threshold absurdly low before
initiating the process to ensure it is deferred.
begin
save_threshold := wf_engine.threshold;
wf_engine.threshold := -1;
wf_engine.createprocess('<ItemType>','<ItemKey>','<Process>');
wf_engine.startprocess('<ItemType>','<ItemKey>');
wf_engine.threshold := save_threshold;
exception
when others then
-- remember to reset the threshold
if
wf_engine.threshold < 0 then
wf_engine.threshold := save_threshold;
end if;
-- continue with normal error handling
wf_core.context('My_package_name', 'My_proc_name', to_char(nid));
raise;
end;
Page 67 of 84

WORKFLOW

A limitation is that you cannot use the selector function to determine your
start process and instead must always specify the start process. This is
because the selector function is executed like any other function activity in
which savepoints are set. If you must use a selector function, then call your
selector function API directly prior to CreateProcess.

Delete Issues
1 Get a lot of validation errors when trying to save because of reference to
obsolete items. How do I delete these?
2 When maintaining our workflow, what happens if we update a process or
replace a PL/SQL procedure?
3 Does workflow always execute according to the latest definition for an
itemtype?
4 If you use Workflow builder to design a workflow, and save it multiple times
into database, it seems to me that there would be multiple versions of
workflow definition in database. Are there any tools that could delete the
older versions and keep the newest version?
5 How do I completely wipe out workflow definitions from the database?
6 What does wf_purge.total actually do?
7 On aborting a process, how do I delete all the data so that I can restart the
process with the same itemkey?
Get a lot of validation errors when trying to save because of reference to
obsolete items. How do I delete these?
Workflow maintains data integrity in its datamodel, so you cannot delete any
objects that are referenced. Runtime status information from workflow
process instances also contains
references to design objects so even though the Builder lets you delete
something (because there are no other references to it in the builder), that
deletion will not take effect in the database if the "deleted" object is
referenced by runtime data.
Page 68 of 84

WORKFLOW

You can remove all runtime data for a particular item type with the
WF_PURGE API (see doc for more details).

WF_PURGE.TOTAL(itemtype)

Then you should be able to delete obsolete object in the builder. Note! In WF
2.0.2, you cannot delete item attributes that have been saved to the
database. Item attributes are always merged with existing attributes (this
allows customers to add their own attributes and keep them through
upgrades).

When maintaining our workflow, what happens if we update a process or


replace a PL/SQL procedure?
When you edit a PL/SQL procedure called by a workflow activity then all
workflow instances that have not reached the activity or have reached the
activity but errored out will use the newly replaced pl/sql package.

When you edit a workflow activity by changing a function to call a different


PL/SQL stored procedure then :

all workflow instances started before the change was saved will run the
old procedure.

all workflow instances started after the change was saved will run the
new procedure.
Does workflow always execute according to the latest definition for an
itemtype?
No. Running processes use the activity definitions that were in effect when
the process was started. This is related to the concept of versioning in which
Oracle Workflow maintains different versions based on effective dates.

Page 69 of 84

WORKFLOW

If you use Workflow builder to design a workflow, and save it multiple times
into database, it seems to me that there would be multiple versions of
workflow definition in database. Are there any tools that could delete the
older versions and keep the newest version?

The builder doesn't delete old activity versions. You can manually delete
obsolete versions using wf_purge.activities (or wf_purge.total). This will only
delete activity versions older than the oldest item in the system to be sure it
won't be used again; if you think it's not purging enough, try deleting
obsolete items first. It is not necessary to ever purge old activities, but you
may want to do so periodically to prevent tables from growing too large.

How do I completely wipe out workflow definitions from the database?


There are scripts that directly delete workflow definition data from the
database.
wfrmita.sql -- Delete all definitions for an ITem Attribute
wfrmitt.sql -- Delete all definitions for an ITem Type
wfrmall.sql -- Delete all definitions
These (and other handy scripts) are located in the admin/sql directory of
standalone workflow release. For workflow embedded with Oracle
Applications, these scripts are under $FND_TOP/sql.

What does wf_purge.total actually do?


WF_PURGE.TOTAL deletes obsolete runtime data which includes:

Items

Item activity statuses

Notifications

Expired activity versions

Page 70 of 84

WORKFLOW

That match the itemtype and date filters passed in. Data without an enddate (indicating it is not yet complete) or that is still referenced by
something is not deleted by any of the wf_purge routines.

On aborting a process, how do I delete all the data so that I can restart the
process with the same itemkey?
You can delete all runtime data for a completed item using wf_purge.items
(or wf_purge.total). If you want to force removal of an item that is
incomplete or has gone astray regardless of status,
use the script in admin/sql/wfrmitms.sql. be aware that this will remove all
status information that the item ran in the first place.

Alternatively, instead of Aborting it in the first place you could rerun it using
wf_engine.HandleError with the RETRY option.

Install problems
1 Is Oracle Workflow 2.0.3 Cerified with Oracle Application Server 4.0?
2 On installing the server packages I get an error messagewf.ins(163):
unregistered product
3 On installing Workflow Embedded in Oracle Apps, the package wfsecicb.sql
produces compilation errors.
4 After installing I get Error 3402: no valid session exists for this user.
5 During an install on NT, I get an error RunTimeError 367 - Cant load or
register custom control 'wfnvg20.ocx'
6 NT Workflow Server install displays error Cannot find file wfrundemo.sql
7 Is iAS certified with Oracle Workflow 2.5?
Is Oracle Workflow 2.0.3 Cerified with Oracle Application Server 4.0?
Yes. Existing customers who have already installed Oracle Workflow
Cartridge 2.0.3 can upgrade to Oracle Application Server 4.0 immediately.
New customer must get patch 773373 before installing Oracle Workflow
Cartridge. This patch be downloaded from Metalink patch page.

Page 71 of 84

WORKFLOW

On installing the server packages I get an error message wf.ins(163):


unregistered product
Your Oracle database is not registered with the installer. Please correct this
before loading Oracle Workflow.

On installing Workflow Embedded in Oracle Apps, the package wfsecicb.sql


produces compilation errors.
The implementation of the WFA_SEC package (file wfsecicb.sql) integrates
Workflow Web interfaces with the Self Service (Internet Commerce) Web
Apps security module. Therefore, wfsecicb.sql requires Self Service Apps to
be installed. When Self Service apps are not available, you must
use the Web Server security (wfsecwsb.sql). During install of the Standalone
product, wfsecwsb.sql is always installed. To install the package:
sqlplus un/pw @wfsecicb.sql
After installing I get Error 3402: no valid session exists for this user.
You are running the wrong security package. Please see the previous
question.

During an install on NT, I get an error RunTimeError 367 - Cant load or


register custom control
'wfnvg20.ocx'
Check your autoexec.bat file. Make sure <oracle_home>\bin has been added
to the path, then reboot your machine and re-install workflow. The problem is
probably that you didn't reboot between installing the installer and installing
Workflow. This is a compulsory step, not just a precaution.

Page 72 of 84

WORKFLOW

Also, if you are installing on an NT machine, ensure you have logged on with
local administrator's privilege. You can check this by going to Start Menu>Programs->Administrative Tools->User Manager. If you still experience
problems, manually register the ocx file as follows:
Run an MS/DOS command shell
cd C:\WINNT\SYSTEM
for NT: regsvr32 C:\ORANT\WF20\wfnvg20.ocx
for W95: regsvr32 C:\ORAWIN95\WF20\wfnvg20.ocx
NT Workflow Server install displays error Cannot find file wfrundemo.sql
This only happens if you install from a temporary stage area which is not
what is recommended in the install guide. The error can be ignored since the
wfrundemo.sql script is not a required file for the install to complete
successfully (its only for the optional demo). The user should click on Ignore
Button in the Installer and continue with the Workflow Install. You can run the
script manually
after completion. We have fixed this on new versions of the CD.

Is iAS certified with Oracle Workflow 2.5/2.6?


Yes. An Oracle Workflow Installation Supplement Documentation Update is
available detailing the setup steps required to use the iAS with Workflow
2.5/2.6.

Error Handling
1 What is WF_CORE.RAISE()?
2 Does WF_CORE.RAISE('UNEXPECTED_ERROR') return a null value from
PL/SQL?
3 How do I handle WF errors in the package procedures I want to call ?
4 How do you handle WF error using Oracle forms?
5 How do you handle WF error using a WEB front end?
Page 73 of 84

WORKFLOW

6 Is there any Debugging capability in Workflow?


7 If I discover a modelling error in my process, how do I change all my open
workflows onto the new workflow?>
What is WF_CORE.RAISE()?
WF_CORE.RAISE raises an exception to the caller. If an exception is raised,
no return values or out values are expected to be populated. The WF engine
traps exceptions from function activities, and marks the activity status row
with the error information.
Does WF_CORE.RAISE('UNEXPECTED_ERROR') return a null value from
PL/SQL?
Sort of... the resultout OUT parameter is better described as 'undefined' in
this case. The engine will not even look at it. Unhandled exceptions put the
activity in an ERROR state, and the result is not meaningful. When in the
error state, the ERROR_NAME, ERROR_MESSAGE, and ERROR_STACK columns
are set on the WF_ITEM_ACTIVITY_STATUS row.
NOTE: wf_engine.HandleError is the standard way to recover from an error.
This will either Retry or Skip the the activity and update its ACTIVITY_STATUS
from ERROR to a new value. However, the value of the ERROR_% fields are
not reset/overwritten so they remain as a good audit log.

How do I handle WF errors in the package procedures I want to call ?


Any code that calls Workflow api's must have exception handlers to print
error messages for raised exceptions. There are 2 options:
1. Print the error directly. This example adds your procedure to the error
call stack (arg1 .. arg5 are optional arguments to provide context
information), then prints the exception appropriately for your
environment.
procecure My_Procedure is
begin
...
Wf_Xxx.Yyy();
...
exception
when others then
Wf_Core.Context('My_Pkg', 'My_Procedure',
arg1, arg2, arg3, arg4, arg5);
Page 74 of 84

WORKFLOW

Print_My_Error;
end My_Procedure;
Raise the exception to a higher level. This example adds your procedure to
the call stack, and re-raises the exception. If you do this, you MUST trap the
exception and print it at a higher level. This technique is used by all the
WF_STANDARD package procedures. It is not only useful for debugging, but is
essential for determing who is responsible for the maintenace. This way you
can tell if the error occured in WF, a product groups package or a custom
piece of code.
procecure My_Procedure is
begin
...
Wf_Xxx.Yyy();
...
exception
when others then
Wf_Core.Context('My_Pkg', 'My_Procedure',
arg1, arg2, arg3, arg4, arg5||extra_info);
raise;
end My_Procedure;
How do you handle WF error using Oracle forms?
Any call to Workflow APIs from Forms must include an exception handler to
print any unexpected exceptions raised. The exception handler should look
something like the following example procedure. This will print a friendly
Message Dictionary error message, with the error stack available in the
"History" button for more information.
procedure Print_Forms_Error
is
errname varchar2(30);
errmsg varchar2(2000);
errstack varchar2(32000);
begin
-- Check for a wf error and print an error message if one is found.
wf_core.get_error(errname, errmsg, errstack);
-- If no wf error look for a native Oracle error
if ((errname is null) and (sqlcode != 0)) then
errname := to_char(sqlcode);
errmsg := sqlerrm;
end if;
if (errname is not null) then
fnd_message.set_string('ERROR_STACK', errstack);
Page 75 of 84

WORKFLOW

fnd_message.set_name('FND', 'WF_ERROR');
fnd_message.set_token('ERROR_MESSAGE', errmsg);
fnd_message.history;
raise form_trigger_failure;
else
-- Must be a Forms error, let it trickle up.
raise;
end if;
end;
How do you handle WF error when calling through a WEB front end?
Again you want to trap your error and call a routine to print it like the
following:
--- Print_Html_Error
-- Print an html page displaying a raised exception.
-procedure Print_Html_Error
is
begin
error_name
varchar2(30);
error_message varchar2(2000);
error_stack
varchar2(32000);
begin
htp.htmlOpen;
htp.headOpen;
htp.title(wf_core.translate('ERROR'));
htp.headClose;
begin
wfa_sec.Header(TRUE);
exception
when others then
htp.bodyOpen;
end;
htp.header(nsize=>1, cheader=>wf_core.translate('ERROR'));
wf_core.get_error(error_name, error_message, error_stack);
if (error_name is not null) then
htp.p(error_message);
else
htp.p(sqlerrm);
end if;
Page 76 of 84

WORKFLOW

htp.hr;
htp.p(wf_core.translate('WFENG_ERRNAME')||': '||error_name);
htp.br;
htp.p(wf_core.translate('WFENG_ERRSTACK')||': '||
replace(error_stack,wfa_html.chr_newline,'
'));
wfa_sec.Footer;
htp.htmlClose;
end Print_Html_Error;
--- Get_Text_Error
-- Return a text buffer with a formatted error string for printing.
-function Get_Text_Error
return varchar2
is
begin
buffer
varchar2(32000);
error_name
varchar2(30);
error_message varchar2(2000);
error_stack
varchar2(32000);
begin
buffer := htp.title(wf_core.translate('ERROR'));
wf_core.get_error(error_name, error_message, error_stack);
if (error_name is not null) then
buffer := buffer||' '||error_message);
else
buffer := buffer||' ' ||sqlerrm;
end if;
buffer := buffer||' '||
wf_core.translate('WFENG_ERRNAME')||': '||error_name;
buffer := buffer||' '||
wf_core.translate('WFENG_ERRSTACK')||': '||error_stack;
return(buffer);
end Get_Text_Error;
Is there any Debugging capability in Workflow?
There are currently no facilities in Workflow for the express purpose of
debugging PL/SQL activity functions. We do have plans to add an event
Page 77 of 84

WORKFLOW

logging facility, which is more to help trace process execution issues and act
as an error log.
To debug a workflow, make sure all function activities are working correctly
before linking them into the process. If the error remains in you process, use
all 5 arguments to wf_core.context to examine what is going on. You can
concatenate values together to display more. Finally, as with any pl/sql, you
can insert dbms_output.put_line to see more specifically what logic is being
executed

If I discover a modelling error in my process, how do I change all my open


workflows onto the new workflow?
The process definition that a work item will follow is fixed at the time the
work item is started. It is not possible to move a work item on to a new
process definition after it has started. If the process is found to have a bug
the only solution is to abort the process and start a new work item.

It is possible however to change the code that a function activity calls after a
work item starts. If a function activity fails you can apply a code fix and retry
the function form the workflow monitor.
The latest version of the code will then be run. It is the definition of the
process and not the code that the process calls that is fixed when a work
item starts.

Applications
1 How do I grant an application user access to the notification form?
2 How do I pass a form in a notification.
3 How do I set the application context/org?
4 How do I raise errors in my application? DO I have to add errors to the
workflow
resource table?

How do I grant an application user access to the notification form?


Page 78 of 84

WORKFLOW

The Workflow Notifications function can be added to any menu in 10SC using
the System Administrator Responsibility. The name of the function is
Workflow Notifications, FND_FNDWFNOT. The function exists in AOL it just has
to be added to a menu.

How do I pass a form in a notification.


The steps you would take to pass a form in a notification are:
Decide whether the form that should be passed in the notification is
dynamic or constant and whether it applies to a single message or may be
used across many messages. This decision determines whether you create
the FORM attribute as an item attribute (available across all activities of the
process), or whether the FORM attribute will be only a message attribute
with a constant value (available only to those notification activities that send
that message).
For my example, I'm going to assume that you decided that your FORM
attribute has a dynamic value and may be used across more than one
message.
Create an item attribute with type FORM with name
'OPEN_FORM_COMMAND'. No default value. The value will always be set
through a function activity. Create a pl/sql procedure that sets the value of
your FORM attribute. For example, the notification could open the form
function PO_POXPOEPO. This could be something like:
1.
l_open_form := 'PO_POXPOEPO:PO_HEADER_ID="&DOCUMENT_ID"'
2. ||
3. ' ACCESS_LEVEL_CODE="MODIFY"' ||
4. ' POXPOEPO_CALLING_FORM="POXSTNOT"';
5. wf_engine.SetItemAttrText ( itemtype => itemType,
6. itemkey => itemkey,
7. aname
=> 'OPEN_FORM_COMMAND' ,
avalue
=> l_open_form);
where
PO_POXPOEPO is the form function (for more information
o see Overview of Menus and Function Security, Oracle
Applications Developer's Guide.) PO_HEADER_ID is a form
function parameter &DOCUMENT_ID is a token and will get
substituted with the value from another predefined activity
Page 79 of 84

WORKFLOW

attribute, DOCUMENT_ID ACCESS_LEVEL_CODE is another form


function parameter set to a specific value of "MODIFY"
Create a function activity that executes your pl/sql procedure
Create a message with a message attribute copied from your item attribute
OPEN_FORM_COMMAND'. The default value of this message attribute will be
the item attribute 'OPEN_FORM_COMMAND'. Create a notification activity
that sends the message. Put the activities all together in a process diagram
so that the function activity that sets your form attribute occurs before the
notification activity that sends it. The FORM attributes are displayed as icons
in the Notification Viewer form detail and allow the end user, given the
proper function security, to open the form passed. You can also use a
constant default value on an item attribute or a message attribute to set the
value of a FORM attribute. For more information on Form Attribute Types
please see Attribute Types, Oracle Workflow Release 2.0.3 Guide.
How do I set the application context/org?
If your workflow is launched from a form then the application context will
aleready be set (because it is the same sql session). However, if an activity
gets defered to the background engine then
that context is lost. So when the workflow starts up again it wont know what
context to run in.a
To get around this, you should save any necessary values to item attributes
when you first start the workflow (ex: save the org context or call
fnd_global.apps_initialize()). Then write a selector function to operate in
SET_CTX mode which checks if context is set. If it isnt, you retrieve the value
you saved to the item attribute and set it here. This ensures the value is
always set.
Example CODE: PROCEDURE PROD_SELECTOR ( p_itemtype in
varchar2 , p_itemkey in
varchar2 , p_actid in number , p_funcmode in varchar2 , p_result in
out varchar2 ) IS
l_user_id
NUMBER; l_resp_id
NUMBER; l_resp_appl_id
NUMBER;
l_org_id
NUMBER; BEGIN
IF (p_funcmode = 'RUN') THEN
.....lookup procedure
p_result := 'COMPLETE';
Page 80 of 84

WORKFLOW

ELSIF(p_funcmode = 'SET_CTX') THEN


-- get
Item Attributes for user_id, responsibility_id and application_id
-- this assumes that they were set as item attribute, probably through
-- definition.
l_user_id:=
wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'USER_ID');
l_resp_appl_id:=
wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'APPLICATION_ID');
l_resp_id:=
wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'RESPONSIBILITY_ID');
l_org_id:=
wf_engine.GetItemAttrNumber(p_itemtype,p_itemkey,'ORG_ID');
-- Set the database
session context which also sets the org
FND_GLOBAL.Apps_Initialize(l_user_id,
l_resp_id, l_resp_appl_id);
p_result := 'COMPLETE'; ELSE
p_result := 'COMPLETE'; END IF; EXCEPTION WHEN OTHERS THEN
NULL; WF_CORE.Context('PROD_STANDARD_WF', 'PROD_SELECTOR',
p_itemtype, p_itemkey, p_actid, p_funcmode);
PROD_SELECTOR;

RAISE; END

How do I raise errors in my application? DO I have to add errors to the


workflow resource table?
Product teams must use the standard message dictionary APIs to raise
errors.
fnd_message.set_name(...);
fnd_message.set_token(...);
app_exception.raise_exception;
The standard sequence, see above, will raise an exception with the
translated message. This will be displayed to the user in the error message if
the post-notification function fails.
Mailer Setup
1 How does the mailer know what mail system I want to use?
2 Where do I place the shutdown file for the notification mailer?
3 What do I set the ACCOUNT parameter to in mail mailer configuration file
for a Sendmail mailer?
4 How do the tags in the TAG file work?
Page 81 of 84

WORKFLOW

How does the mailer know what mail system I want to use?
The Workflow Mailer is linked with integration to a specific mail service, so
there is no setting to select this in the mail config file. The 2.5 mailer is
linked to support Sendmail and MAPI mail services
(WF 2.0.3 includes Interoffice). Simply run the desire mailer to generate
outgoing and process incoming email. Not that only one mailer is required.
Lotus notes is a MAPI compliant mail system. Use the MAPI (NT) version of
the Mailer when integrated to Lotus Notes (see notes in collateral).

Where do I place the shutdown file for the notification mailer?


If you are running the Applications version of the mailer:
If you have the environment variable $APPLCSF set, then the notification
mailer shutdown file should be placed in the $APPLCSF/$APPLLOG directory.
If $APPLCSF is NOT set then the notifications mailer shutdown file should be
placed in the $FND_TOP/$APPLLOG directory.

1. If you are running the standalone version of the mailer:


Place the shutdown file in the mailer's working directory. (Directory where
the mailer was started)
What do I set the ACCOUNT parameter to in mailer configuration file?
For Sendmail, the ACCOUNT parameter must be the full file path of the mail
spool file where incoming messages are stored. This is usually something
like
ACCOUNT=/var/mail/applmgr3
To test the correctness of the ACCOUNT parameter, make sure there is some
mail waiting in the inbox, then log on as the account used by the mailer and
attempt to list, then touch the file. Continuing the above example:
rlogin somemachine.nodename.com -l applmgr3
ls -l /var/mail/applmgr3
(should see a listing of the file here)
touch /var/mail/applmgr3
(should not report any error)

Page 82 of 84

WORKFLOW

The mailer must run as the same unix user that owns the mailbox designated
for workflow mail.

For InterOffice, the ACCOUNT parameter must indicate the InterOffice user
account to be used by the mailer in the form
ACCOUNT=<user>/<password>@<database_alias>

You can verify the information in the ACCOUNT parameter by entering the
same values into the InterOffice connection dialogue. You should be able to
log into InterOffice as the specified user, view the inbox, and send messages
from the account.

How do the tags in the TAG file work?


Oracle Workflow seeds 3 tags in the default tag file: ERROR, UNAVAIL,
IGNORE.

IGNORE: the mail message is moved to the discard folder. Nothing else
happens.

The notification in WF_NOTIFICATIONS remains with STATUS=OPEN and


MAIL_STATUS=SENT.

ie it ignores the mail and keeps waiting for a valid reply.

ERROR: the mail message is moved to the discard folder. The notification in
WF_NOTIFICATIONS remains with STATUS=OPEN but mail status is updated,
MAIL_STATUS=ERROR. Additionally the activities status is updated to ERROR
which sets off the error process (if defined). It is through the error process
that the SYSADMIN (or recipient) can retry/skip the notification and continue
the
process UNAVAIL (or any other user defined tag): the mail message is moved
to the discard folder. The notification in WF_NOTIFICATIONS remains with
STATUS=OPEN but mail status is updated,

Page 83 of 84

WORKFLOW

MAIL_STATUS=UNAVAIL (or whatever the tag was). This is purely informative.


To WF, this notification remains open and waiting for a reply. No processing is
done on this mail status (this is what is meant by "If the message is marked
with any other mail status, no further processing occurs on the message.")
And another MAIL_STATUS is INVALID. This happens when a notification
returns with a value that is not in the lookup type. Again, INVALID is purely
informational and to WF, this notification remains open and waiting for a
reply. For example, if you want to start a process every time an auto-reply is
received then you may either tag this as an error and fire the error process
or periodically check WF_NOTIFICATIONS for the MAIL_STATUS. Bear in mind
that only auto-replies with history will be tagged. Those without history (and
hence without the notification id) cannot be tagged because the mailer wont
know what they belong to, if anything at all (they could be random emails
not related to workflow).
------------------------------------------------------------------------------------------------------------------------------------------

Page 84 of 84

You might also like