BPEL4People has been developed to provide extensive support for human interactions in BPEL processes and to standardize the human interactions. Originally, the BPEL4People specification was defined by IBM and SAP. Other companies, such as Oracle, Active Endpoints, and Adobe have also joined. Today, this specification has being advanced within the OASIS BPEL4People Technical Committee. The BPEL4People specification contains two parts:
- BPEL4People version 1.0, which introduces BPEL extensions to address human interactions in BPEL
- Web Services Human Task (WS-HumanTask) version 1.0 introduces the definition of human tasks
BPEL4People is defined in a way that it is layered on top of the BPEL language. We will now have a brief look at the WS-HumanTask and then at the BPEL4People.
Brief look at WS-HumanTask
The WS-HumanTask specification introduces Human Tasks to BPEL. Human Tasks are services, implemented by humans. A Human Task has two interfaces. One interface exposes the service offered by the task, like a translation service or an approval service. The second interface allows people to deal with tasks, for example to query for human tasks waiting for them, and to work on these tasks. This is very similar to human tasks in WebSphere, with two main differences—WS-HumanTask standardizes tasks among different vendors, and WS-HumanTask introduces new activities for specifying the properties of human tasks. In WebSphere, we had to use the Integration Developer GUI instead.
WS-HumanTask makes a distinction between Human Tasks and notifications. Notifications are a special type of Human Task that allows the sending of information about noteworthy business events to users. Notifications are always delivered one-way. There is no response from notifications expected.
The overall structure of the human interactions definition is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<htd:extension namespace="anyURI" mustUnderstand="yes|no"/>+
<htd:logicalPeopleGroup name="NCName" reference="QName"?>+
<htd:parameter name="NCName" type="QName" />*
The most important is the definition of the Human Task. The definition includes the following:
- People assignments
- Presentation elements
- Search priorities
- Deadlines (start and competition deadlines)
The WS-HumanTask specification foresees the following syntax to define a human task:
<htd:outcome part="NCName" queryLanguage="anyURI">?
Within the deadlines, escalations can be defined. An example of defining an escalation is shown as follows:
(htd:getInput("OrderRequest")/amount < 1000
&& htd:getInput("OrderRequest")/prio <= 10) ]]>
Order approval overdue.
In a similar way, a reassignment could be done.
Notifications are defined with the following:
- People assignments
- Presentation elements
An example is shown as follows:
<htd:interface portType="QName" operation="NCName"/>
The WS-HumanTask specification also defines the API for applications that are involved with the life cycle of a human task or a notification. It provides several types of operations, including:
- Participant operations, such as operation for claiming tasks, starting, stopping, suspending tasks, completing tasks, setting priority, delegating, and so on
- Simple query operations, such as getMyTasks and getMyTaskAbstracts
- Advanced query operation, which provides several possibilities for retrieving the tasks
- Administrative operations for nominating and activating tasks, and setting generic human roles
The specification also defined XPath extension functions to retrieve Human Task properties.
Now that we are familiar with WS-HumanTask, let us have a brief look at the BPEL4People specification.
Brief look at BPEL4People
BPEL4People is a BPEL extension, which adds several activities to the BPEL language. The most important extensions introduced in BPEL4People are people activities and people links. People activities are used to define human interactions. For each people activity, the BPEL server must create work items and distribute them to users eligible to execute them. People activities can have input and output variables and can specify deadlines. This is very similar to what we have seen in the WebSphere support for human tasks.
To specify the implementation of people activities, BPEL4People introduces tasks. Tasks specify actions that users must perform. Tasks can have descriptions, priorities, deadlines, and other properties. Tasks can be represented in-line, or using WS-HumanTask.
To associate people activities and the related tasks with users or groups of users, BPEL4People introduces people links. They associate users with one or more people activities. People links are usually associated with generic human roles, such as process initiator, process stakeholders, owners, and administrators.
The overall structure of BPEL4People extensions is as follows:
<bpel:import importType="http://www.example.org/WS-HT" …/>
<b4p:peopleActivity name="NCName" ...>
Let us have a look at the new elements:
- The element
contains declarations of elements from the WS-HumanTask namespace, such as , , and . The element specifies a logical people group used in an inline human task or a people activity. The element is used to provide the definition of an inline human task. The element is used to provide the definition of an inline notification.
- The element
is used to assign people to process-related generic human roles.
- The new activity
is used to model human interactions within BPEL processes.
BPEL4People defines generic human roles. These roles define what a person or a group of people can do with the process instance. The specification defines three process-related generic human roles:
- Process initiator: Person that triggered the process instance
- Process stakeholders: People who can influence the progress of a process instance, for example, by adding ad-hoc attachments, forwarding a task, or simply observing the progress of the process instance
- Business administrators: People allowed to perform administrative actions on the business process instances
The syntax of people assignments looks like this:
People activities are used to integrate human interactions within BPEL processes. A people activity can be integrated with an inline Human Task or with a standalone Human Task. An inline task can be defined as part of a people activity. A standalone Human Task is defined separately and can be used several times. To specify Human Tasks, we use the WS-HumanTask specification.
The overall syntax is as follows:
<bpel:toPart part="NCName" fromVariable="BPELVariableName"/>+
<bpel:fromPart part="NCName" toVariable="BPELVariableName"/>+
In this article, we have covered the BPEL4People and WS-HumanTask specifications. These specifications have standardized the approach to BPEL human interactions and made it portable through different SOA process servers. We have overviewed both specifications and have seen that there are no major conceptual differences between the current Oracle support and the approach taken in specifications. At the time of writing, it has not been clear how much support these specifications will get from SOA platform vendors.
- Human Interactions in BPEL [Article]
- Business Processes with BPEL [Article]
- Web Services, SOA, and WS-BPEL Technologies [Article]
- SOA—Service Oriented Architecture [Article]
- Oracle Web Services Manager: Authentication and Authorization [Article]