Documente Academic
Documente Profesional
Documente Cultură
ORACLE WORKFLOW
Silence is Golden
2 of 37
ORACLE WORKFLOW
Objectives
The program is organized to learn and understand
What is Oracle Workflow What benefits Workflow provides in enterprise systems What is Workflow Builder What are components of a workflow How we can use Workflow builder to create new workflows or customize existing workflows Creating a workflow to map a business process Technical aspects of Workflow
3 of 37
ORACLE WORKFLOW
Workflow Introduction
WHY WHAT
HOW
4 of 37
ORACLE WORKFLOW
Why Workflow
Business Process Modeling
e- Business suite
Delivering Notifications
Integrating Systems
5 of 37
ORACLE WORKFLOW
Why workflow?
1. Workflow provides routing of documents 2. Lets you continuously model complex business scenarios with drag & drop interface 3. Allows sophisticated processes using loops, parallel flows, split & merge flows, sub flows, asynchronous flows 4. Provides flexible notification facility to send and respond to notifications within Oracle applications work list, web browser supported access or external email 5. Tightly integrated with Oracle Database and provides published PL/SQL & Java APIs to drive workflows 6. Provides graphical monitoring facility 7. Business Event systems provided by WF facilitate interface between applications
6 of 37
ORACLE WORKFLOW
What is Workflow
Each workflow is a series of activities strung together with each activity's outcome determining the next activity to perform A Workflow allows graphical representation of business processes and allows modeling, automation and continuous improvement of business processes
7 of 37
ORACLE WORKFLOW
SHIPPING
Data Warehouse
DATA WAREHOUSE
Shipping
ORDER ENTRY
ACCOUNTING
WAREHOUSE
Accounting
WEB STORE
ORACLE WORKFLOW
ORACLE WORKFLOW
Types of Workflow
Synchronous flow
Completes all activities in one session without interruption Does not return control to calling program till completion
Asynchronous flow
Cannot complete all activities in one session Includes activities like notification responses, block/wait functions and deferred activities Can be restarted by Background Engine, Notification System
ORACLE WORKFLOW
Availability
Workflow
Standalone
Some more capabilities Embedded with applications
Workflow is part of Architecture Technology Group, the patches are available in product FND. Note that there is no product such as WF in Applications The Oracle Workflow Builder Release 2.6.3 is compatible with all versions of the Oracle Workflow Server embedded in Oracle Applications Release 11i
11 of 37
ORACLE WORKFLOW
AQ AQ AQ AQ AQ
AQ
Workflow Builder
Execution Definition Administration Monitoring Query Workflow Definition Files Workflow Loader
Listen Query
Query
Mail Applications
Notification Mailer
Browser Client
Application Server
Oracle server
ORACLE WORKFLOW
Workflow Engine
Workflow engine implements the workflow process definitions at runtime monitoring the states and coordinating the routing of process activities
The workflow engine is a database package containing procedures run on a schedule. The workflow engine recognizes activities meeting specific criteria and only operates on those activities. Through the use of standard APIs, background engines can be scheduled to target activities meeting other specified criteria, such as deferred and stuck status activities.
13 of 37
ORACLE WORKFLOW
Background Engine
Background Engine is a PL/SQL package that checks the workflow tables for any activities that require processing such as timed-out or deferred activities Examples Deferred Activities Timed Out Activities Wait Activities Blocked Activities Response Notifications
14 of 37
ORACLE WORKFLOW
WF_USER_ROLES
WF Local Roles
Synchronization
15 of 37
ORACLE WORKFLOW
Notification System
Oracle Internet Messaging Various Mail Applications
Netscape
HTML Plain text
SMTP MAPI
Notifications
Oracle server
ORACLE WORKFLOW
Types of Notifications
FYI notification This type of notification just displays information in text/HTML format. You cannot respond to a FYI notification.
Response Notification
It not only sends the e-mail notification but also allows user to respond to the notifications. The response of user would automatically trigger next activity in the workflow process.
17 of 37
ORACLE WORKFLOW
Viewing Notification
Worklist
Once you login to Oracle Applications you can see the notifications waiting for you Provides complete facility to view notification and drill down to URL Also provides facility to open other Oracle forms to query or update data based on responsibility
Internet-Enabled
Use standard Web browser to display notifications Access from Self-Service / Business Intelligence home page Allows drill-down to any URL or Applications screen to research or complete transaction
E-mail
Standard Mail Protocols: (Oracle Internet Messaging, MAPI, UNIX Sendmail) Detail and summary formats Plain text or HTML email
18 of 37
ORACLE WORKFLOW
Responding to Notification
Work List
Allows you to respond to notifications Also provides facility to open other Oracle forms to query or update data based on responsibility
Internet-Enabled
Use standard Web browser to respond to notifications similar to Worklist User needs to login to Oracle Applications through either Self Service or Business Intelligence Home Page
E-mail
User does not need to login to Oracle Applications Provide response processing through email parser using Template Processing User has to manually enter responses in quoted strings which must match the result codes
19 of 37
ORACLE WORKFLOW
20 of 37
ORACLE WORKFLOW
21 of 37
ORACLE WORKFLOW
Workflow Builder
Oracle Workflow Builder displays a navigator window with a hierarchy tree containing the following tree nodes:
Item Type classification of the components that comprise the workflow process definition
Item Key An identifier for a unique instance of the Item Key. Item Type/item Key combination MUST be unique in any Workflow System at a given time.
Process - Is logical grouping of activities in a workflow Item Type
Attributes property associated with a given item type that acts as a global variable that can be referenced or updated by any activity within a process or externally through the use of standard APIs
22 of 37
ORACLE WORKFLOW
23 of 37
ORACLE WORKFLOW
24 of 37
ORACLE WORKFLOW
Workflow Concepts
Processes & Sub processes
Any process can be a sub process to another process
Runnable
A process that can be initiated as a top level process
Standard Functions
Seeded Functions provided by Oracle They have seeded transitions PL/SQL code is defined and cannot be modified Examples: AND OR NOOP START END NOTIFY
WAIT
User Functions
Custom Functions based on user requirement need to add PL/SQL code to make them work Need to define transitions
25 of 37
ORACLE WORKFLOW
Transitions
Represent completion of one activity and the activation of next They appear as arrows Must correspond to the result of the previous activity Standard Transitions
<Default> WF follows default if no other transition is applicable
26 of 37
ORACLE WORKFLOW
Timeouts
Workflow marks activity as timed-out Cancels notification Sends email to performer about change of status (if set up) Progresses workflow to the activity identified by timeout transition
27 of 37
ORACLE WORKFLOW
More on Notifications
Workflow provides notification messages in both text & HTML format
28 of 37
ORACLE WORKFLOW
29 of 37
ORACLE WORKFLOW
Voting Activity
Oracle supports notifications to be used as a Voting Activity In order to implement voting the particular notification function must have a post-notification procedure to process voting results
30 of 37
ORACLE WORKFLOW
WFSTD
Oracle Workflow Builder comes equipped with several built-in workflows and demos, one of which is WFSTD
This can be used as a template for building custom WFs It has many seeded functions provided by Oracle like
And function facilitating the rendezvous of parallel threads, flow will not continue until all transitions to the function are completed Or function facilitating the rendezvous of parallel threads, flow will continue with completion of the first transition to the function Loop Counter function used to count the number of times a looping flow has transitioned through, allows continuation or exit of the looping flow based on counter Comparison operations functions used to compare date, text, and number values to corresponding item attribute types, allows branching based on the result of the comparison
It also has a Voting activity notification, a message, some attributes and lookup codes and lookup types
31 of 37
ORACLE WORKFLOW
Building a Workflow
ORACLE WORKFLOW
Starting up
A simple workflow process definition can be created in a few easy steps Define an item type and an initial process using the Quick Start Wizard from the File menu
33 of 37
ORACLE WORKFLOW
Building Workflow
Define necessary attributes
Item type attributes can be defined as types such as text, number, date, role, lookup . The value item can be used to set a default value for the attribute
34 of 37
ORACLE WORKFLOW
Building Workflow
Define necessary lookup types and codes
Right click on the Lookup Types node and select New from the menu After the lookup type has been created, select the lookup type, right click, and select New Lookup Code from the menu
35 of 37
ORACLE WORKFLOW
Building Workflow
Define messages to convey information
Right click on the message node and select New After creating the message, go to the Body tab and enter the text (or HTML) desired Attributes are referenced within the body by using & Attributes referenced in the body must also be dragged from the attribute node and dropped in the message
36 of 37
ORACLE WORKFLOW
Building Workflow
Define notifications to deliver the messages
Drag and drop the message onto the Notification node to initiate creation of a notification based on a specific message
37 of 37
ORACLE WORKFLOW
Building Workflow
Drag-and-Drop notifications onto the workflow diagram
Organize the activities Draw transitions as required by the necessary organization of the activities by pressing down the right mouse button on the beginning point of the transition and dragging the mouse to the next step then releasing the mouse button
38 of 37
ORACLE WORKFLOW
Building Workflow
Double click on the notification activities to add the performer (recipient) on the Node tab Hovering over an activity will display important information about the activity
39 of 37
ORACLE WORKFLOW
Building Workflow
Error Handling- Use Standard Item type WFERROR with process DEFAULT_ERROR
Custom Error Handling- Use Custom Process to handle error conditions and assign Custom Item Type & Process Name
40 of 37
ORACLE WORKFLOW
Building Workflow
WFERROR
41 of 37
ORACLE WORKFLOW
Building Workflow
Verify the workflow process definition by pressing the blue check mark icon on the toolbar Save the workflow process definition to the database by pressing the yellow disk icon on the toolbar and entering the Workflow Administrator account information
42 of 37
ORACLE WORKFLOW
Building Workflow
Click on the Launch Processes Link
The Launch Process window will appear, showing a listing of all executable item types Click the item type link for the item type to be launched
43 of 37
ORACLE WORKFLOW
Building Workflow
The Initiate Workflow page appears, listing item type attributes that can be initialized when the workflow is executed Press OK to execute the worklow
44 of 37
ORACLE WORKFLOW
Building Workflow
Once the workflow is executed, the Activities List page is automatically displayed
Clicking on the activity link WH Demo will display the Item Type Definition page which shows process details Clicking on the View Diagram button will display our workflow
45 of 37
ORACLE WORKFLOW
Building Workflow
Press the Home icon to go back to the Workflow Monitoring home page Press the Find Notifications link to bring up the notification search page Enter search criteria and press OK Worklist page appears displaying matching notifications Select subject link to display a notification
46 of 37
ORACLE WORKFLOW
Building Workflow
47 of 37
ORACLE WORKFLOW
Building Workflow
The Reviewer notification that was sent as part of the workflow initiation requires a response The bottom frame of the notification contains response buttons based on the lookup type selected for the notification result The selected response will dictate the transition path taken from the Review notification activity
48 of 37
ORACLE WORKFLOW
Building Workflow
The workflow image at the top right is pre-approval The workflow image at the bottom right is post-approval
The Approve button was pressed on the Reviewer notification causing the approve transition path to be taken
49 of 37
ORACLE WORKFLOW
Workflow Monitor
Summary of key activities
Decision makers in the process Current owners
50 of 37
ORACLE WORKFLOW
51 of 37
ORACLE WORKFLOW
52 of 37
ORACLE WORKFLOW
53 of 37
ORACLE WORKFLOW
54 of 37
ORACLE WORKFLOW
Workflow APIs
There is an entire library of standard APIs, but here are a few examples
wf_engine.CreateProcess creates an instantiation of the specified workflow process wf_engine.StartProcess initiates the created workflow process (used in tandem with CreateProcess) wf_engine.background runs a one-time background engine wf_engine.SetItemAttrText used to set the value of a text item attribute within a workflow process externally from PL/SQL wf_engine.GetItemAttrText used to retrieve the value of a text item attribute from within a workflow process and return it to PL/SQL
55 of 37
ORACLE WORKFLOW
APIs cntd
Another type of standard API is the user-defined function/procedure having pre-defined parameters and return types (where applicable)
A procedure with the following parameter list can be called from within a workflow process and given a user specified name
(itemtype itemkey actid funcmode resultout IN VARCHAR2, IN VARCHAR2, IN NUMBER, IN VARCHAR2, IN OUT VARCHAR2)
56 of 37
ORACLE WORKFLOW
WF Standard Tables
Following are some of the tables where WF stores its data
Master Tables
WF_ACTIVITIES WF_ITEM_TYPES WF_ITEM_ATTRIBUTES WF_MESSAGES WF_LOCAL_ROLES
Transaction Tables
WF_ITEMS WF_NOTIFICATIONS WF_NOTIFICATIONS_ATTRIBUTES WF_ITEM_ATTRIBUTE_VALUES
57 of 37
ORACLE WORKFLOW
Customization
Review the Allow modifications of customized objects checkbox in Help menu
Checked value means workflow builder is operating in upload mode Unchecked value means workflow builder is operating in upgrade mode
58 of 37
ORACLE WORKFLOW
Access levels
Selected Check box Resulting Levels Who can modify object
NONE
Preserve Customizations
Only updatable by access level 100-1000, also by 0-99 if Allow modifications.. checked
BOTH
Updatable by access level 100 only, also by 0-99 if Allow modifications.. checked
59 of 37
ORACLE WORKFLOW
Background Process
Deferred and timeout processes can be restarted by running the following concurrent program
60 of 37
ORACLE WORKFLOW
Workflow Loaders
WFLOAD Utility Similar to FNDLOAD Wft files Storing in database File Systems
61 of 37
ORACLE WORKFLOW
Debugging Workflow
Autonomous Commit The Oracle 8.1 database offers Autonomous Commits. By embedding the pragma AUTONOMOUS_TRANSACTION in your procedure you can perform Commits and Rollbacks independent of the main transaction. Concurrent Programs Using FND_FILE Utilities
62 of 37
ORACLE WORKFLOW
Error Handling
Using Wf_Core.Context WF_CORE.CONTEXT('wf_pkg','set_emp_list',i_itemtype,i_item key,TO_CHAR(i_actid),i_funmode); RAISE; Standard ERROR handling workflow
63 of 37
ORACLE WORKFLOW
Purging Workflow
Purging in Workflow
WF_PURGE API
64 of 37
ORACLE WORKFLOW
ORACLE WORKFLOW
Quiz
ORACLE WORKFLOW
Question
Q> A> What is difference between Item Type and Item Key? Item type is a classification of components that make a WF whereas Item Key is an instance of Item Type
Example: Sales Order Header Workflow has Item Type as OM Order Header OEOM and Item Key for a particular Order Header would be 3231 (Order Number). Together they are represented as OEOM-3231 which must be unique.
67 of 37
ORACLE WORKFLOW
Question
Q> Which component of Workflow System handles notifications? Notification Mailer
A>
68 of 37
ORACLE WORKFLOW
Question
Q> In order to be able to initiate a process as a top level process it must be defined as ______________ ?
69 of 37
ORACLE WORKFLOW
Question
Q> A> What are Workflow Roles? Workflow Roles are one or more users grouped by common responsibility or function. A Workflow role has an email address to where notifications can be sent.
70 of 37
ORACLE WORKFLOW
Question
Q> Name any 4 standard functions provided by Oracle in WFSTD AND OR NOTIFY WAIT
A>
71 of 37
ORACLE WORKFLOW
Question
Q> A> Q> A> Is it possible to set priority to a Message? Yes. Priority can be Normal, High or Low Where is it defined? On properties pages of a message
72 of 37
ORACLE WORKFLOW
Question
Q> What is default error process for Workflow provided by Oracle? DEFAULT_ERROR
A>
73 of 37
ORACLE WORKFLOW
Question
Q> A> Name any 3 WF tables where WF data is stored WF_ACTIVITIES, WF_ITEM_ATTRIBUTES, WF_ITEMS
74 of 37
ORACLE WORKFLOW
Question
Q> What are the arrows connecting one node to another called? Transitions Name standard transitions for an activity. <Default>, <Any>, <Timeout> (for notifications)
75 of 37
ORACLE WORKFLOW
Question
Q> A notification has a timeout period of 60 minutes. However it is more than 3 hours that it has not timed out. The probable cause could be ________________________. Background process did not run
A>
76 of 37
ORACLE WORKFLOW
Question
Q> What parameters does a function activity in workflow pass to a PL/SQL procedure? itemtype, itemKey, actid, funcmode What is the parameter that is returned by the procedure to the Workflow Engine?
A> Q>
A>
resultout
77 of 37
ORACLE WORKFLOW
Question
Q> A> What does standard function NOOP do in WF? Nothing
78 of 37
ORACLE WORKFLOW
Question
Q> Under what modes is the PL/SQL procedure for a WF function called (funcmode)? RUN & CANCEL
A>
79 of 37
ORACLE WORKFLOW
Question
Q> What are possible funcmodes for a notification function (assuming post notification function exists)? RUN, TRANSFER, TRANSFER, FORWARD, TIMEOUT
A>
80 of 37
ORACLE WORKFLOW
Question
Q> An activity of type function is written to compare invoice date against current date. Following transitions are defined for the function.
Greater than (if Invoice date is in future) Less than (if invoice date is in past) Equal (If invoice date is current date) <Any>
A>
81 of 37
ORACLE WORKFLOW
Question
Q> ___________ function is called to process result of a voting activity. A> Post-Notification
82 of 37
ORACLE WORKFLOW
Question
Q> A> Name three Workflows in Oracle E-Business Suite Requisition Approval WF COGS Workflow OM Header & Lines WF
83 of 37
ORACLE WORKFLOW
Question
Q> A> This is where you check the status of a workflow instance. Workflow Monitor
Q>
What does workflow monitor allow users to do for an activity and a process?
Activity: Retry & Skip Process: Rewind & Rerun
A>
84 of 37
ORACLE WORKFLOW
Question
Q> Parallel flows in Workflow can be merged using these functions. Which are those? AND OR
A>
85 of 37
ORACLE WORKFLOW
Question
Q> What are different levels for security for an activity in Workflow builder? Customizations, Access & Protection
A>
86 of 37