Business Process Driven SOA using BPMN and BPEL From Business Process Modeling to Orchestration and Service Oriented Architecture Matjaz B. Juric Kapil Pant BIRMINGHAM - MUMBAI Business Process Driven SOA using BPMN and BPEL Copyright © 2008 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: August 2008 Production Reference: 1220808 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-84719-146-5 www.packtpub.com Cover Image by Vinayak Chittar ([email protected]) [ FM-2 ] Credits Authors Project Manager Matjaz B. Juric Abhijeet Deobhakta Kapil Pant Project Coordinator Reviewer Patricia Weir Frank Jennings Indexer Senior Acquisition Editor Monica Ajmera Louay Fatoohi Proofreader Development Editor Dirk Manuel Nikhil Bangera Production Coordinator Technical Editor Rajni Thorat Aanchal A. Kumar Cover Work Copy Editor Rajni Thorat Sumathi Sridhar Editorial Team Leader Akshara Aware [ FM-3 ] Foreword More and more organizations are turning to Business Process Management in their quest for practical ways to create new business value and to streamline their operations, and to ultimately become flexible, responsive and efficient organizations. For the last 30 years, the business world has become more process aware, and BPM has come a long way since initial iterations that relied heavily on static flowcharts to map out corporate processes in mostly unchanging organizations. Today, BPM has become a discipline in its own right. It applies sophisticated software and best practices to model, simulate, automate, manage, and monitor processes, in order to coordinate operations with dynamic business priorities. This has given rise to unprecedented process flexibility and scalability, wherein workflows (both human and automated) are determined in real-time by events and/or outcomes within the process, and effective knowledge transfer is made possible as processes become well-documented business artifacts on which employees can be trained. The introduction of an independent process tier represents BPM's first major contribution to business computing. It puts the management of business logic in the hands of business managers, without threatening the integrity of the application logic. To enjoy the full benefits of BPM, processes must integrate with existing applications and systems. They require access to the functions that are locked in application silos. Today's IT organization is complex, consisting of many different applications and systems built using heterogeneous technologies, on various types of middleware, using multiple databases and running on many platforms. Hard-coding point-to-point integration with these applications is not a good solution as it creates tight coupling with the application and makes the process brittle and inflexibleThis can make the processes expensive to change and may therefore defeat the entire purpose of BPM. [ FM-4 ] This is where Service Oriented Architecture (SOA) comes in. It provides the technical ability to create that process independence. The goal of SOA is to expose an organization's IT assets as re-usable services that can communicate and integrate more readily. SOA's aim is to provide a common communication framework to organize and describe the capabilities, usage policies and service provider locations without exposing the implementation details. It allows organizations to plug in new services or upgrade existing services in a granular fashion in order to address new business requirements, while providing the possibility of making the services consumable across different channels, and at the same time enabling existing legacy applications as services. The goal is to eliminate the integration headache common to many organizations today, while leveraging existing IT investments. BPM and SOA are a natural match —together they facilitate the next phase of business process automation, deriving higher value from services. Business automation will no longer be about hard coding a function that is to be repeated infinitely. Today, business automation through BPM and SOA is all about creating services that are re-usable in many different ways, in multiple processes that can be continually improved. Through this synergy, organizations will achieve better business and IT results than were ever possible through either discipline alone. This book provides adequate coverage of BPM in the context of SOA, as well as a pragmatic approach to carrying out the analysis, execution and monitoring of business processes from end-to-end, using Business Process Modeling Notation (BPMN), and the automatic mapping of BPMN to the Business Process Execution Language (BPEL) for executing business processes in SOA. Geoffroy de Lamalle Business Development Manager, SOA—Europe, Middle East & Africa, IDS Scheer AG [ FM-5 ] About the Authors Matjaz B. Juric holds a Ph.D. in computer and information science. He is Associate Professor at the University of Maribor and the director of Science Park project. In addition to this book, he has authored or coauthored SOA Approach to Integration, Business Process Execution Language for Web Services (English and French editions), BPEL Cookbook: Best Practices for SOA-based integration and composite applications development, 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 articles in journals and magazines, such as SOA World Journal, Web Services Journal, Java Developer's Journal, Java Report, Java World, eai Journal, theserverside.com, OTN, ACM journals, and has presented at conferences such as OOPSLA, Java Development, XML Europe, OOW, SCI, and others. He is a reviewer, program committee member, and conference organizer. Matjaz has been involved in several large-scale projects. He has been a consultant for several large companies on SOA 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. Matjaz is also a member of the BPEL Advisory Board. Matjaz is the chair of SOA Competency Centre, and the author of courses and consultant for the BPEL and SOA consulting company BPELmentor.com. For more information, please visit http://www.bpelmentor.com/ My efforts in this book are dedicated to my family. Special thanks to my dear beautiful Ana. Thanks to my friends at Packt Publishing and University of Maribor and to Ales Frece. [ FM-6 ] Kapil Pant is an accomplished BPM consultant and Public speaker with extensive experience in Products and Professional Services consulting. He currently manages Wipro Technologies' BPM/SOA practice in Europe, and leads consulting engagements including Business Process Improvement workshops, BPMS and SOA Tools Study and Recommendations, and BPM Architecture, Implementation and Governance. Over the years, Kapil has been extensively involved in conducting successful workshops on Process Improvement, Requirements Analysis, BPM/SOA and Enterprise Architecture for clients in Telecom, Banking, Securities and Insurance industry verticals. He has also worked closely with leading System Integrators such as Wipro, Tata Consulting, HCL and Satyam to conduct technology enablement programs for client projects across industry verticals. As a recognized Public Speaker, Kapil is known for his well-researched programs delivered in his high-energy, enthusiastic, and down-to-earth style. He has presented keynote speeches, workshops, seminars, and over 40 road-shows across the Asia Pacific, Europe and the USA. He was also nominated by the Government of India to lead seminars as a part of a 25-member working committee for E-Governance Enterprise Architecture and Standards Taxonomy. He has a Masters Degree in Computer Applications, a Bachelors Degree in Business Studies, and a TOGAF Certification. Kapil presently lives in Hampshire, UK with his wife and enjoys blogging in his free time. I would like to express my thanks to my colleagues in Wipro Technologies, specifically my senior colleagues Gopalakrishna Byllahalli and Gunendra Patil for their firm support, guidance and encouragement. Ashish Sharma for his technical understanding and help with some of the key sections in the book. Louay Fatoohi and Patricia Weir from Packt Publishing for their continued support, patience and understanding during the course of this project. Finally, I am grateful to my parents and grandmother for their blessings and my wife Ekta for her constant encouragement and critical advice without which this book would not have been possible. [ FM-7 ] About the Reviewer Frank Jennings works in the Information Products Group of Sun Microsystems Inc. He has more than 9 years of experience in Java, SOA and System Design. He is an Electronics Engineer from Madras University and has worked for several open-source projects. Frank has written regular columns for leading Java journals including Java Developer's Journal and Linux Developer's Week. Frank is also the co-author of the book SOA Approach to Integration focusing on SOA design pattern for enterprises. Frank also is involved in technical publications for Sun Microsystems in the fields of Solaris and Developer AMP Stack. His blog can be read at http://blogs.sun.com/ phantom and he can be reached at [email protected]. He also holds a Post Graduate Diploma in Computer Science and an Advance Diploma in Computer Integrated Management from University of Indianapolis [ FM-8 ] Table of Contents Preface 1 Chapter 1: SOA and Business Processes 5 Why Care about Business Processes? 7 Examples of Business Processes 8 How Business Processes Emerge 11 How Business Processes and IT Relate 12 IT Flexibility 13 Heterogeneous Architecture 14 Traditional Software Lifecycles 16 Why Do We Need SOA? 16 Why Should We Believe This? 17 SOA Approach to Business Processes 19 Major Improvements in the SOA Approach 21 Focus on Content, Not Technology 24 Management Support 25 SOA Competency Centre 26 SOA Inception 26 SOA Forces 28 Value of SOA for IT Departments 29 Changes in the Development Approach 30 Reduced Complexity 32 Technical Introduction to SOA 32 BPMN 34 BPEL 34 Features 36 Services 36 Service Interfaces 38 Messages 38 Synchronicity 38 Loose Coupling 39