Upload
lyque
View
279
Download
4
Embed Size (px)
Citation preview
1CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Apps Practice
Oracle Workflow Release 2.6
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA
CONFIDENTIALITY STATEMENT
© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disc losure of information in
this document without the express written permission of Keane is prohibited.
XX-123456
2CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Agenda
Overview of Oracle Workflow
Planning and Creating a Workflow Process
Defining Function and Process Activities
Diagramming a Workflow Process
Advanced Features
3CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow - The heart of e-business
Oracle Workflow automates and streamlines business processes
contained within and between enterprises:
• Add personalized trading partner rules
• Validate self-service transactions
• Achieve closed loop business intelligence
• Approve standard business documents
• Step through daily transaction flows
4CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Architecture
RolesUsers
Directory Services
Notification Services
Send
Respond
Forward
Cancel
Query
Oracle Workflow Enabled Application
Oracle Server
Engine
Execution
Definition
Administration
Monitoring
Query
WorkflowBuilder
WorkflowLoader
WorkflowDefinition
Files
WorkflowDevelopment
Client
OracleApplication
Serveror
WebDB
NotificationMailer
ApplicationServer
WebNotification
Worklist
WebProcessMonitor
WebAnalysis
Tools
End-UserClient
MailApplications
5CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Features and Definitions
Oracle Workflow Builder
Workflow Engine
Workflow Definitions Loader
Notification System
Notification Worklist
Directory Services
Workflow Monitor
6CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Builder
Development tool for Oracle Workflow
• Used to graphically define and customize the workflow definitions
• Requires a PC running Windows 95, 98, 2000 or Windows NT
Workflow definitions: you can save them to a database or a flat file
There are two parts to the Workflow Builder:
• Object Navigator
• Process Diagram
7CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Process Definition
8CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Supported Process Constructs
Looping
Results-based branching
• Parallel flows
• Rendezvous
9CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Supported Process Constructs
• Voting
• Timeouts
– Escalation
– Automatic forwarding
• Subprocesses (unlimited hierarchy)
10CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Engine
Is embedded in the Oracle8i server
Uses the process definition created with Oracle Workflow Builder to
coordinate the routing of activities for the process
Monitors the state of each activity in a workflow process
Signals any changes in the workflow state to the engine using calls to
PL/SQL or Java API‟s
Guarantees consistency between the application and the workflow state
because of Oracle8i transactional integrity
11CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Definitions Loader
Workflow Builder
Workflow
EngineWorkflow
Loader
Proc
ess
Defin
itions
Workflow
Loader
Process
Builder
Oracle 8 or Higher
12CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Notification System
For example, UNIX Sendmailor MAPI compliant
Mail System
Notification
System
Application
Notification
Mailer
Oracle
Application
Screens
Workflow
Worklist
Workflow Engine
Directory
Services
Oracle 8 or Higher
13CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Notification Worklist Web Page
14CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Directory Services
WF_USERS
• Contains information on the user names, display names for the users,
their notification preference and their e-mail addresses
WF_USER_ROLES
• Contains information on the association of the users to the roles
WF_ROLES
• Contains information on the roles of which users can be members
15CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Monitor
16CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Monitor
17CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Monitor Contd..
18CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Process Components
Item Type
Process
Functions Notifications Subprocesses
...
...
...Lookup Types, Attributes,
PL/SQL
Messages, Lookup Types,
Attributes,
PL/SQL
Functions, Notifications, Lookup Types
... ...
19CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Creating a New Process from Bottom Up
Define the item type of the process.
Define the item type attributes for the process.
Define lookup types and lookup codes.
Define messages.
Define message attributes.
Define the activities in the process as Function, Notification, or Process.
Diagram the relationship of the activities.
20CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Creating a New Process from Top Down
Use the QuickStart Wizard to create the process framework.
Define activities without underlying dependencies.
Diagram the relationship of the activities.
Define item type attributes for the process.
Define lookup types and lookup codes.
Define messages.
Define message attributes.
Update processes, functions, and notifications with underlying
components.
21CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Create a New Workflow Process Definition
To create a new workflow process:
• Define the item type of the process
• Define item type attributes for the process
• Define lookup types and lookup codes
• Define messages
• Define message attributes
• Define the activities in the process as Function, Notification, or Process
• Diagram the relationship of the activities
22CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Quick Start Wizard
23CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Quick Start Wizard Contd..
24CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define an Item Type
25CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define Item Type Attributes
What should be considered an item type attribute?
• Information required by notification messages, such as the display format
of a currency value
• Information required by function activities, such as values that link back to
applications data like a person_ID
• Information maintained by a workflow activity, such as activities that
identify who to forward information to and from in a loop construct
26CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define Item Type Attributes Contd..
27CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Form Attributes
Click on form icon to launch Oracle Applications form
28CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Document Attributes
You can specify the following types of documents in
the default value field:
PL/SQL document: a document representing data from the
database, generated from a PL/SQL procedure.
• Ideal for use when document content varies
• For example, purchase orders with variable number of lines or sales
orders with variable lines, discounts, and shipping addresses
• DM document: a document managed by an external document
management system
29CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
URL Attributes
30CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
URL Attributes Contd..
Click on attachment icon to launch Web browser
31CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define Lookup Types
32CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define Lookup Codes
33CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 1-1 Overview
This practice covers the following topics:
• Using the QuickStart Wizard
• Drawing transitions
• Saving a Process
34CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Notification
35CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Terms
Notification Activity
• A step to communicate with a human being.
A notification activity sends a message to a user containing the
information needed to complete the work. The notification may or may not
require a response from the recipient.
36CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Create a New Workflow Process Definition
To create a new workflow process:
• Define the item type of the process
• Define item type attributes for the process
• Define lookup types and lookup codes
• Define messages
• Define message attributes
• Define the activities in the process as Function, Notification, or Process
• Diagram the relationship of the activities
37CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Message
38CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Message Contd..
39CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Message Contd..
40CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Message Attribute
41CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Respond Attribute
42CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Respond Attributes in the Notifications Web Page
43CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Notification Activity
44CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Standard Voting Activity
45CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Timeout for a Notification
46CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Performer for a Notification
47CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 2-1 Overview
• This practice covers the following topics:
• Planning a Notification Only Process
• Designing a Process Top Down
• Modifying an existing Workflow Definition
• Creating Item Attributes and Messages
• Setting Node Properties (message, performer, Start/End)
48CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 2-2 Overview
This practice covers the following topics:
• Creating an HTML message body
• Modifying a message
• Modifying a notification
• Modifying a process diagram
49CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Workflow Directory Service
50CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Terms
Role
Directory Repository
51CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Directory Service Views
WF_USERS
WF_ROLES
WF_USER_ROLES
52CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
WF_USERS View
Columns in WF_USERS contain the following information:
• Name: Internal name of a user
• Display Name: Display name of a user
• Description: Description of a user
• Notification Preference: A value of MAILTEXT, MAILATTH, MAILHTML, QUERY or
SUMMARY to indicate how user prefers to receive notifications
• Language: NLS_LANGUAGE initialization parameter that specifies the default language-
dependent behavior
• Territory: NLS_TERRITORY initialization parameter that specifies the default language-
dependent date and numeric formatting used
• Email_Address: Valid email address for the user or mail distribution list
• Fax: A fax number for the user
• Orig_System: Name identifying the base tables of this view
• Orig_System_ID: Primary key that identifies this user in the base tables
• Status: ACTIVE, EXTLEAVE, INACTIVE, TMPLEAVE are the status choices
• Expiration_date: Date at which the user is no longer valid in the directory service
53CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
WF_ROLES View
Workflow roles can be roles, positions or responsibilities referenced in a directory repository. The
columns in WF_ROLES are similar to those in WF_USERS view:
• Name
• Display Name
• Description
• Notification Preference
• Language
• Territory
• Email_Address
• Fax
• Orig_System
• Orig_System_ID
• Expiration_date
54CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
WF_USER_ROLES View
WF_USER_ROLES is an intersection of the users and roles in WF_USER
and WF_ROLES.
– User_Name: Internal name of the user as listed in WF_USERS view
– User_Orig_System: Name assigned to the directory repository that WF_USERS
is based on
– User_Orig_System_ID: Primary key that identifies this user in the user directory
repository
– Role_Name: Internal name of the user as listed in WF_ROLES view
– Role_Orig_System: Name assigned to the directory repository that WF_ROLES
is based on
– Role_Orig_System_ID: Primary key that identifies this role in the role directory
repository
55CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Local Tables
WF_LOCAL_USERS
WF_LOCAL_ROLES
WF_LOCAL_USER_ROLES
56CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Implementing Global User Preferences
Interaction with Oracle Workflow
Access to the Global Preferences Web page
Override a default user preference
57CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
User Preference Information
58CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Ad Hoc Users/Roles
You can create and manage ad hoc users and roles in a workflow
process.
Use server PL/SQL APIs to dynamically create new user and role
definitions in the directory service. The new APIs store the
information in the WF_LOCAL_* tables.
The WF_USERS and WF_ROLES views use the EXPIRATION_DATE.
WF_LOCAL_USER_ROLES keeps track of the originating system of
the users and roles.
59CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Directory Service for Oracle Applications
Oracle Workflow ships a unified directory service for Oracle
Applications—wfdirhrv.sql. The unified directory service maps:
• WF_USERS to Oracle HRMS employees, Oracle Application/Oracle Self-
Service Application users, Oracle Receivables customer contacts and
WF_LOCAL_USERS.
• WF_ROLES to users in WF_USERS, Oracle HRMS positions, Oracle Federal
HR group boxes, Oracle Applications responsibilities, Oracle Engineering
approval lists, and WF_LOCAL_ROLES
60CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Directory Services for Oracle Workflow Standalone Version
Two sample Directory Services scripts are located in the Oracle
Workflow sql subdirectory:
• wfdirouv.sql maps workflow users and roles to the native users and
roles defined in the Oracle RDBMS.
• wfdircsv.sql maps workflow users and roles to the users and roles
stored in the Oracle Workflow local tables.
61CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Function and Process Activities
62CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Objectives
After this lesson, you should be able to:
–Define a function activity
–Define an activity attribute
–Apply the Workflow Engine APIs to your function activities
–Define a process activity
63CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Create a New Workflow Process Definition
To create a new workflow process:
• Define the item type of the process
• Define item type attributes for the process
• Define lookup types and lookup codes
• Define messages
• Define message attributes
• Define the activities in the process as Function, Notification, or Process
• Diagram the relationship of the activities
64CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Define a Function Activity
65CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Assigning a Cost to a Function Activity
Cost is entered in seconds and converted to hundredths of a second
when stored in the database.
Assign a high cost to function activities that require a large amount of
processing to complete.
If the cost of an activity exceeds the threshold cost of the Workflow
Engine, the activity gets deferred by the Workflow Engine.
A background engine set up to poll for deferred activities can execute the
deferred activity at a later time.
66CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Standard PL/SQL API for Calling Functions
All PL/SQL stored procedures called by function activities in an Oracle
Workflow process should follow the standard API format so that the
Workflow Engine can properly execute the activity.
procedure <procedure name>
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultoutout varchar2)
67CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Defining a Standard Function
Itemtype - the internal name for the item type. Defined in the Oracle
Workflow Builder.
Itemkey - a string that represents a primary key generated by the
workflow-enabled application for the item type. The string uniquely
identifies the item within an item type.
Actid - the ID number of the activity that this procedure is called from.
Funcmode - determines the execution mode of the function procedure.
Resultout - a result may be returned depending on the funcmode used to
call the function.
68CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Function Activity Execution Modes
Function modes:
• RUN
–Activities that are executed for the first time
–Follows CANCEL mode on a loop reset
• CANCEL
–Activities revisited as part of a loop reset
–Activities that are part of a process that has been canceled by a call to
WF_ENGINE.AbortProcess
–Activities that are part of the process stream being undone by a call to
WF_ENGINE.HandleError
69CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Standard PL/SQL API Result Out
If a Result Type is specified in the Activities property page of the Activity
in the Workflow Builder, this parameter represents the expected result
returned when the procedure completes. Possible Resultout values are:
• COMPLETE:<result_code>
• WAITING
• DEFERRED:<date>
• NOTIFIED:<notification_id>:<assigned_user>
• ERROR:<error_code>
70CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Notification Activities Revisited
All PL/SQL stored procedures referenced by notification activities as a
post-notification function in an Oracle Workflow process should follow
the standard API format so that the Workflow Engine can properly
execute the activity.
procedure <procedure name>
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out varchar2)
71CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Post-Notification Function Execution Modes
Function modes:
• RESPOND
• FORWARD
• TRANSFER
• RUN
• TIMEOUT
72CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
PL/SQL API Result Out for a Post-Notification Function
The Resultout parameter is ignored for „RESPOND‟, „FORWARD‟, and
„TRANSFER‟ function modes, unless it looks like „ERROR%‟. If you want
to fail the Respond, Forward, or Transfer operation after the post-
notification function has executed you can: return Resultout =
ERROR:<error_code>
Raise an exception in your procedure
73CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Post-Notification Function Context Information
Reference Global WF_ENGINE variables in PL/SQL
Global Context Information set:
• WF_ENGINE.context_nid = notification_ID
• WF_ENGINE.context_text = new recipient_role
available in TRANSFER or FORWARD mode
• WF_ENGINE.context_text = responder
available in RESPOND mode
74CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Exception Handling
Debugging Function Activities
Use WF_CORE APIs to raise and catch errors in your PL/SQL
procedures
Engine sets function activity status “ERROR” if:
• PL/SQL procedure raises an unhandled exception
• PL/SQL procedure returns a result beginning with “ERROR:”
75CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Exception Handling Example
…
exception
when others then
WF_CORE.CONTEXT (‘<package name>‘,
‘<procedure name>‘, <itemtype>, <itemkey>,
to_char(<actid>), <funcmode>;
raise;
end <procedure name>
76CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Defining a Function Activity Attribute
77CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Defining a Process Activity
78CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Defining Activity Details
79CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Looping
Looping occurs when the completion of an activity causes a
transition to another activity that has already been completed.
The first activity detected as a revisited activity is also called a loop
point or pivot activity.
The Workflow Engine can handle a revisited
activity in one of three ways:
• Ignore
• Reset
• Loop
80CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Looping Contd..
Non-canceling Loop can improve performance by preventing the rerun of
functions in CANCEL mode.
Ignore: is for OR-typeoperations where rest of
branch is ignored.
Reset: permits resettingstatus by recalling
activitiesin CANCEL-mode.
Loop: performs loopwithout any reset.
Recommended setting.
81CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 3-1 Overview
This practice covers the following topics:
• Creating a Function Activity
82CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Workflow Engine
83CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Objectives
After this lesson, you should be able to:
• Give a general description of how the Workflow Engine manages a
process
• Apply the Workflow Engine APIs to your function activities
84CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Overview of the Workflow Engine
The Oracle Workflow Engine:
• Is implemented in server-side PL/SQL.
• Is activated whenever a call to one of its PL/SQL procedures or functions is made.
• Manages the state of activities for each process instance.
• Determines the next activity once a prerequisite activity completes.
• Executes function activities automatically.
• Calls the Notification System to send notification messages.
• Supports results-based branches, parallel branches, rendezvous, loops and subprocesses.
• Can execute activities from non-savepoint environments such as database triggers and
distributed transactions. It automatically traps savepoint-not-allowed errors.
• Can defer activities too costly to execute in real time to background engines for processing.
• Maintains a history of completed activities.
• Detects error conditions and executes error processes.
85CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Initiating a Workflow Process
To start a workflow process:
• Your application must execute a procedure that calls the following
Workflow Engine APIs:
–WF_ENGINE.CreateProcess
–WF_ENGINE.StartProcess
or
–WF_ENGINE.LaunchProcess
–The procedure must identify the value of the process item type and item
key for these APIs
86CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Engine Processing
Upon starting a process, the Workflow Engine:
Identifies and executes the Start activity
Determines the next activity to transition to after completing the
prerequisite activity or activities
Drives through the process, automatically executing all function activities,
until it comes to a notification or blocking activity
Calls the Notification System to notify a recipient
Continues driving through the process until it encounters an End activity,
(once the performer completes the notification or the block activity is
completed)
87CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Activity Statuses
Once the Workflow Engine executes an activity, it updates the state
of the activity to one of the following statuses:
• Active
• Complete
• Waiting
• Notified
• Deferred
• Error
• Suspend
88CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Calling the Workflow Engine
Engine must be informed when an activity completes.
• Process, notification, and function activities automatically call
WF_ENGINE.CompleteActivity( ) when they complete.
• If a notification activity requires some action to be taken in a form or Web
page, then that form or Web page must call
WF_ENGINE.CompleteActivity( ) when the user completes the
transaction.
• If a function activity calls an external program, then code that external
program to call WF_ENGINE.CompleteActivity( ) when it completes.
89CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow APIs
Oracle Workflow APIs are grouped as follows:
Engine APIs
• Starting/running a process
• Communicating attribute information
• Communicating state changes
Core APIs: raising and catching errors
Purge APIs: purging obsolete runtime data
Directory APIs: communicating directory services user and role information
Monitor APIs: generating Workflow Monitor URLs
Notification APIs: managing notifications
Preference APIs: retrieving user preference information
Queue APIs: handling workflow Advanced Queues processing
Document Management APIs: returning URLs or javascript functions
Views: providing public views to access workflow data
90CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Engine APIs
Use the following APIs to start or run a workflow process:
• WF_ENGINE.CreateProcess
• WF_ENGINE.StartProcess
• WF_ENGINE.LaunchProcess
• WF_ENGINE.SetItemOwner
• WF_ENGINE.SetItemUserKey
• WF_ENGINE.SetItemParent
• WF_ENGINE.background
Use the following APIs to communicate attribute information to the Workflow Engine:
• WF_ENGINE.SetItemAttribute (3)
• WF_ENGINE.SetItemAttrDocument
• WF_ENGINE.GetItemAttribute (3)
• WF_ENGINE.GetItemAttrDocument
• WF_ENGINE.GetItemAttrInfo
• WF_ENGINE.GetActivityAttribute (3)
• WF_ENGINE.AddItemAttr
• WF_ENGINE.GetItemAttrInfo
• WF_ENGINE.GetActivityAttrInfo
91CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Engine APIs Contd..
Use the following APIs to communicate state changes to the Workflow Engine:
• WF_ENGINE.CompleteActivity
• WF_ENGINE.BeginActivity
• WF_ENGINE.AssignActivity
• WF_ENGINE.GetActivityLabel
• WF_ENGINE.AbortProcess
• WF_ENGINE.SuspendProcess
• WF_ENGINE.ResumeProcess
• WF_ENGINE.HandleError
• WF_ENGINE.ItemStatus
92CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Background Engine The Background Engine is a PL/SQL procedure.
The Background Engine checks for and executes any deferred or timed out
activities that satisfy the arguments of the procedure at the time the procedure is
invoked.
If new activities are deferred or timed out after the initiation of the current
Background Engine, the procedure will check one more time for any new
activities to execute prior to ending.
The procedure ends once all matching activities are executed.
WF_ENGINE.BACKGROUND(
itemtype in varchar2,
minthreshold in number default null,
maxthreshold in number default null,
process_deferred in boolean default TRUE,
process_timeout in boolean default TRUE);
93CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Deferred Processing
Set the Workflow Engine threshold cost to control which activities get deferred.
The default threshold cost of the Workflow Engine is set to 50.
The Workflow Engine threshold is an externalized constant.
Add this command to a form or PL/SQL procedure to change the threshold:
WF_ENGINE.THRESHOLD := n;
94CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Timed Out Notification Activities
Workflow Engine calls the Notification System to deliver the notification and
marks the activity as NOTIFIED.
The background Engine configured for timed out activities checks for Notified
activities and determines whether the Notified activities have timeout values that
have been exceeded.
If the timeout value is exceeded, the Background Engine marks the activity as
timed out and calls the Workflow Engine to follow the <Timeout> transition.
Timeout values may be set to an item attribute or to a relative time in
days/hours/minutes.
95CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Error Processing
If an activity error occurs the Workflow Engine:
Rolls back to the pre-activity savepoint.
Sets the activity to the ERROR status.
Attempts to run an Error Process.
96CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 4-1 Overview
This practice covers the following topics:
• Creating a Notification Timeout
• Adding a Result Type to a process
• Adding an Error Process to a process
• Running a Background Engine against a process
97CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Workflow Notification Activities
98CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Oracle Workflow Home Page
99CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Notifications Worklist
100CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Notification Details
101CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Reassigning Notifications
User List-of-values
Delegate orTransfer
reassign options
102CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Launching Oracle Application Forms
Click on form icon to launch Oracle Applications form
103CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
E-Mail Notification
Automaticgeneration
ofresponsetemplate
104CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
E-Mail Notification Contd..
Automaticgeneration
ofresponsetemplate
105CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Monitoring Workflow Processes
106CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Workflow Monitor
107CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Find Processes Web Page
108CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Reviewing the Process List
109CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Reviewing the Notifications List
110CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Filtering Activities in the Activities List
111CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Filtering Activities in the Activities List Contd..
112CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Child/Parent Instances
113CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Practice Les 5-1 Overview
This practice covers the following topics:
• Testing PL/SQL functions in a Workflow Process
• Responding to Notifications
• Monitoring the results of a Work Item
Using the Vacation Proposal process created in practice Les 4-1:
Initiate a work item
Monitor the status of your work item using the Monitor Activities List and Diagram
Timeout the Vacation Proposal notification
Exercise the Schedule Update function activity logic
Exercise Vacation Proposal post-notification function logic, if implemented
Debug any PL/SQL errors encountered
114CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Process Definition Restrictions
Limited WF_ENGINE API calls:
• CreateProcess
• StartProcess
• SetItemAttribute
• GetItemAttribute
• GetActivityAttribute
• CompleteActivity
115CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
<Insert photo here>
March 10
Purge
116CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Purging Obsolete Workflow Data
Purge APIs delete obsolete runtime data and activity versions no
longer in use.
The most commonly used WF_PURGE APIs:
• Items – purge all runtime data associated with completed items, their
processes, and notifications sent by them.
• Activities – purge obsolete versions of activities that are no longer in
use by any item.
• Total – purge both item data and activity data.
• AdHocDirectory - purge users and roles in the WF_LOCAL_* tables
whose expiration date has elapsed and that are not referenced in any
notification.
117CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited.
Purging Obsolete Workflow Data in Oracle Applications
• Use the concurrent program Purge Obsolete Workflow Runtime Data, short name FNDWFPR.
• Systems administrator should add the concurrent program to the security group for the responsibility you wish to run this program from.
• Navigate to the Submit Request form in Oracle Applications.
• Supply the following parameters:
• Item Type
• Item Key
• Age
• Persistence Type
118CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited. March 10
Questions?
Australia | Canada | China | France | India | New Zealand |
Singapore | Switzerland | UAE | UK | USA
Keane Corporate Headquarters
100 City Square
Boston, MA 02129
Toll free: +1 877.88.KEANE
www.keane.com
119CONFIDENTIALITY STATEMENT© 2009 Keane, The concepts and methodologies contained herein are proprietary to Keane Inc. Duplication, reproduction or disclosure of information in this document without the express written permission of Keane is prohibited. March 10
Thank You
Australia | Canada | China | France | India | New Zealand |
Singapore | Switzerland | UAE | UK | USA
Keane Corporate Headquarters
100 City Square
Boston, MA 02129
Toll free: +1 877.88.KEANE
www.keane.com