Welcome!

Microservices Expo Authors: Aruna Ravichandran, Elizabeth White, Liz McMillan, Pat Romanski, Cameron Van Orman

Related Topics: Microservices Expo

Microservices Expo: Article

BPM Theory for Laymen

Theory matters! The scenic tour of the Pi Calculus and Petri nets for BPM and choreography practitioners

In most software topics, the boundary between theory and practice in software is clearly demarcated: theory is for academics who seldom descend from the ivory tower, practice is for industry professionals who have long forgotten the concepts and application of theory. In concurrency, for example, most developers either know or have programmed semaphores, but few remember the conceptual underpinnings devised by Dijkstra. But Business Process Management (BPM) - a key Web services technology with close ties to Web services choreography - belongs to a rarer category, in which theory informs practical design and theoretical jargon is part of the hype with customers.

Somehow the abstruse terms "Pi Calculus" and "Petri net" - as impressive to the ear as database management's "relational calculus" or capacity planning's "Erlang formulae" - have permeated the consciousness of the BPM community. Many BPM onlookers are familiar with, and are interested in, Pi and Petri, but have at best a vague understanding of them.

This article is a guided tour of the scenic route of BPM theory. The Pi Calculus and the Petri net are studied by example, with just enough detail to give a sense of the BPM connection without overdosing on algebra.

Why Theory Matters
Process theory is practically important for several reasons:

  • Theory is mentioned frequently in connection with BPM, even in nonacademic material. Countless presentations, for example, state without explanation that the leading BPM language, Business Process Execution Language (BPEL), is influenced by the Pi Calculus and Petri nets. For the many practitioners who are intimidated by the pedantic name-dropping but are curious to uncover its meaning (e.g., What is the Pi Calculus? What are Petri nets? Which parts of which theory are used in BPEL? Why is BPEL based on two theories rather than one?), this article helps elucidate the nature of the connection.
  • BPM is relatively immature and benefits from the ideas and rigor of theory. Control flow, for example, is often treated too casually by vendors, who are more likely to emphasize ease of programming than semantic precision. Regrettably, as several papers on process design patterns have demonstrated, most vendors, and even most standards, struggle to support certain common control flow scenarios (e.g., the "multiple instances without runtime knowledge" and "interleaved parallel routing" patterns described in www.workflowpatterns.com). To build successful solutions, practitioners should insist on knowing exactly how a given process will run. To accomplish this, they should choose a good language and understand how the language works. Judged on the basis of control flow, the strongest languages are those based on the Petri net, notably BPEL and Business Process Modeling Notation (BPMN). And, arguably, to understand the nuances of these languages (e.g., dead-path elimination in BPEL) requires an appreciation for the Petri net.
  • Contemporary BPM and its cousin Web Services Choreography are obsessed with the construction of complex participant conversations. Choreography especially, because it is mandated to build global collaborative contracts, requires a conceptual framework that can express dynamic communicating processes precisely and concisely. The leading choreography language, Web Services Choreography Description Language (WS-CDL), bases its constructions (e.g., channel passing) on the Pi Calculus. BPEL is also alleged to have Pi underpinnings. By learning the basics of Pi, the practitioner gains insight into the use of these languages.
Family Tree
As Figure 1 shows, four major contemporary standards - WS-CDL, Web Services Choreography Interface (WSCI), Business Process Modeling Language (BPML), and XLANG - betray Pi Calculus influence, three - BPMN, UML activity diagrams, and Web Services Flow Language (WSFL) - derive from the Petri net, and one - BPEL - is a blend, inheriting traits of Pi and Petri from its parent languages XLANG and WSFL, respectively.

The Pi Calculus
Developed by the Scottish mathematician Robin Milner in the 1990s, the Pi Calculus is a formal language for defining concurrent, communicating processes, including, but not restricted to, business processes. In its detail the Pi Calculus is a rather advanced algebraic system requiring a senior level of mathematical training. Milner's presentation of the subject in his landmark paper "The Polyadic Pi-Calculus: A Tutorial" is written in the mathematical idiom of definitions, theorems, and lemmas, inaccessible to most BPM onlookers. And few business analysts or software developers could survive if required to compose their business processes as lines Pi Calculus code.

However somehow, despite its academic roots and its inherent complexity, the Pi Calculus has become one of BPM's most attention-getting cocktail party terms. Popular BPM literature states boldly that major languages such as BPEL and WS-CDL are based on the Pi Calculus. This stunning level of influence, charges a leading BPM commentator (Wil van der Aalst, in his paper "Pi Calculus versus Petri Nets: Let Us Eat Humble Pie Rather Than Further Inflate the Pi Hype"), is dubious, and surely nothing but hype.

Let the people who advocate BPEL4WS, BPMN, ... and WSCI show the precise relation between the language and some formal foundation. People who cannot do this but still claim strong relationships between their language and e.g., Pi-calculus only cause confusion
("Pi Calculus versus Petri Nets," page 2).

Whether or not it is hype, the Pi Calculus-BPM connection merits a serious look. What, in a nutshell, is the Pi Calculus, how does it apply to BPM, and what is the extent and nature of its influence on contemporary popular languages like BPEL and WS-CDL?

The Pi Calculus in a Nutshell
The Pi Calculus is a language used to define concurrent processes that interact with one another dynamically. Each process consists of one or more actions, which can be arranged sequentially, in parallel or conditional paths, or recursively. An action is either the sending or receiving of information on a channel. According to the Pi-Calculus convention, when one process sends to another, it includes the name of the channel to be used for the other process to respond. This name is variable and, as we will see, can change in response to changing conditions.

One of the most distinctive features of the Pi Calculus is mobility, in which the topology of communicating processes changes dynamically in response to changing conditions. An example of mobility is the enrollment of customers with retailers in a deregulated energy market. In part (a) of Figure 2, customer C initially buys energy directly from the supplier (a "standard supply" arrangement), but in part (b) enrolls with retailer A. In part (c), the customer switches to competing retailer B, but then drops the retailer in part (d), thus returning to standard supply.

The source code to model this scenario is remarkably terse:


1 CustomerSS(enroll,switch,drop,rets)=
2 ?(r:rets). (enroll r,"mike".CustomerR
(r,enroll,switch,drop,rets))
3 CustomerR(r,enroll,switch,drop,rets)=
4 ?(r2:rets).(switch r,r2,"mike".CustomerR(r2,enroll,switch,drop,rets)) +
5 drop r,"mike".CustomerSS(enroll,
switch,drop,rets)
6 Supplier(enroll,switch,drop)=
7 (enroll(r1,c).r1 "addcust",c +
8 switch (r1,r2,c).r1 "dropcust",c.r2 "addcust",c +
9 drop(r1,c).r1 "dropcust",c.Supplier(enroll,switch,drop)
10 Retailer(r)=
11 r(action,c).Retailer(r)
12 Market=
13 (new chEnroll,chSwitch,chDrop,retSet={retA,retB})
14 CustomerSS(chEnroll,chSwitch,chDrop,retSet)|
15 Supplier(chEnroll,chSwitch,chDrop) |
16 Retailer(retA)|Retailer(retB)
The code defines five processes: CustomerSS (lines 1-2), CustomerR (lines 3-5), Supplier (lines 6-9), Retailer (lines 10-11), and Market (lines 12-16). Each process is written as a mathematical equation, with the left side and right side separated by an equals sign ("="). The left side gives the name of the process and the channels it uses to communicate with the other processes; the right side (indented in the code sample above) is the definition.

More Stories By Michael Havey

Michael Havey is a Chordiant consultant with 10 years of industry experience, mostly with application integration. Michael's book Essential Business Process Modeling was published by O'Reilly in August 2005.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@MicroservicesExpo Stories
Digital transformation leaders have poured tons of money and effort into coding in recent years. And with good reason. To succeed at digital, you must be able to write great code. You also have to build a strong Agile culture so your coding efforts tightly align with market signals and business outcomes. But if your investments in testing haven’t kept pace with your investments in coding, you’ll lose. But if your investments in testing haven’t kept pace with your investments in coding, you’ll...
In his session at 21st Cloud Expo, Michael Burley, a Senior Business Development Executive in IT Services at NetApp, will describe how NetApp designed a three-year program of work to migrate 25PB of a major telco's enterprise data to a new STaaS platform, and then secured a long-term contract to manage and operate the platform. This significant program blended the best of NetApp’s solutions and services capabilities to enable this telco’s successful adoption of private cloud storage and launchi...
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native applications. However, sharing a Kubernetes cluster between members of the same team can be challenging. And, sharing clusters across multiple teams is even harder. Kubernetes offers several constructs to help implement segmentation and isolation. However, these primitives can be complex to understand and apply. As a result, it’s becoming common for enterprises to end up with several clusters. Thi...
Containers are rapidly finding their way into enterprise data centers, but change is difficult. How do enterprises transform their architecture with technologies like containers without losing the reliable components of their current solutions? In his session at @DevOpsSummit at 21st Cloud Expo, Tony Campbell, Director, Educational Services at CoreOS, will explore the challenges organizations are facing today as they move to containers and go over how Kubernetes applications can deploy with lega...
Today most companies are adopting or evaluating container technology - Docker in particular - to speed up application deployment, drive down cost, ease management and make application delivery more flexible overall. As with most new architectures, this dream takes significant work to become a reality. Even when you do get your application componentized enough and packaged properly, there are still challenges for DevOps teams to making the shift to continuous delivery and achieving that reducti...
DevOps at Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to w...
Is advanced scheduling in Kubernetes achievable? Yes, however, how do you properly accommodate every real-life scenario that a Kubernetes user might encounter? How do you leverage advanced scheduling techniques to shape and describe each scenario in easy-to-use rules and configurations? In his session at @DevOpsSummit at 21st Cloud Expo, Oleg Chunikhin, CTO at Kublr, will answer these questions and demonstrate techniques for implementing advanced scheduling. For example, using spot instances ...
SYS-CON Events announced today that Cloud Academy has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cloud Academy is the leading technology training platform for enterprise multi-cloud infrastructure. Cloud Academy is trusted by leading companies to deliver continuous learning solutions across Amazon Web Services, Microsoft Azure, Google Cloud Platform, and the most...
The last two years has seen discussions about cloud computing evolve from the public / private / hybrid split to the reality that most enterprises will be creating a complex, multi-cloud strategy. Companies are wary of committing all of their resources to a single cloud, and instead are choosing to spread the risk – and the benefits – of cloud computing across multiple providers and internal infrastructures, as they follow their business needs. Will this approach be successful? How large is the ...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In their Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, and Mark Lav...
Many organizations adopt DevOps to reduce cycle times and deliver software faster; some take on DevOps to drive higher quality and better end-user experience; others look to DevOps for a clearer line-of-sight to customers to drive better business impacts. In truth, these three foundations go together. In this power panel at @DevOpsSummit 21st Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, industry experts will discuss how leading organizations build application success from all...
DevSecOps – a trend around transformation in process, people and technology – is about breaking down silos and waste along the software development lifecycle and using agile methodologies, automation and insights to help get apps to market faster. This leads to higher quality apps, greater trust in organizations, less organizational friction, and ultimately a five-star customer experience. These apps are the new competitive currency in this digital economy and they’re powered by data. Without ...
A common misconception about the cloud is that one size fits all. Companies expecting to run all of their operations using one cloud solution or service must realize that doing so is akin to forcing the totality of their business functionality into a straightjacket. Unlocking the full potential of the cloud means embracing the multi-cloud future where businesses use their own cloud, and/or clouds from different vendors, to support separate functions or product groups. There is no single cloud so...
For most organizations, the move to hybrid cloud is now a question of when, not if. Fully 82% of enterprises plan to have a hybrid cloud strategy this year, according to Infoholic Research. The worldwide hybrid cloud computing market is expected to grow about 34% annually over the next five years, reaching $241.13 billion by 2022. Companies are embracing hybrid cloud because of the many advantages it offers compared to relying on a single provider for all of their cloud needs. Hybrid offers bala...
With the modern notion of digital transformation, enterprises are chipping away at the fundamental organizational and operational structures that have been with us since the nineteenth century or earlier. One remarkable casualty: the business process. Business processes have become so ingrained in how we envision large organizations operating and the roles people play within them that relegating them to the scrap heap is almost unimaginable, and unquestionably transformative. In the Digital ...
These days, APIs have become an integral part of the digital transformation journey for all enterprises. Every digital innovation story is connected to APIs . But have you ever pondered over to know what are the source of these APIs? Let me explain - APIs sources can be varied, internal or external, solving different purposes, but mostly categorized into the following two categories. Data lakes is a term used to represent disconnected but relevant data that are used by various business units wit...
The nature of the technology business is forward-thinking. It focuses on the future and what’s coming next. Innovations and creativity in our world of software development strive to improve the status quo and increase customer satisfaction through speed and increased connectivity. Yet, while it's exciting to see enterprises embrace new ways of thinking and advance their processes with cutting edge technology, it rarely happens rapidly or even simultaneously across all industries.
It has never been a better time to be a developer! Thanks to cloud computing, deploying our applications is much easier than it used to be. How we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Function-as-a-Service. FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual "function", action, or piece of business logic. They are expected to start within milliseconds...
With the rise of DevOps, containers are at the brink of becoming a pervasive technology in Enterprise IT to accelerate application delivery for the business. When it comes to adopting containers in the enterprise, security is the highest adoption barrier. Is your organization ready to address the security risks with containers for your DevOps environment? In his session at @DevOpsSummit at 21st Cloud Expo, Chris Van Tuin, Chief Technologist, NA West at Red Hat, will discuss: The top security r...
Most of the time there is a lot of work involved to move to the cloud, and most of that isn't really related to AWS or Azure or Google Cloud. Before we talk about public cloud vendors and DevOps tools, there are usually several technical and non-technical challenges that are connected to it and that every company needs to solve to move to the cloud. In his session at 21st Cloud Expo, Stefano Bellasio, CEO and founder of Cloud Academy Inc., will discuss what the tools, disciplines, and cultural...