Oracle8i Integration Server Overview
Release 3 (8.1.7)

Part Number A83729-01





Go to previous page Go to next page


This chapter introduces Oracle Workflow and contains these sections:


Oracle Workflow was originally developed as a traditional workflow tool to manage complex user-focused workflows within Oracle Applications. As Oracle Corporation recognized Oracle Workflow as a powerful tool for managing complex user-based business processes, we made subsequent releases available as a stand-alone product.

The latest releases include functionality that enhances the ability of the product to provide fully automated business processing by enabling synchronous and asynchronous callouts through Advanced Queuing.

Oracle Workflow is made up of these components:

Key Workflow Components

Oracle Workflow Builder

Oracle Workflow Builder 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.

At any time, you can add, remove, or change workflow activities, or set up new prerequisite relationships among activities. You can easily work with a summary-level model of your workflow, expanding activities to greater levels of detail within the workflow as needed. And, you can operate Oracle Workflow Builder from a desktop PC or from a disconnected laptop PC.

Workflow Engine

The Workflow Engine embedded in the Oracle8i database server monitors workflow states and coordinates the routing of activities for a process. A change in workflow state, such as the completion of workflow activities, is signaled to the engine through a PL/SQL API or a Java API. Based on flexibly defined workflow rules, the Engine determines the activities that are eligible to run, and then runs them. The Workflow Engine supports sophisticated workflow rules, including looping, branching, parallel flows, and subflows.

Workflow Definitions Loader

The Workflow Definitions Loader is a utility program that moves workflow definitions between database and corresponding flat file representations. You can use it 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 integrated into Oracle Workflow Builder, enabling you to open and save workflow definitions in both a database and a file.

Workflow Monitor

Oracle Workflow queue APIs can be called by an application program or by a workflow function in the runtime phase to handle workflow Advanced Queue processing. In Oracle Workflow, an outbound and an inbound queue are established. A package of data on the queue is referred to as an event or a message. A message in this context is different from the messages associated with notification activities.

Events are enqueued in the outbound queue for agents to consume and process. These agents may be any application that is external to the database. Similarly an agent may enqueue a message to the inbound queue for the Workflow Engine to consume and process. The outbound and inbound queues facilitate the integration of external activities into the workflow processes.


Background engines use a separate or deferred queue. 

Key Workflow Features

This section contains:

Complete Programmatic Extensibility

Oracle Workflow lets you include your own PL/SQL procedures or external functions as activities in your workflow. Without modifying your application code, you can have your own program run whenever the Workflow Engine detects that the prerequisites of the program are satisfied.

Electronic Notifications

Oracle Workflow lets you include users in your workflow to handle activities that cannot be automated, such as approvals for requisitions or sales orders. Electronic notifications are routed to a role, which can be an individual user or a group of users. Any user associated with that role can act on the notification.

Each notification includes a message that contains all the information a user needs to make a decision. The information may be embedded in the message body or attached as a separate document. Oracle Workflow interprets each notification activity response to decide how to move on to the next workflow activity.

Electronic Mail Integration

Electronic mail (e-mail) users can receive notifications of outstanding work items and can respond to those notifications using their choice of e-mail applications. An e-mail notification can include an attachment that provides another means of responding to the notification.

Internet-Enabled Workflow

Any user with access to a standard Web browser can be included in a workflow. Web users can access a Notification Web Page to see their outstanding work items, then navigate to additional pages to see more details or to respond.

Monitoring and Administration

Workflow administrators and users view the progress of a work item in a workflow process by connecting to the Workflow Monitor using a standard Web browser that supports Java. The Workflow Monitor displays an annotated view of the process diagram for a particular instance of a workflow process, so that users can view a graphical depiction of their work item status. The Workflow Monitor also displays a separate status summary for the work item, the process, and for each activity in the process.

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. The Business Event System consists of the Event Manager, which lets you register subscriptions on events that are significant to your systems, and Event Activities, which let you model business events within workflow processes.

When an event occurs, the subscribing code is executed in the same transaction as the code that raised the event. Subscription processing can include sending event information to other queues or systems, executing custom code on the event information, and sending event information to a workflow process.

Workflow Monitor

The Workflow Monitor represents graphically the current state of a particular instance of a workflow as it is executed. This is particularly useful for manually tracking long-running message flows as they move through the integration solution. The Monitor is a Java-based applet that you can access through a browser.


You can use Oracle Workflow Standalone Edition release 2.5.2 and later as an integration flow manager to coordinate business event communication between applications by instantiating, controlling, and synchronizing the flow of instances of business events.

Use the Workflow Builder graphical interface to define the order and conditions under which the business process steps execute. Implement automated business process steps using the PL/SQL API and the AQ API to request instantiations of an integration flow by the Workflow Engine. The Engine requests execution of externally defined process steps (for instance, to perform payload transformations).

Oracle Workflow strongly supports manual intervention by users. You can define flows to detect abnormal, suspicious, or problematic instances of business events and to route these events to e-mail, Lotus Notes, MS Exchange, UNIX SendMail, Worklist User Interface, and other products for user approval, correction, or rejection.


Oracle Corporation strongly recommends that the instance of Oracle Workflow employed within the integration solution be dedicated only to integration flow management.  

This restrictive approach prevents you from trying to enable the workflow of applications through the integration solution. This ensures that you can upgrade the integration solution independently of the applications that it integrates.

Asynchronous communication between Oracle Workflow and Advanced Queuing is possible both through the Workflow AQ API and through the PL/SQL callout functionality.


The Workflow AQ API provided with Standalone Workflow release 2.5.2 is simple and includes three queues, all of which:

The object type for the payload has a number of attributes required by Workflow that enable it to associate the queued message with a particular flow. The object type also has a text attribute that you can format to contain parameters in a name/value pairs format proprietary to Oracle Workflow.

Because the queues are single-consumer, the routing cannot use the AQ agent to determine the recipients of outbound messages. Use a combination of itemtype and correlation to identify the business process or a range of business processes.

The three queues have these purposes:

All Oracle Workflow queue APIs are defined in a PL/SQL package called WF_QUEUE. You must execute these queue APIs from the same Oracle Workflow account because the APIs are account dependent.


In using these APIs, we assume that you have prior knowledge of Oracle8i Advanced Queues concepts and terminology. 

See Also:

Oracle8i Application Developer's Guide - Advanced Queuing for more information on Advanced Queue APIs  

Queue APIs

Developer APIs for the Inbound Queue

The following APIs enable developers to write to the inbound queue by creating messages in the internal stack rather than using WF_QUEUE.EnqueueInbound(). The internal stack is purely a storage area and you must eventually write each message that you create on the stack to the inbound queue.

For efficient performance, you should periodically write to the inbound queue to prevent the stack from growing too large.

Payload Structure

All Oracle Workflow queues use the data type system.wf_payload_t to define the payload for any given message. The payload contains all the information that is required about the event. A description of system.wf_payload_t follows:

Table 10-1
Column Name  Type  Description 



The item type of the event  



The item key of the event 



The function activity instance ID 



The name of the function to execute 



A list of value_name=value pairs. In the inbound scenario, the pairs are passed as item attributes and item attribute values. In the outbound scenario, the pairs are passed as all the attributes and attribute values of the function (activity attributes).




An optional activity completion result. Possible values are determined by the Result Type of the function activity or can be an engine-standard result.


See Also:

Oracle8i Application Developer's Guide - Fundamentals and Standard API for an Oracle Workflow 2.5.2 

PL/SQL Callout Functionality

It is possible to define a process step as a PL/SQL callout. When the step is reached, the PL/SQL procedure named in the step is called and parameters specified in the step are passed to the called procedure. When the procedure completes, it passes back a result to indicate success or failure.

You can use the PL/SQL procedure to create a message in an AQ queue or to collect messages from an AQ queue. In doing so, consider:

Instantiating Business Process Instances Using PL/SQL and Java

A PL/SQL package called WF_ENGINE contains two procedures that you can use to create a business process (wf_engine.CreateProcess) and to start that process (wf_engine.StartProcess).

To ensure that the process is executed asynchronously, the cost associated with the first step in the flow must be greater than the threshold of the Workflow Engine.

The Oracle Workflow Java interface offers the WF_ENGINE and WF_NOTIFICATION packages as Java methods that can be called by any Java program to communicate with Oracle Workflow. The Java methods directly reference the WF_ENGINE and WF_NOTIFICATION PL/SQL package procedures and views and communicate with the Oracle Workflow database through JDBC.


Previously, we have used an MQSeries integration scenario to demonstrate the types of solution that you can use to integrate an application that uses non-Oracle messaging technology to the Integration Server products.

The scenario can be examined again here to good effect.

If an interface to an application extracts messages to a messaging technology other than AQ, you must decide whether to integrate the messaging technology to Workflow directly using a programming language or indirectly through specialized software.

The alternative methods for integrating to Workflow are:

Go to previous page Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.