Sunday, September 23, 2012

SOA 11g Human Workflow Overview


Although workflow is already part of other oracle products (EBS, Siebel…), Oracle has redesigned the workflow based on “Open standards” that can provide consistent user experience, ease of customization and many other advantages… 

In this post, I am going to discuss about SOA 11g Human workflow. 
Features
Architecture
Concepts
Tutorial

Overview
In SOA 10g, human workflow is an independent component. It had to be deployed and configured separately. In SOA 11g, it’s tightly integrated with other components through the SCA architecture. The main components of SOA 11g human workflow are shown in the following figure.  On the left are the workflow initiators (typically BPEL or a mediator). However, the Human Task component is also exposed as a SOAP service that can be invoked independently. In the middle is the core human workflow component that is formed by a combination of workflow services. We will discuss about these services later. On the right, there are the client applications that present the user the necessary web (or another) interfaces to act on the task.

BPEL invokes human task component when a manual task needs to be performed
A task is created in the Human Task service component. (The task metadata is used by the component to manage lifecycle of the task)
The Human task service component identifies the necessary users/roles/groups using an identity service and assigns the task
These tasks are presented to the user through the client apps. (Oracle BPM worklist is the default app)

(Credit: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_introhwf_shared.htm)

Human workflow Features
Here is a list of features that are supported by human workflow.  (http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_introhwf_shared.htm#CIHGEFCI). 

Human interactions with processes, including assignment and routing of tasks to the correct users or groups
Deadlines, escalations, notifications, and other features required for ensuring the timely performance of a task (human activity)
Presentation of tasks to end users through a variety of mechanisms, including a worklist application (Oracle BPM Worklist)
Organization, filtering, prioritization, and other features required for end users to productively perform their tasks
Reports, reassignments, load balancing, and other features required by supervisors and business owners to manage the performance of tasks

These descriptions are at 1000 foot level. The real question is what’s behind the curtain that’s providing these capabilities? Let’s dive into the human workflow architecture to understand the inner workings. 


Architecture
At the core, the human workflow is made up of several workflow services that are orchestrated to provide the different capabilities. 

Service Name
Description
Task Service
Primary service that manages the lifecycle of a Task. This service is invoked by the BPEL to initiate a Task.
Task Routing Service
Task Routing, Assigning and escalations are taken care by this service
Task Query Service
Queries tasks based on several criteria. (Used by client apps)
Task Metadata Service
Provides metadata of the task
Identity Service
This service is part of security infrastructure of the weblogic server.
Notification Service
Sends notifications through User Messaging services
User Metadata Service
Maintains metadata about workflow users. (Vacations, preferences, delegation rules…)
Runtime Config Service
Manages metadata used by task service
Evidence service
Provides storage services for audit trail. Supports digital signatures.

The following figure shows how the different components of human workflow are tied together with SOA 11g infrastructure components.

(Credit: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_introhwf_shared.htm)

These services are weaved together to provide the features described above. For example, task service uses identity service to retrieve the user information to assign the tasks. Similarly, worklist application depends on the Task query service to retrieve tasks for a specific user.


(Credit: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_introhwf_shared.htm)

Many of these services are exposed through SOAP web services or EJB’s.  The list is available here. (http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_workflow.htm#BABFFDDF)

Service name
SOAP WSDL location
Task Service http://host:port/integration/services/TaskService/TaskServicePort?WSDL
Task Query Service http://host:port/integration/services/TaskQueryService/TaskQueryService?WSDL
Identity Service http://host:port/integration/services/IdentityService/configuration?WSDL
http://host:port/integration/services/IdentityService/identity?WSDL
Task Metadata Service http://host:port/integration/services/TaskMetadataService/TaskMetadataServicePort?WSDL
User Metadata Service http://host:port/integration/services/UserMetadataService/UserMetadataService?WSDL
Task Report Service http://host:port/integration/services/TaskReportService/TaskReportServicePort?WSDL

Here the Task service and Task Query services are loaded into SOAPUI.



These services enable access for 3rd party applications to perform actions on the tasks. For example, a custom worklist application can be integrated into a 3rd party vendor portal.

A tutorial on how to use the Human task web services is available here.

This is the "behind the scenes" overview of Human workflow...

Here is good tutorial about Human workflow from Oracle development team 
http://redstack.wordpress.com/2010/01/08/human-workflow-in-11g/