Oracle Workflow
Oracle Workflow
Version 1.0
Agenda
Overview Workflow Builder
Workflow Architecture Workflow Directory Services Workflow Monitor Workflow Item attributes Business Event System Workflow development Approaches Workflow Technical Architecture
Version 1.0
Objectives
Know what is Oracle workflow Know how business processes are modelled with workflow builder Know how workflow processes can be monitored Know architecture of Oracle workflow
Version 1.0
Overview
Oracle Workflow is a Business Process Management tool. It is used for modeling, automating & monitoring Business processes, during which documents, information or tasks are passed from one participant to another for action, according to a set of procedural rules. Here is a sample workflow process diagram..
Version 1.0
Overview (Contd.).
Oracle Workflow accomplishes these important business requirements: 1. Models Business Process with Rules :
Oracle Workflow lets you model sophisticated business processes with loop, branch, parallel flows and then decompose into subflows. Oracle Workflow can decide which path to take based on the result of a stored PL/SQL procedure. Routes information through Oracle Apps for action or notification. The attachments include self-service Web page and Application forms. Delivers electronic notifications to any Oracle Applications user. Delivers electronic notifications to any e-mail or Internet user.
4. Integrating Systems
Oracle Workflow lets you set up subscriptions to business events which can launch workflows. You can communicate events among systems within your own enterprise and with external systems as well to achieve complex system integration scenarios.
5
Version 1.0
Workflow Builder
Oracle Workflow Builder is a graphical tool that lets you create, view, or modify a
business process with simple drag and drop operations.
Version 1.0
Workflow Components
Data Store: A database connection or flat file that holds a workflow process
definition.
Item Type: A specific business document or transaction eg. Purchase order can be
an item type. All the workflow components mentioned below are grouped together as an Item type. Item Type Attribute: A feature of the item type which stores information that can be globally referenced by any activity in a process. Also referred to as an item attribute. Process Activity: A series of actions that need to be performed to accomplish a business goal. A process is represented by a workflow diagram. A process can include function activities, notification activities, event activities, and other subprocesses. Event Activity: A business event modeled as an activity so that it can be included in a workflow process. Notification Activity: A unit of work that requires human intervention. A notification activity sends a message to a performer. Function Activity: An automated unit of work, usually defined as a PL/SQL stored procedure. A function activity can also run an external function. In the standalone version of Oracle Workflow, a function activity can also run a Java program on the middle tier. Message: The information sent by a notification activity. The message may request the performer to do some work or may simply provide information.
Version 1.0
Transition: The relationship that defines the completion of one activity and the
activation of another activity within a process. In a process diagram, a transition is represented as an arrow between two activities.
Item: A specific business document or transaction. For example, purchase order can
be an item type while a purchase order identified by a particular ID number is an item of that item type.
Version 1.0
Result B
}
Result Type = Lookup Type Result Y Result N
}
RESULT Resp 1 Resp 2
Notification:
Message
FYI
Response Required
}
9
Event:
Event Message
Version 1.0
(No Result)
Version 1.0
10
Version 1.0
11
Version 1.0
12
Version 1.0
13
Version 1.0
14
Create Message
A message is what a notification activity sends to a role in a workflow process. A message can prompt a user for a reply or an action to take that determines what the next activity in the process should be. The recipient of a workflow message is called the performer, which is defined in Notification node.
The subject can include message attributes that get token replaced with runtime values. To include a message attribute, use an ampersand (&) followed by the message attributes internal name. You can enter plain text or html formatted message in the body.
Version 1.0
15
Enter message attribute internal name. Specify Send or Respond in the Source field to indicate whether this attribute should send information or prompt a recipient for a response. The Display Name appears as the response prompt, If this is a Respond message attribute.
Version 1.0
16
Version 1.0
17
Version 1.0
18
Version 1.0
19
You can drag and drop activities from the navigator tree into the process window or create activities directly in the process window by right-click and choosing the option. You define transitions between activities by drawing arrows from one node to the next by clicking the right mouse button and drawing it to the next activity while keeping it pressed. Notification, function, event, and process activities make up the nodes of a process. 20
Version 1.0
Version 1.0
21
Version 1.0
22
Version 1.0
23
Version 1.0
24
These APIs can be used to create WF processes, send notifications, purge etc. These can essentially be used by the developer while developing any WF components (either customizing or creating new WF item types).
Version 1.0
25
Workflow Transitions
Version 1.0
26
Workflow Transitions
Activity-Each activity is a node, a logical step that contributes toward the completion of a process. Transitions-Transitions appear as arrows in your diagram and represent the completion of one activity and the activation of another.
a. b. c.
Version 1.0
27
Self-looping Transitions
Version 1.0
28
<Default> Transitions
The Workflow Engine follows a <Default> transition if no other transition matching the completion result exists.
Version 1.0
29
<Any> Transitions
Ap p ro ve Do c ume nt Ap p ro ve d End (Ap p ro ve )
S ta rt
R e vie w Do c ume nt R e je c t
Ye s No
<Any>
Do c ume nt R e je c te d
End (R e je c t)
Lo g R e vie w
The Workflow Engine follows an <Any> transition regardless of what completion result the activity returns. This allows you to include a generic activity in the process that the Workflow Engine executes in parallel with the resultspecific activity.
Version 1.0
30
Version 1.0
31
Version 1.0
32
Version 1.0
33
Version 1.0
34
Directory Services
The directory service for Oracle Workflow is implemented as a set of views that are mapped across the user tables of the underlying application. Create Roles: Adhoc roles can be created using User Management Responsibility or through PL/SQL in database. If you use PL/SQL to create roles make sure you give all user names and role names in UPPER case to avoid some problems
Version 1.0
BEGIN wf_directory.CreateAdHocRole(lv_role, lv_role_desc, NULL, NULL, 'Role Demo for erpschool users', 'MAILHTML', 'NAME1 NAME2', --USER NAME SHOULD BE IN CAPS NULL, NULL, 'ACTIVE', NULL);
dbms_output.put_line('Created Role' ||' '||lv_role); End; /
Version 1.0
36
Version 1.0
37
Version 1.0
38
WF_USERS: Contains information on user names, display names, notification preferences and e-mail addresses WF_ROLES: Contains information on the roles of which users can be members WF_USER_ROLES: Contains information on the association of users with roles WF_LOCAL_ROLES WF_USER_ROLE_ASSIGNMENTS
Version 1.0
39
Version 1.0
40
Workflow administrators and users can view the progress of a work item in a workflow process by connecting to the Workflow Monitor using a standard Web browse. The Self-Service Monitor in Oracle Applications lets you view and administer workflows that you own. You can use the monitor to review the notifications sent by a workflow, check the progress of the workflow by viewing the status diagram, and examine participant responses to notifications sent by the workflow.
Version 1.0
41
Version 1.0
42
Version 1.0
43
Workflow Architecture
Web Notification Worklist
Web Monitor Web Analysis Tools Mail Applications Notification Mailer Oracle HTTP Server Advanced Queuing Directory Services Users Roles Workflow XML Loader Workflow Builder Workflow Engine Workflow Definitions Loader Workflow Definition Files Workflow Development Client
44
Notification System
Oracle Workflow Enabled Application
End-User Client
Version 1.0
Application Server
Oracle Server
Version 1.0
45
Version 1.0
46
Text Number Date Lookup Role Attribute URL Form Document Event
Version 1.0
47
URL Attributes
URL Attributes : When you create an item attribute of type URL, specify a frame target for the attribute. If you reference this item attribute as the default value of a message attribute in a message, the URL frame opens according to what you specified as the frame target. The value of a URL attribute can be a text string or can be token substituted. A URL value is specified in the format: http://<location>
Version 1.0
48
URL Attributes
The Notification Details web page supports message attributes of type URL. These attributes appear in a notification message body as a hypertext link or below the message as an attachment icon. When you open your notification, you can click the link or attachment icon to display the URL according to the frame target specified for the attribute. Click the attachment icon to launch an attached URL in the Web browser
Version 1.0
49
Form Attributes
Form Attribute Values : The value for an attribute of type form must be the internal function name of an Oracle EBusiness Suite form function, together with any optional form parameters. The default value for the form attribute must be entered using the following format: function_name:parameter1=value1 parameter2=value2 ...parameterN=valueN The value of a form parameter can be a text string enclosed in quotes ( ) or can be token substituted with another predefined item type attribute in either of the following ways: parameterN = &item_type_attribute parameterN = Value &item_type_attribute, where &item_type_attribute represents the rest of the value
Version 1.0
50
Form Attributes
Form Attributes : The Notification Details web page supports message attributes of type form. These attributes appear in a notification message as a form icon. When you open your notification, you can click the attached form icon to drill down to the referenced form. Form attributes cannot be attached to e-mail notifications. To view form attachments, you must view the notification in the Notification Details web page.
Click the form icon to launch an attached Oracle E-Business Suite form
Version 1.0
51
Document Attributes
Document attribute: The value for a document attribute should be a PL/SQL document ie. a document representing data from the database as a character string, generated from a PL/SQL procedure. A PL/SQL document value is specified in the format: PLSQL:<procedure>/<docume nt_identifier>
Version 1.0
52
Document Attributes
The Notification Details web page supports message attributes of type document. These attributes appear in a notification message as an inline link or as an attachment icon. When you open your notification, you can click a link or an attachment icon to open the referenced document.
Version 1.0
53
Version 1.0
54
Version 1.0
55
Version 1.0
56
Name the pl/sql function which we are attaching to the event. You may even attach a workflow type and process to the event.
Version 1.0
57
Version 1.0
58
Version 1.0
59
Workflow Approaches
Two approaches for creating work flow: -
1.
2.
Bottom Up Approach
Version 1.0
60
Bottom Up Approach
1. 2. 3. Define the item type of the process. Define the item type attributes for the process. Define lookup types and lookup codes.
4.
5. 6. 7.
Define messages.
Define message attributes. Define the activities in the process as Function, Notification or Process. Diagram the relationship of the activities.
Version 1.0
61
4.
5. 6. 7.
Version 1.0
62
References
1. Oracle Applications Documentation library - Oracle workflow Developer's Guide, http://downloaduk.oracle.com/docs/cd/B25516_08/current/html/docset.html
Version 1.0
63