Welcome!

Microservices Expo Authors: Liz McMillan, Flint Brenton, Jason Bloomberg, Elizabeth White, Yeshim Deniz

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
All organizations that did not originate this moment have a pre-existing culture as well as legacy technology and processes that can be more or less amenable to DevOps implementation. That organizational culture is influenced by the personalities and management styles of Executive Management, the wider culture in which the organization is situated, and the personalities of key team members at all levels of the organization. This culture and entrenched interests usually throw a wrench in the work...
Don’t go chasing waterfall … development, that is. According to a recent post by Madison Moore on Medium featuring insights from several software delivery industry leaders, waterfall is – while still popular – not the best way to win in the marketplace. With methodologies like Agile, DevOps and Continuous Delivery becoming ever more prominent over the past 15 years or so, waterfall is old news. Or, is it? Moore cites a recent study by Gartner: “According to Gartner’s IT Key Metrics Data report, ...
Many organizations are now looking to DevOps maturity models to gauge their DevOps adoption and compare their maturity to their peers. However, as enterprise organizations rush to adopt DevOps, moving past experimentation to embrace it at scale, they are in danger of falling into the trap that they have fallen into time and time again. Unfortunately, we've seen this movie before, and we know how it ends: badly.
In his session at Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, presented a success story of an entrepreneur who has both suffered through and benefited from offshore development across multiple businesses: The smart choice, or how to select the right offshore development partner Warning signs, or how to minimize chances of making the wrong choice Collaboration, or how to establish the most effective work processes Budget control, or how to maximize project result...
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, discussed the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker c...
For organizations that have amassed large sums of software complexity, taking a microservices approach is the first step toward DevOps and continuous improvement / development. Integrating system-level analysis with microservices makes it easier to change and add functionality to applications at any time without the increase of risk. Before you start big transformation projects or a cloud migration, make sure these changes won’t take down your entire organization.
Without a clear strategy for cost control and an architecture designed with cloud services in mind, costs and operational performance can quickly get out of control. To avoid multiple architectural redesigns requires extensive thought and planning. Boundary (now part of BMC) launched a new public-facing multi-tenant high resolution monitoring service on Amazon AWS two years ago, facing challenges and learning best practices in the early days of the new service.
You often hear the two titles of "DevOps" and "Immutable Infrastructure" used independently. In his session at DevOps Summit, John Willis, Technical Evangelist for Docker, covered the union between the two topics and why this is important. He provided an overview of Immutable Infrastructure then showed how an Immutable Continuous Delivery pipeline can be applied as a best practice for "DevOps." He ended the session with some interesting case study examples.
Both SaaS vendors and SaaS buyers are going “all-in” to hyperscale IaaS platforms such as AWS, which is disrupting the SaaS value proposition. Why should the enterprise SaaS consumer pay for the SaaS service if their data is resident in adjacent AWS S3 buckets? If both SaaS sellers and buyers are using the same cloud tools, automation and pay-per-transaction model offered by IaaS platforms, then why not host the “shrink-wrapped” software in the customers’ cloud? Further, serverless computing, cl...
"We view the cloud not as a specific technology but as a way of doing business and that way of doing business is transforming the way software, infrastructure and services are being delivered to business," explained Matthew Rosen, CEO and Director at Fusion, in this SYS-CON.tv interview at 18th Cloud Expo (http://www.CloudComputingExpo.com), held June 7-9 at the Javits Center in New York City, NY.
Without lifecycle traceability and visibility across the tool chain, stakeholders from Planning-to-Ops have limited insight and answers to who, what, when, why and how across the DevOps lifecycle. This impacts the ability to deliver high quality software at the needed velocity to drive positive business outcomes. In his general session at @DevOpsSummit at 19th Cloud Expo, Eric Robertson, General Manager at CollabNet, will discuss how customers are able to achieve a level of transparency that e...
We all know that end users experience the internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices - not doing so will be a path to eventual ...
"DivvyCloud as a company set out to help customers automate solutions to the most common cloud problems," noted Jeremy Snyder, VP of Business Development at DivvyCloud, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
We all know that end users experience the Internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices – not doing so will be a path to eventual b...
"This all sounds great. But it's just not realistic." This is what a group of five senior IT executives told me during a workshop I held not long ago. We were working through an exercise on the organizational characteristics necessary to successfully execute a digital transformation, and the group was doing their ‘readout.' The executives loved everything we discussed and agreed that if such an environment existed, it would make transformation much easier. They just didn't believe it was reali...
"Opsani helps the enterprise adopt containers, help them move their infrastructure into this modern world of DevOps, accelerate the delivery of new features into production, and really get them going on the container path," explained Ross Schibler, CEO of Opsani, and Peter Nickolov, CTO of Opsani, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
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 a lot of 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 reduction in cost ...
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
"I focus on what we are calling CAST Highlight, which is our SaaS application portfolio analysis tool. It is an extremely lightweight tool that can integrate with pretty much any build process right now," explained Andrew Siegmund, Application Migration Specialist for CAST, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Archi...