Oracle Workflow manages business processes according to rules that you define. The rules, which we call a workflow process definition, include the activities that occur in the process and the relationship between those activities. An activity in a process definition can be an automated function defined by a PL/SQL stored procedure or an external function, a notification to a user or role that may optionally request a response, a business event, or a subflow that itself is made up of a more granular set of activities.

 A workflow process is initiated when an application calls a set of Oracle Workflow Engine APIs. The Workflow Engine takes over by driving the relevant work item defined by the application, through a specific workflow process definition. According to the workflow process definition, the Workflow Engine performs automated steps and invokes appropriate agents when external processing is required. The following diagram depicts a simplified workflow process definition that routes a requisition to a manager or set of managers for approval.

We refer to the whole drawing as a process or process diagram. The icons represent activities, and the arrows represent the transitions between the activities. In the above example, new items are created for the process when a user creates and submits a requisition in the appropriate application.

 This process contains several workflow activities implemented as PL/SQL stored procedures, including:

  •  Select Approver—to select, according to your business rules, who should approve the requisition.
  • Verify Authority—to verify that a selected approver has the spending authority to approve the requisition.

  • A workflow process definition must be saved to the same database as the Workflow Engine.
  • A process definition is composed of activities and the transitions between them.
  • A completed application transaction or event can initiate a workflow process by raising an event or by calling a series of Workflow Engine APIs.
  • The Workflow Engine locates the ‘Start’ activity in the process definition.
  • The Workflow Engine drives through the process, performing all automated steps such as function activities and Raise and Send event activities, until an asynchronous activity such as a notification, Receive event activity, or blocking activity occurs.

                                        – The Workflow Engine calls the Notification System to deliver a notification message to an appropriate role. Once a user of that role completes the notification response, the Workflow Engine continues to drive through the remaining activities in the process.

                                        – If a blocking activity is encountered, the Workflow Engine waits for an external program to complete and call the appropriate Workflow Engine API before proceeding to the next activity.

                                        – If a Receive event activity is encountered, the Workflow Engine waits to receive the event from the Business Event System before proceeding to the next activity.

  • The process completes when the Workflow Engine encounters an ‘End’ activity.

 Example: Order Processing

This example shows a workflow process that includes business events. The example comes from the Event System Demonstration workflow which is available with the standalone version of Oracle Workflow.