BPEL4People

Exclusive offer: get 50% off this eBook here
WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g

WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g — Save 50%

Define, model, implement, and monitor real-world BPEL business processes with SOA powered BPM for Oracle SOA Suite with this book and eBook

$41.99    $21.00
by Marcel Krizevnik Matjaz B. Juric | September 2010 | BPEL Enterprise Articles SOA Oracle

In the previous article, Human Interactions in Business Processes, we learnt about the the basic human workflow concepts, features, and architecture. Then discussed the Human Task service component.

In this article, by Matjaz B. Juric & Marcel Krizevnik, authors of WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g, we will learn about BPEL4People.

We will specifically cover:

  • Brief look at WS-HumanTask
  • Brief look at BPEL4People

Introduction

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.

Overall structure

The overall structure of the human interactions definition is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<htd:humanInteractions
xmlns:htd="http://www.example.org/WS-HT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="anyURI"
targetNamespace="anyURI"
expressionLanguage="anyURI"?
queryLanguage="anyURI"?>
<htd:extensions>?
<htd:extension namespace="anyURI" mustUnderstand="yes|no"/>+
</htd:extensions>
<htd:import namespace="anyURI"?
location="anyURI"?
importType="anyURI" />*
<htd:logicalPeopleGroups>?
<htd:logicalPeopleGroup name="NCName" reference="QName"?>+
<htd:parameter name="NCName" type="QName" />*
</htd:logicalPeopleGroup>
</htd:logicalPeopleGroups>

<htd:tasks>?
<htd:task name="NCName">+
...
</htd:task>
</htd:tasks>

<htd:notifications>?
<htd:notification name="NCName">+
...
</htd:notification>
</htd:notifications>
</htd:humanInteractions>

Human Tasks

The most important is the definition of the Human Task. The definition includes the following:

  • Interface
  • Priority
  • People assignments
  • Delegation
  • Presentation elements
  • Outcome
  • Search priorities
  • Renderings
  • Deadlines (start and competition deadlines)

The WS-HumanTask specification foresees the following syntax to define a human task:

<htd:task name="NCName">
<htd:interface portType="QName"
operation="NCName"
responsePortType="QName"?
responseOperation="NCName"?/>
<htd:priority expressionLanguage="anyURI"?>?
integer-expression
</htd:priority>
<htd:peopleAssignments>
...
</htd:peopleAssignments>
<htd:delegation potentialDelegatees=
"anybody|nobody|potentialOwners|other"/>?
<htd:from>?
...
</htd:from>
</htd:delegation>
<htd:presentationElements>
...
</htd:presentationElements>
<htd:outcome part="NCName" queryLanguage="anyURI">?
queryContent
</htd:outcome>
<htd:searchBy expressionLanguage="anyURI"?>?
expression
</htd:searchBy>
<htd:renderings>?
<htd:rendering type="QName">+
...
</htd:rendering>
</htd:renderings>
<htd:deadlines>?
<htd:startDeadline>*
...
</htd:startDeadline>
<htd:completionDeadline>*
...
</htd:completionDeadline>
</htd:deadlines>
</htd:task>

Escalations

Within the deadlines, escalations can be defined. An example of defining an escalation is shown as follows:

<htd:escalation name="highPrio">
<htd:condition>
<![CDATA[
(htd:getInput("OrderRequest")/amount < 1000
&& htd:getInput("OrderRequest")/prio <= 10) ]]>
</htd:condition>

<htd:notification name="ClaimApprovalOverdue">
<htd:interface portType="tns:ClaimsHandlingPT"
operation="escalate" />
<htd:peopleAssignments>
<htd:recipients>
<htd:from logicalPeopleGroup="Manager">
<htd:argument name="region">
htd:getInput("OrderRequest")/region
</htd:argument>
</htd:from>
</htd:recipients>
</htd:peopleAssignments>
<htd:presentationElements>
<htd:name>
Order approval overdue.
</htd:name>
</htd:presentationElements>
</htd:notification>
</htd:escalation>

In a similar way, a reassignment could be done.

Notifications

Notifications are defined with the following:

  • Interface
  • Priority
  • People assignments
  • Presentation elements
  • Renderings

An example is shown as follows:

<htd:notification name="NCName">
<htd:interface portType="QName" operation="NCName"/>
<htd:priority expressionLanguage="anyURI"?>?
integer-expression
</htd:priority>
<htd:peopleAssignments>
<htd:recipients>
...
</htd:recipients>
<htd:businessAdministrators>?
...
</htd:businessAdministrators>
</htd:peopleAssignments>
<htd:presentationElements>
...
</htd:presentationElements>
<htd:renderings>?
...
</htd:renderings>
</htd:notification>

Programming interface

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.

Overall structure

The overall structure of BPEL4People extensions is as follows:

<bpel:process ...
xmlns:b4p="http://www.example.org/BPEL4People"
xmlns:htd="http://www.example.org/WS-HT">
...
<bpel:extensions>
<bpel:extension namespace="http://www.example.org/BPEL4People"
mustUnderstand="yes"/>
<bpel:extension namespace="http://www.example.org/WS-HT"
mustUnderstand="yes"/>
</bpel:extensions>
<bpel:import importType="http://www.example.org/WS-HT" …/>

<b4p:humanInteractions>?
<htd:logicalPeopleGroups>?
<htd:logicalPeopleGroup name="NCName">+
...
</htd:logicalPeopleGroup>
</htd:logicalPeopleGroups>
<htd:tasks>?
<htd:task name="NCName">+
...
</htd:task>
</htd:tasks>
<htd:notifications>?
<htd:notification name="NCName">+
...
</htd:notification>
</htd:notifications>
</b4p:humanInteractions>

<b4p:peopleAssignments>
...
</b4p:peopleAssignments>
...
<bpel:extensionActivity>
<b4p:peopleActivity name="NCName" ...>
...
</b4p:peopleActivity>
</bpel:extensionActivity>
...
</bpel:process>

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.

People assignments

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:

<b4p:peopleAssignments>
<b4p:processInitiator>?
<htd:from ...>
...
</htd:from>
</b4p:processInitiator>
<b4p:processStakeholders>?
<htd:from ...>
...
</htd:from>
</b4p:processStakeholders>
<b4p:businessAdministrators>?
<htd:from ...>
...
</htd:from>
</b4p:businessAdministrators>
</b4p:peopleAssignments>

People activities

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:

<b4p:peopleActivity name="NCName"
inputVariable="NCName"?
outputVariable="NCName"?
isSkipable="xsd:boolean"?
standard-attributes>
standard-elements
( <htd:task>...</htd:task>
| <b4p:localTask>...</b4p:localTask>
| <b4p:remoteTask>...</b4p:remoteTask>
| <htd:notification>...</htd:notification>
| <b4p:localNotification>...</b4p:localNotification>
| <b4p:remoteNotification>...</b4p:remoteNotification>
)
<b4p:scheduledActions>?
...
</b4p:scheduledActions>
<bpel:toParts>?
<bpel:toPart part="NCName" fromVariable="BPELVariableName"/>+
</bpel:toParts>
<bpel:fromPart part="NCName" toVariable="BPELVariableName"/>+
<bpel:fromPart>?

</bpel:fromParts>
<b4p:attachmentPropagation fromProcess="all|none"
toProcess="all|newOnly|none"/>?
</b4p:peopleActivity>

Summary

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.


Further resources on this subject:


WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g Define, model, implement, and monitor real-world BPEL business processes with SOA powered BPM for Oracle SOA Suite with this book and eBook
Published: September 2010
eBook Price: $41.99
Book Price: $69.99
See more
Select your format and quantity:

About the Author :


Marcel Krizevnik

Marcel Krizevnik is a researcher at the University of Maribor where he is preparing a Ph.D. in computer and information science. Marcel started his career as a software developer of chemistry information systems. Now, his main research areas are service-oriented architecture and cloud computing. He is also a member of SOA Competency Center and Cloud Computing Center. In the last three years, he has been involved in several SOA technology projects.

Matjaz B. Juric

Matjaz B. Juric holds a PhD in Computer and Information Science. He is a Full Professor at the University of Ljubljana and head of the Cloud Computing and SOA Competence Centre (http://www.soa.si). Matjaz is a Java Champion, IBM Champion, and Oracle ACE Director. He has more than 15 years of work experience. He has authored/co-authored "Do More with SOA Integration, WS-BPEL 2.0 for SOA Composite Applications, Oracle Fusion Middleware Patterns, Business Process Driven SOA using BPMN and BPEL, and Business Process Execution Language for Web Services "(English and French editions). He has also authored/co-authored "BPEL Cookbook: Best Practices for SOA-based integration and composite applications development" (award for best SOA book in 2007 by SOA World Journal), "SOA Approach to Integration, Professional J2EE EAI, Professional EJB, J2EE Design Patterns Applied", and .NET Serialization Handbook. He has published chapters in More Java Gems (Cambridge University Press) and in Technology Supporting Business Solutions (Nova Science Publishers). He has also published in several journals and magazines and presented at conferences. Matjaz has been involved in several large-scale projects. In cooperation with the IBM Java Technology Centre, he worked on performance analysis and optimization of RMI-IIOP, an integral part of the Java platform.

Books From Packt


Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial
Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial

BPEL PM and OSB operational management with Oracle Enterprise Manager 10g Grid Control
BPEL PM and OSB operational management with Oracle Enterprise Manager 10g Grid Control

Service Oriented Architecture: An Integration Blueprint
Service Oriented Architecture: An Integration Blueprint

Oracle Coherence 3.5
Oracle Coherence 3.5

Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial
Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial

Oracle Siebel CRM 8 Installation and Management
Oracle Siebel CRM 8 Installation and Management

Oracle Fusion Middleware Patterns
Oracle Fusion Middleware Patterns

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
h
h
i
1
a
Y
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software