Oracle WF PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 106

Oracle Workflow Basics

27-Jan-2008

Telecom3/ Motorola

[email protected]

17 March 2009 TCS Internal


Agenda

ƒ Overview of Oracle Workflow


ƒ Oracle Workflow Availability
ƒ Oracle Workflow Architecture
ƒ Workflow process components
ƒ Defining Functions for Oracle Workflow
ƒ Defining Procedures for Oracle Workflow
ƒ Workflow engine API’s
ƒ Defining a Workflow process diagram
ƒ Workflow Access Protection
ƒ Workflow Status Monitor
ƒ Workflow Notifications
ƒ Workflow Users and Roles
ƒ Example

TCS Internal 17 March 2009 2


Overview of Oracle workflow

Oracle Workflow delivers a complete workflow management system that supports business
process based integration. Its technology enables modeling, automation, and continuous
improvement of business processes, routing information of any type according to user-
defined business rules.

Oracle Workflow automates and streamlines business processes both within and beyond
the enterprise, supporting traditional applications based workflow as well as e-business
integration workflow.

Workflow processes can be used to,


ƒ validate self-service transactions
ƒ approve standard business documents
ƒ step through daily transaction flows
ƒ integrate with trading partner systems

TCS Internal 17 March 2009 3


Overview of Oracle workflow
Routing information

– Right information to the right people

– Provides each person with all the information they need to take action.

Defining and modifying business

– Define and continuously improve the business processes using the drag and drop process
designer.

– Adapt your processes as your business changes

– Focuses on managing the business process, not the individual transactions.

Delivering Electronic notifications

– Lets people receive notifications of items awaiting their attention via e-mail and act based on their
e-mail responses.

TCS Internal 17 March 2009 4


Oracle Workflow Types
Traditional Workflows

ƒ These type of workflows are launched from a business application through APIs hard-coded
within the application.

ƒ These processes model the business rules in the individual local application and are made up of
activities executed by the workflow engine only in that application's system.

Event Based workflows

ƒ Business is integrated with the external system.

ƒ Supports business-to-business data exchange .

ƒ Based on the Business Event System

TCS Internal 17 March 2009 5


Oracle Workflow Availability
Oracle Workflow is available in two versions:

Standalone

– With the Oracle Database (both Standard Edition and Enterprise Edition)

– With the Oracle Application Server

– With the Oracle Collaboration Suite

Embedded in Oracle E-Business Suite

– Self-service applications.

– Professional applications

– Used in Enterprise resource planning (ERP), Customer Relationship Management (CRM), Human
Resource Management Systems (HRMS).

TCS Internal 17 March 2009 6


Oracle Workflow Architecture

TCS Internal 17 March 2009 7


Workflow Development client
Oracle 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.

ƒ Using the workflow Builder, you can create and modify all workflow objects, including activities,
item types, and messages.

ƒ The workflow definition files can either directly be saved to the database or can be saved as a flat
file.

ƒ Oracle workflow builder consists of two parts:

• Navigator tree

• Process Diagram

TCS Internal 17 March 2009 8


Workflow Development client
Workflow Definitions Loader

ƒ It is a utility program that moves workflow definitions between database and corresponding flat file
representations.

ƒ It can be used to move workflow definitions from a development to a production database, or to


apply upgrades to existing definitions.

ƒ In addition to being a standalone server program, the workflow definitions Loader is also
integrated into Oracle workflow Builder, allowing you to open and save workflow definitions in both
a database and file.

TCS Internal 17 March 2009 9


Oracle Server
Workflow Engine

ƒ The workflow engine is a set of tables and PL/SQL stored procedures that manages the execution
of a workflow process and tracks work in process.

ƒ Manages the state of activities for each process instance

ƒ Calls the Notification System to send notification messages

ƒ Executes function activities automatically

ƒ Supports results-based branches, parallel branches, loops, and sub-processes

ƒ Maintains a history of completed activities.

ƒ Detects error conditions and executes error processes.

TCS Internal 17 March 2009 10


Oracle Server
Business Event System

ƒ The Business Event System is an application service that uses the Oracle Advanced Queuing
(AQ) infrastructure to communicate business events between systems.

ƒ Workflow with the business event system can act as a system integration messaging hub that
relays business event messages among systems

ƒ The Business Event System consists of the Event Manager, which lets you register subscriptions
to significant events, and event activities, which let you model business events within workflow
processes

ƒ When a local event occurs, the subscribing code is executed in the same transaction as the code
that raised the event.

ƒ Subscription processing can include executing custom code on the event information, sending
event information to a workflow process, and sending event information to other queues or
systems.

TCS Internal 17 March 2009 11


Oracle Server
Notification System

ƒ Routes notifications to a role, which can be a single user or group of users

ƒ Enables users to receive and respond to notifications using an e-mail application or web browser
of choice.

ƒ sends e-mail notifications and processes e-mail responses using the JavaMail API

ƒ allows any users with access to the internet to be included in a workflow process

TCS Internal 17 March 2009 12


Oracle Server
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.

ƒ 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

ƒ A role could be a user, an employee, a responsibility or a holder of a position in the position


hierarchy

ƒ If the workflow is embedded in Oracle Applications, then the workflow directory service views are
automatically based on a unified oracle applications environment.

TCS Internal 17 March 2009 13


Application Server
Application Server

ƒ The application server is the environment outside of the RDBMS.

ƒ This environment includes ancillary services such as the Oracle Application Server (OracleAS) as
the web server, and notification mailers

Notification Mailer

ƒ A notification mailer performs e-mail send and response processing for the Oracle Workflow
Notification System, using the JavaMail API.

ƒ Oracle Workflow Manager can be used to manage the notification mailers.

TCS Internal 17 March 2009 14


End-User Client
End-User Client

ƒ The end-user client is the workstation or PC that an end user uses to perform daily tasks.

ƒ This client includes browser support for reviewing and responding to notifications in the Worklist,
the Workflow Monitor, and other Workflow web pages, as well as mail applications for reviewing
and responding to notifications by e-mail.

ƒ It also includes the Workflow Manager component accessed through Oracle Applications
Manager (OAM) for the version of Oracle Workflow embedded in Oracle E-Business Suite.

TCS Internal 17 March 2009 15


Workflow process components

TCS Internal 17 March 2009 16


Item Type
Item Types

ƒ An item type is a classification of the components that make up a workflow process.

ƒ Any component that is created for a process, such as a function activity or a message, with a
particular item type must be associated with an Item Type.

Item Type Attributes

ƒ An item type attribute is a property associated with a given item type.

ƒ It acts as a global variable that can be referenced or updated by any activity within a process.

ƒ You must define an item type before you can define the item attributes associated with it.

TCS Internal 17 March 2009 17


Item Type Attributes
Display Name

ƒ The name of an object within the workflow, which is visible to the user.

Internal Name

ƒ The internal name of an object is the name that will always be referred to within the workflow.

ƒ This must be unique within the item types.

TCS Internal 17 March 2009 18


Item Type Attributes
Persistence Type

ƒ Oracle workflow allows the developer to determine how long the status audit trail of the workflow
should be maintained (i,e) how long each workflow should remain in the database after they
complete before they become eligible for purging. Types,

Permanent

ƒ Will remain for ever in the database.

ƒ This can be removed by using the WF_PURGE.totalperm() API and specifying the item type

Temporary

ƒ Remain ineligible for purging until n complete days have passed.

Synchronous

ƒ Do not persist the workflow in the database, so no run-time data is stored.

ƒ No database transaction.

TCS Internal 17 March 2009 19


Item Type Selector/Callback Functions

ƒ An item type can have more than one runnable process activity associated with it.

ƒ PL/SQL selector functions are used to determine which process activity to run in a particular
situation.

ƒ A selector function can be extended to be a general callback function so that item type context
information can be reset as needed if the SQL session is interrupted.

ƒ Enter the selector function in the following format:


<package_name>.<procedure_name>

TCS Internal 17 March 2009 20


Item Type Properties

TCS Internal 17 March 2009 21


Item Type Properties

TCS Internal 17 March 2009 22


Item Type Properties

TCS Internal 17 March 2009 23


Attribute Data Types
You can assign the following data types to attributes:

– Text

– Number

– Date

– Lookup

– Role

– Attribute

– URL

– Form

– Document

– Event

TCS Internal 17 March 2009 24


Defining Item Type Attributes

Item type attributes are defined in the Oracle


Workflow Builder navigator tree beneath a given
item type.

TCS Internal 17 March 2009 25


Defining Lookup Types
Lookup Types

ƒ A lookup type is a static list of values.

ƒ These lists can be referenced by activities and by item type, message, or activity attributes. For
example:

ƒ An activity can reference a lookup type for its possible result values

ƒ A message attribute can reference a lookup type to provide a list of possible responses to the
performer of a notification.

Defining Lookup Codes

ƒ Lookup codes represent the actual values in a lookup type.

ƒ The lookup codes for a lookup type are defined in the navigator tree beneath the lookup type.

TCS Internal 17 March 2009 26


Defining Lookup Types

TCS Internal 17 March 2009 27


Defining Lookup Types

TCS Internal 17 March 2009 28


Defining Lookup Types

TCS Internal 17 March 2009 29


‘Form’ Attribute Type
Form Attribute Type

ƒ The attribute value is an Oracle Applications internal form function name and its optional form
function parameters.

ƒ This attribute type is not relevant for the standalone version of Oracle Workflow.

ƒ If you include a form-type attribute in a notification message as a message attribute, the


notification, when viewed from the Notification Details Web page, displays an attached form icon
that lets users drill down to the referenced form

TCS Internal 17 March 2009 30


‘Form’ Attribute Type

TCS Internal 17 March 2009 31


Document Attributes
Document Attributes

ƒ Attributes of type document can represent data from the database in various formats, generated
from a PL/SQL procedure.

ƒ PL/SQL document: Represents data as a character string

ƒ PL/SQL CLOB document: Represents data as a character large object (CLOB)

ƒ PL/SQL BLOB document: Represents data as a


binary large object (BLOB)

ƒ These attributes can appear in a notification message as an inline link (PL/SQL and PL/SQL CLOB
documents only) or as an attachment icon (PL/SQL, PL/SQL CLOB, and PL/SQL BLOB
documents).

ƒ When users view their notifications, they can click a link or an attachment icon to open the
referenced document.

TCS Internal 17 March 2009 32


Document Attributes

TCS Internal 17 March 2009 33


URL Attributes
URL Attributes

ƒ An attribute of type URL references a Universal Resource Locator (URL) to a network location
such as a web page.

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

ƒ These attributes appear in a notification message body as an inline hypertext link or below the
message as an attachment icon.

TCS Internal 17 March 2009 34


URL Attributes

TCS Internal 17 March 2009 35


Defining Functions for Oracle Workflow

TCS Internal 17 March 2009 36


Defining Oracle Workflow

TCS Internal 17 March 2009 37


Defining Oracle Workflow – Item Type

TCS Internal 17 March 2009 38


Defining Oracle Workflow – Item Type

TCS Internal 17 March 2009 39


Defining Oracle Workflow – Item Type

TCS Internal 17 March 2009 40


Defining Oracle Workflow – Item Type

TCS Internal 17 March 2009 41


Defining Oracle Workflow – Item Type

TCS Internal 17 March 2009 42


Defining Oracle Workflow – Attribute Type

TCS Internal 17 March 2009 43


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 44


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 45


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 46


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 47


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 48


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 49


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 50


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 51


Defining Oracle Workflow – Functions

TCS Internal 17 March 2009 52


Defining Oracle Workflow – Notifications

TCS Internal 17 March 2009 53


Defining Oracle Workflow – Messages

TCS Internal 17 March 2009 54


Defining Oracle Workflow – Messages

TCS Internal 17 March 2009 55


Defining Oracle Workflow – Messages

TCS Internal 17 March 2009 56


Defining Oracle Workflow – Notifications

TCS Internal 17 March 2009 57


Defining Oracle Workflow – Process

TCS Internal 17 March 2009 58


Supported Process Constructs
ƒ Looping

ƒ Results-based branching

ƒ Parallel flows

ƒ Rendezvous

ƒ Voting

ƒ Timeouts

ƒ Escalation

ƒ Automatic forwarding

ƒ Sub-processes (unlimited hierarchy)

TCS Internal 17 March 2009 59


Defining Procedures for Oracle Workflow

TCS Internal 17 March 2009 60


Standard API for PL/SQL Procedures Called by Function
Activities

ƒ All PL/SQL stored procedures that are called by function or notification activities in an Oracle
Workflow process should follow this standard API format so that the Workflow Engine can properly
execute the activity.

ƒ The Workflow Engine traps errors produced by function activities by setting a savepoint before
each function activity. If an activity produces an unhandled exception, the engine performs a
rollback to the savepoint, and sets the activity to the ERROR status. For this reason, you should
never commit within the PL/SQL procedure of a function activity.

TCS Internal 17 March 2009 61


Standard API for PL/SQL Procedures Called by Function
Activities
Itemtype

ƒ The internal name for the item type. Item types are 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 from which this procedure is called.

TCS Internal 17 March 2009 62


Standard API for PL/SQL Procedures Called by Function
Activities
funcmode

ƒ The execution mode of the activity. If the activity is a function activity, the mode can be ’RUN’,
’CANCEL’, ’SKIP’, or ’RETRY’.

ƒ If the activity is a notification activity, with a post-notification function, then the mode can be
’RESPOND’, ’FORWARD’, ’TRANSFER’, ’QUESTION’, ’ANSWER’, ’VALIDATE’, ’TIMEOUT’, or
’RUN’

resultout

ƒ If a result type is specified in the Activities properties page for the activity in the Oracle Workflow
Builder, this parameter represents the expected result that is returned when the procedure
completes.

ƒ COMPLETE:<result_code>

ƒ WAITING

ƒ DEFERRED:<date>

ƒ NOTIFIED:<notification_id>:<assigned_user>

ƒ ERROR:<error_code>

TCS Internal 17 March 2009 63


Standard API for PL/SQL Procedures Called by Function
Activities
procedure <procedure name>
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out varchar2) is

<local declarations>

Begin

if ( funcmode = ’RUN’ ) then


<your RUN executable statements>
resultout := ’COMPLETE:<result>’;
return;
end if;

if ( funcmode = ’CANCEL’ ) then


<your CANCEL executable statements>
resultout := ’COMPLETE’;
return;
end if;

TCS Internal 17 March 2009 64


WORKFLOW ENGINE API’s

TCS Internal 17 March 2009 65


Workflow Engine API’s
To start or run a workflow process

ƒ WF_ENGINE.CreateProcess creates a new runtime process for a work item.

ƒ WF_ENGINE.StartProcess begins execution of the specified process.

ƒ WF_ENGINE.LaunchProcess launches a specified process by creating the new runtime process


and beginning its execution.

ƒ WF_ENGINE.SetItemOwner sets the owner of an existing item.

ƒ WF_ENGINE.SetItemUserKey sets a user-friendly identifier for an item.

ƒ WF_ENGINE.GetItemUserKey returns the user-friendly identifier assigned to an item.

ƒ WF_ENGINE.SetItemParent defines the parent/child relationship for master/detail processes.

TCS Internal 17 March 2009 66


To communicate attribute information
To set the value of an item type attribute in a process

ƒ WF_ENGINE.SetItemAttrText,

ƒ WF_ENGINE.SetItemAttrNumber

To obtain the values of an item type attribute in a process

ƒ WF_ENGINE.GetItemAttrText,

ƒ WF_ENGINE.GetItemAttrNumber,

To adds a new item attribute to the runtime process

ƒ WF_ENGINE.AddItemAttr.

ƒ WF_ENGINE.AddItemAttrTextArray

To return the value of an activity attribute in a process

ƒ WF_ENGINE.GetActivityAttrText,

ƒ WF_ENGINE.GetActivityAttrNumber,

TCS Internal 17 March 2009 67


To communicate State Changes
To communicate state changes to the Workflow Engine

ƒ WF_ENGINE.CompleteActivity notifies the engine that the specified activity has been completed
for the item, identifying the activity by the activity node label name.

ƒ WF_ENGINE.BeginActivity determines if the specified activity can currently be performed and


raises an exception if it cannot.

ƒ WF_ENGINE.AssignActivity assigns an activity to another performer.

ƒ WF_ENGINE.AbortProcess aborts process execution and cancels outstanding notifications.

ƒ WF_ENGINE.SuspendProcess suspends process execution so that users cannot transition items


to new activities.

ƒ WF_ENGINE.ResumeProcess returns a suspended process to normal execution status.

ƒ WF_ENGINE.ItemStatus returns the status and results for the root process of the specified item
instance.

TCS Internal 17 March 2009 68


Oracle Workflow Compilation

TCS Internal 17 March 2009 69


Oracle Workflow Compilation

TCS Internal 17 March 2009 70


Oracle Workflow Compilation

TCS Internal 17 March 2009 71


Oracle Workflow - Example

TCS Internal 17 March 2009 72


Oracle Workflow - Example
• Example Workflow Code

Package Spec

Package Body

Training workflow

Initiate workflow

TCS Internal 17 March 2009 73


Oracle Workflow - Example

TCS Internal 17 March 2009 74


Workflow Access Protection

TCS Internal 17 March 2009 75


Oracle Workflow – Access Protection concepts

ƒ Oracle Workflow uses a feature called access protection to control modification of workflow
definitions.

ƒ As a workflow developer, you can use access protection to allow or discourage “customers” of
your workflows from modifying your “seed data” workflow definitions.

ƒ As a customer of predefined workflows provided by Oracle, you can use access protection to
preserve valid customizations you have made to a predefined workflow during a workflow
definition upgrade.

TCS Internal 17 March 2009 76


Oracle Workflow – Access Protection concepts

ƒ 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:

o Future customizations to the object are preserved during a workflow definition upgrade.

o The object can be edited by users operating at a higher access level.

TCS Internal 17 March 2009 77


Oracle workflow – Access Levels

ƒ Each user of Oracle Workflow Builder operates the system at a certain access level.

ƒ The access levels are defined as follows:

Æ 0-9: Reserved for Oracle Workflow

Æ 10-19: Reserved for Oracle Application Object Library

Æ 20-99: Reserved for Oracle E-Business Suite

Æ 100-999: Reserved for customer organizations

Æ 1000: Public

TCS Internal 17 March 2009 78


Protection Levels

ƒ If you protect an object against customization, you effectively assign the object a protection level
equal to your current access level.

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

TCS Internal 17 March 2009 79


Customization Levels

ƒ If you set an object to be customizable, its protection level is set to 1000.

ƒ The customization level of an object is set to the access level of the initial user who customizes
the object.

ƒ A customized object is locked from further modification except from users with access levels
equal to the customization level of the object.

ƒ The customization level is relevant only with respect to unprotected workflow objects.

ƒ If an object is protected at a certain level, it shouldn’t be modified at all except by an access level
equal to or less than the protected level of the object.

ƒ You can change your access level in the “About Oracle Workflow Builder” dialog box available

from the Help menu. Enter an integer value in the Access Level field and click OK.

TCS Internal 17 March 2009 80


Customization Levels

TCS Internal 17 March 2009 81


Setting Protection and Customization Levels
ƒ Select the Access tab for an object in Oracle Workflow Builder to display the Access property page.

ƒ The indicator bar provides a visual range of access levels that can edit the object.

ƒ The Levels region shows the customization, access, and protection levels of the object based on the settings in
the Options region.

ƒ Use the Options region to set the protection and customization levels of an object.

Æ Preserve Customizations

Æ Lock at this Access Level

ƒ The indicator bar provides a visual range of access levels that can edit the object-

Æ Black vertical line: Current access level

Æ White range: Cannot edit the object

Æ Solid green: Can edit the object

Æ Cross-hatch green: Usually cannot modify the object because it has been customized, but can now do
so because Oracle Workflow Builder is set to Upload mode so that customized objects can be modified

TCS Internal 17 March 2009 82


Setting Protection and Customization Levels
ƒ The Levels region shows the Customization, Access, and Protection levels of the object based on
how you set the check boxes in the Options region.

ƒ Use the Options region to set the protection and customization levels of an object.

ƒ Preserve Customizations: Prevents customized objects from being overwritten during a workflow
definition upgrade

ƒ Lock at this Access Level: Protects the object at the current access level and does

ƒ not allow the object to be customized by higher access levels

ƒ Oracle E-Business Suite customers should select both the Preserve Customizations and Lock at
this Access Level check boxes to protect your workflow objects during upgrades.

TCS Internal 17 March 2009 83


Oracle Workflow – Access Protection concepts

TCS Internal 17 March 2009 84


Example of Access Protection
Assume you have an access level of 100.

Selected Options Resulting Level Edit Range


Customization = 0
None Access = 100 0-1000
Protection = 1000
Customization = 100
Preserve
Access = 100 100-1000
Customizations
Protection = 1000
Customization = 0
Lock at this
Access = 100 0-100
Access Level
Protection = 100
Customization = 100
Both Access = 100 100
Protection = 100

TCS Internal 17 March 2009 85


Preserving Customizations
ƒ To ensure that your customizations are preserved during an upgrade of Oracle Workflow:

ƒ Check your access level before you make your modifications to the predefined workflow process.

Æ Oracle E-Business Suite: 100

Æ Standalone Oracle Workflow: 100 or higher

ƒ Set the appropriate options in the Access property page for any object that you modify.

Æ Oracle E-Business Suite: Select both the Preserve Customizations and Lock at this
Access Level options.

Æ Standalone Oracle Workflow: Select the Preserve Customizations option. Optionally


select the Lock at this Access Level option.

Æ During an Oracle Workflow seed data upgrade, the Workflow Definitions Loader is
always run in Upgrade mode at an access level less than 100. As a result, the upgrade
will not overwrite any object with a customization level of 100 or higher

TCS Internal 17 March 2009 86


Workflow Access Protection

TCS Internal 17 March 2009 87


Workflow Status Monitor

TCS Internal 17 March 2009 88


Status Monitor

Navigation

TCS Internal 17 March 2009 89


Status Monitor

Navigation

TCS Internal 17 March 2009 90


Status Monitor

TCS Internal 17 March 2009 91


Status Monitor

TCS Internal 17 March 2009 92


Status Monitor

TCS Internal 17 March 2009 93


Status Monitor

TCS Internal 17 March 2009 94


Status Monitor

TCS Internal 17 March 2009 95


Status Monitor

TCS Internal 17 March 2009 96


Status Monitor

TCS Internal 17 March 2009 97


Status Monitor

TCS Internal 17 March 2009 98


Workflow Notifications

TCS Internal 17 March 2009 99


Workflow Notifications

ƒ The Oracle Workflow Worklist Web pages let you view and respond to your notifications.

ƒ You can receive individual e-mail notifications

ƒ An e-mail notification contains all the details of the notification, including instructions on how to
respond to the notification.

TCS Internal 17 March 2009 100


Different types of notifications used in oracle workflows

TCS Internal 17 March 2009 101


Workflow Notifications Performer

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

ƒ The Performer performs action on the workflow notification (i.e) Approve/ Reject etc.

ƒ When the workflow engine reaches a notification activity, it issues a Send() API call to the
Notification System to send the message to an assigned performer

ƒ The performer is a workflow user with a defined Role. The access for a particular workflow activity
is restricted using the roles.

TCS Internal 17 March 2009 102


Workflow Roles
ƒ Oracle Workflow roles are stored in the database, in the Oracle Workflow directory service.

ƒ The workflow Roles are referenced in the Workflow Process

ƒ One example of how roles are referenced in a workflow process is when you include a notification
activity in a process as a node. You must assign that node to a performer. The performer can be a
designated role or an item type attribute that dynamically returns a role.

ƒ To assign a performer to a role, you must initially load the roles from your Oracle Workflow
database into your Oracle Workflow Builder session.

ƒ Oracle Workflow allows you to create new ad hoc users and roles within a workflow process, to
add to your directory service. To do so, you define a function activity that makes a server-side call
to the appropriate WF_DIRECTORY API and include that function activity in your process
diagram.

TCS Internal 17 March 2009 103


Assigning node to a performer

TCS Internal 17 March 2009 104


Defining Workflow Roles
Directory Service API s

The following APIs can be called by an application program or a workflow function in the runtime phase
to retrieve information about existing users and roles, as well as create and manage new ad hoc users
and roles in the directory service. These APIs are defined in a PL/SQL package called
WF_DIRECTORY .

ƒ CreateAdHocUser ƒ GetRoleUsers
ƒ CreateAdHocRole ƒ GetUserRoles
ƒ AddUsersToAdHocRole ƒ IsPerformer
ƒ RemoveUsersFromAdHocRole ƒ UserActive
ƒ SetAdHocUserStatus ƒ GetUserName
ƒ SetAdHocRoleStatus ƒ GetRoleName
ƒ SetAdHocUserAttr ƒ GetRoleDisplayName
ƒ SetAdHocRoleAttr

TCS Internal 17 March 2009 105


Oracle Workflow Basics

Thank You

TCS Internal 17 March 2009 106

You might also like