You are on page 1of 17

Workflow Key Points

Objectives
Understand Environment required to run Workflow in Oracle E-Business Suite Understand
steps required to setup Workflow
Gain familiarity with setup screens
Check Business Event System setup
Check Notification Mailer setup

Workflow Environment in E-Business Suite


Developer Client Side Install Loads
Builder
Net Services
Required Support Files
11.5.9 2.6.3.0.1 patch 3031420
11.5.10 2.6.3.0.1 patch 4066964

Server Side
E-Business Suite 11.5.9 or 11.5.10
OAM Oracle Applications Manager
GSM Generic Services Manager

E-mail notifications requires


SMTP mail server (outbound)
IMAP4 compliant mail server (inbound)

Send/respond to e-mail notifications with HTML attachments requires


E-mail app that supports HTML attachments
Web browser app that supports JavaScript and Frames

To View Notifications
Web browser that supports JavaScript and Frames

To View Monitor
Web browser that supports
JDK 1.1.8 or higher
Abstract Windowing Toolkit (AWT)

Overview of Setup Steps


Set Global Preferences
Review Directory Services setups done by Workflow installation
Set Profile options
Setup Background Engine
Setup Business Event System
Verify path to language-dependent resources file
Partition tables for performance
Setup additional languages
Setup Notification Mailer (this is required to use e-mail to view notifications)
Modify message templates
Add Worklist, Advanced Worklist, Personal Worklist pages to responsibilities.

1
Add Notification Rules (user mode /admin mode) to responsibilities (11.5.9)
Customize company logo on Workflow web pages
Include additional icons for Builder

Detail Required Setup Steps

First Verify Server Version and Compatibility


Wfver.sql
Version of Workflow Server
Note: will say 2.6.0 even after applied 2.6.2/3 patches

Whether local system is enabled (2 scripts)


Business Event init.ora parameter values
Validity of XML Parser Schema (2 scripts)
Queue names and status
Status/version Workflow PL/SQL packages
Version Workflow views
Workflow Definition (WFT) Versions
Workflow Engine Status recompile invalid objects
Agent Listeners Status
Service Components Status
Queue details
Notification Event Status
Subscriptions
Environment Variables

First Verify Only One Active Version of Workflow


Should return No rows selected
If not, run wfverupd.sql

Optional Partition the Tables


Increases Performance
Backup following tables first
WF_ITEM_ACTIVITY_STATUSES
WF_ITEM_ACTIVITY_STATUSES_H
WF_ITEM_ATTRIBUTE_VALUES
WF_ITEMS
Run Workflow runtime purge
Free space required in same tablespace slightly more than currently in use (incl indices)
Uses DDL operations running in nologging mode rollback not possible
Failure requires manual cleanup
Script (WFUPARTB.sql) located at $FND_TOP/admin/sql
Execute script as follows:
sqlplus: <apps_user>/<passwd>
@wfupartb <fnd_user> <passwd>
<apps_user> <passwd>
ex: sqlplus: apps/apps @wfupartb applsys
apps apps apps
Script only has to be performed once
Can be performed anytime, so can wait and see if performance an issue

2
Required Directory Services
WF_USERS, WF_ROLES, WF_USER_ROLES views across WF_LOCAL_ROLES,
WF_LOCAL_USER_ROLES
WF_LOCAL_ROLES, WF_LOCAL_USER_ROLES populated by Directory sync programs or
(with added patches) directly as change is made
WF_LOCAL_USERS obsolete
Rows in WF_USERS w/o corresponding row in WF_ROLES
Invalid internal names in WF_ROLES Contain #, / or length > 30
Invalid user/role foreign key in WF_USER_ROLES
Missing user/role in WF_USER_ROLES (every user must participate in own role)
Duplicate rows in WF_USER_ROLES

Required Set Profile Options


Concurrent:GSM Enabled Must be Y
Server Timezone -MetaLink 304685.1 monitor wont open without it

WF: Notification Reassign Mode


11.5.9 FND: Notification Reassign Mode
Delegate cannot choose Re-assign
Transfer cannot choose Delegate whether hierarchy changes depends on workflow
involved
Reassign can choose Delegate or Transfer
Vacation Rules: Allow All
11.5.9 WF: Routing Rules: Allow All
Disabled cannot specify All for Routing Rules
Enabled can specify All for Routing Rules
Wf:Mailer Cancellation Email determines whether notification mailer sends cancellation
message when previously sent notifications are cancelled
Enabled cancellation message is sent
Disabled no cancellation message is sent
WF:Plain text sign-on if yes, signature required only if using plain text notification
preference
WF:ICX Session Mode (11.5.9+) - mode to use when accessing a notification sent without the
access key valid values are Personal Home Page (PHP) or Portal
WF:Workflow Mailer Framework Agent (11.5.10) enables a site to implement the mailer
Applications Framework Content through a dedicated port
Required if Application Framework Agent is virtual or load balancing server
WF:GUEST Access to Notification
Can access Notification Detail page w/o signing on
See OWF.H (note 258312.1) for instructions on other setups required
Note: Send Access Key no longer in Mailer setup
Socket Listener Port set at site level to port at which forms should launch

Optional Setup Routing Rules ItemTypes


Lookup Code WF: Routing Rule Item Types
If no codes, then Routing Rules limits ItemTypes to those ItemTypes currently running for a
user
Enter the internal name of the ItemType in both the Code and Meaning fields
Description is ignored

3
Schedule Background Engines
Required Start Background Engine(s)
Required to have minimum of one
Can start Engines through concurrent manager (much easier) or through OAM

Through Concurrent Manager:


To set up single engine, specify Yes for last 3 options, leave rest blank
Threshold allows scheduling when long running processes start (correlates to cost option in Builder)

Process Deferred Notifications, Cost >workflow engine background cost (default=50)


Process Timeout timed out notifications
Process Stuck stuck or in error status
Cant resolve transition value
Not end node and no transition arrow
Loop back to pivot activity set to Ignore

Enter parameters
Process Deferred, Process Timeout, and Process Stuck are Yes/No parameters

Schedule to repeat
How often depends on options specified

4
Clicking Advanced Schedule allows many more options

Summary page shows all options specified , Click Submit to start the process

5
Start Listeners

If status is Deactivated, click Start for Workflow Agent Listener Service and (if using mailer)
for Workflow Mailer Service
Starts concurrent managers (containers)

Workflow Agent Listener Service starts


Workflow Mailer Service starts
And the request starts
6
Verify Queue Cleanup Scheduled

From Concurrent Manager, verify Workflow Control Cleanup is scheduled


Oracle recommends every 12 hours

Verify Status

Workflow Components

Oracle Workflow Builder (PC client)


Workflow Engine (Server/DB)
Workflow Definitions Loader
Notification System (wfmailer)
Workflow Monitor

Migrating Changes
Migrate using Workflow Builder
Open workflow using Workflow Builder from Source System
Save workflow using Workflow Builder to Destination System
Open Destination System using Workflow Builder to validate
Migrate using FND tool
On Source System Server
Set ORACLE_SID and environment to point to Source System
WFLOAD apps/<apps pwd> 0 Y DOWNLOAD <file.wft> <item type>
Transfer <file.wft> to Destination System Server
On Destination System Server
Set ORACLE_SID and environment to point to Desitnation System
WFLOAD apps/<apps pwd> 0 Y UPLOAD <file.wft> <item type>

Workflow Tables

Important Run Time WF Tables


WF_ITEMS
Each row is a workflow items execution in the OraApps
WF_ITEM_ATTRIBUTE_VALUES
7
Each row is a single workflows item attribute values
WF_ITEM_ACTIVITY_STATUSES
Each row is an activity in a workflows execution
WF_NOTIFICATIONS
Each row represents a message created during the workflows execution
WF_NOTIFICATION_ATTRIBUTES
Each row holds the message text associated with a notification

Making Changes to WF
Only modify workflow objects with a protection level greater than 100
Always refer to the product-specific User Guide or Documentation Update
Do not change Oracles PL/SQL, copy it and create a custom procedure of your own
Research all the places a WF process is referenced, they are often nested

Workflow Builder Navigator


Contents of a Data Store
Attributes Variables used between workflow process steps
Processes Graphical sequences of process steps
Functions PL/SQL procedures to be called while executing the process
Notifications Envelope for messages
Messages Actual message templates
Lookup Types List of values
Events An event activity represents a business event that the process receives, raises, or
sends (new to 2.6)
Directory Service Oracle Workflow roles
Oracle Workflow Tips and Tricks

Have at least one Workflow Background process running under the concurrent manager without an
Item Type specified, with Process Deferred and Timeout set to Yes, and with a frequency of at least
once a day.

Watch out for objects which dont support versioning. Changes made to these objects may cause
existing Workflow processes to error out.
Attributes
Messages
Lookup Types

8
Use object versioning to see if an object has been modified by a patch.

The version increments by one each time the object is changed and saved to the database.

Utilize Notifications to debug a process.

You can create a simple message body with the attributes of interest, link it to a notification, and
place it in your workflow to see what is happening at a particular place in the workflow process.

This is especially helpful in a complex workflow with Attributes states changing or in doubt.

Cancel processes which are no longer required or stuck.


Navigation - System Administrator Responsibility
Workflow: Find Processes
Workflow Administrator Web Applications
Find Processes (locate the process your are interested in)
View Diagram
Abort Process

9
Resend notifications.

Use a common object name prefix for all custom objects.

(Attributes, Processes, Notifications, Messages, Lookup Types, etc.)

This makes searching for customizations at the table level much easier.

Watch out for changes to WF_USERS.


Synchronize WF LOCAL Tables
10
It use to be a view from FND, HZ, HR and WF_LOCAL_USERS tables.
Now it is a view on a static table WF_LOCAL_USERS with a periodic concurrent
program to copy the records from the other tables and keep them in sync.
Came with HR C patch
Patch submitted the concurrent program to run every 24 hours without and warning. No
where in the patch set was this change mentioned.
Metalink Notes:
Doc ID: 171703.1 Implementation Notes
Doc ID: 209692.1 Performance Notes
Bug: 2350501

Workflow Notifications

Notification Components
Notifications are comprised of:
- A Notification Activity
- A Message
- A Message Template
Optional Message Item Attribute(s)

Notification Activity
Think of this as a container to hold and call the message from.
This is what you will place on your workflow diagram.
When inserting a Notification Activity on a workflow diagram remember to provide a value for
the Performer. If you dont you will get a workflow runtime error about a NULL Performer.

Notification Expand Roles


If you are sending the Notification to a Role (everyone with the System Administrator
Responsibility) the Expand Roles is very important
Checked, this will create a separate Notification to each person in the Role. If an action is
expected every person has an opportunity to act on the Notification
Unchecked, this will create a single Notification which is emailed to each person in the Role.
The first person to act on the notification completes (or closes) it.

11
Message
This is what contains the text you are going to send.
You can format messages at Text or HTML
Message Bodies can include Attributes (variables)

Message Attributes
Message Attributes allow you to modify features of a Workflow Notification, without having to
create separate Workflow Mailers.
There are dozens of Special Message Attributes. I am only showing two here.
#WFM_FROM Changes the From Email address
#WFM_REPLYTO Changes the Reply To Email

Document Message Attributes


Document Attributes allow you to build a Message Body From a Query
Document Type Attributes reference PL/SQL procedures to build a text stream
Datatypes supported are:
VARCHAR2 32KB Size Limitation
CLOB 4GB (possible limitations due to workflow engine limitation)
BLOB 4GB (possible limitations due to workflow engine limitation)

PL/SQL Code Build Document (1)


-- Procedure Call and Misc. Setup
PROCEDURE EMP_TABLE (p_document_id in varchar2,
p_display_type in varchar2,
p_document in out varchar2,
p_document_type in out varchar2)
IS
v_itemtype varchar2(200);
v_itemkey varchar2(200);
NL VARCHAR2(1) := fnd_global.newline;
BEGIN
v_itemtype := substr(p_document_id, 1, instr(p_document_id, '|') - 1);
v_itemkey := substr(p_document_id, instr(p_document_id, '|') + 1,
length(p_document_id) - 2);
-- Procedure Create HTML Table Header
if (p_display_type = 'text/html')
then

12
p_document := NL || '<P><B>';
p_document := p_document || 'Employee Table';
p_document := p_document || '</B>';
p_document := p_document || '<TABLE border=1 cellpadding=2 cellspacing=1>';
p_document := p_document || '<TR>' || NL;
p_document := p_document || '<TH>' || 'EMPNO' || '</TH>';
p_document := p_document || '<TH>' || 'ENAME' || '</TH>';
p_document := p_document || '<TH>' || 'JOB' || '</TH>';
p_document := p_document || '</TR>' || NL;

-- Procedure Create HTML Table Rows, Handle Text Document

for arec in (select EMPNO, ENAME,JOB from scott.emp order by 2) loop

p_document := p_document || '<TR>' || '<TD nowrap>' || nvl(to_char(arec.EMPNO),


'&nbsp') || '</TD>';
p_document := p_document || '<TD nowrap>' || nvl(arec.ENAME, '&nbsp') || '</TD>';
p_document := p_document || '<TD nowrap>' || nvl(arec.JOB, '&nbsp') || '</TD>
|| '</TR>' || NL;
end loop;
p_document := p_document || '</TABLE>';
else
p_document := 'Text Document Not Implemented';
end if;
END EMP_TABLE;

Resulting Email Message


This is the same email with the message body showing the contents of the table scott.emp.

Work flow Access protection level concepts

Access Level Level you use in the Workflow Builder or Workflow Definitions Loader
Protection Level Level assigned to objects created in the Workflow Builder
Customization Level Level that objects can only be further customized
All levels are represented by an integer from 0-1000

13
Preserve Customizations check box Locks customized object from being overwritten during
a workflow definition upgrade
Lock at this Level Protect the object at the current access level and do not allow the object
to be customized

Object Levels
Selected Check Box Object may be updated by
Saved
Customization = 0 Any access level (0-1000)
None Access = 100
Protection = 1000
Customization = 100 Access level (100-1000)
Allow modifications to customized object
Preserve Customizations Access = 100 check box, customized objects can be
changed by access levels (0-99)
Protection = 1000
Customization = 100 Access level (0-100)
Lock at this Access Level Access = 100
Protection = 100
Customization = 100 Access level (100)
Allow modifications to customized object
Both Access = 100 check box, customized objects can be
changed by access levels (0-99)
Protection = 100

In this example the user has an Access Level of 100


See Oracle Workflow Guide 2.5, page 2-70 and page 4-16

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

How does the developer define their Access Level?

14
Oracle uses access protection to allow or discourage customers to modify certain key Activities
All workflow objects except lookup codes, function attributes, and message attributes contain an
Access tab in their property pages. Lookup codes, function attributes, and message attributes
inherit their access settings from their parent lookup type, function, or message, respectively.

The Access tab lets you define whether:


Future customizations to the object are preserved during a workflow definition upgrade.
The object can be edited by users operating at a higher access level. All workflow objects have
access Protection except Lookup codes, Function attributes and Message attributes

Protection Levels
Objects protected against customizations are considered seed data.
Only users operating at an access level equal to or lower than the protection level of the object
can modify the object.
Users operating at an access level greater than the protection level of the object will see a small
lock on the icon for the object in the navigator tree, indicating that the object is read-only.

Customization Levels
If you set an object to be customizable, its protection level is set to 1000.
A customized object is locked from further modification except from users with access levels
equal to the customization level of the object.

15
16
17

You might also like