Microservices Expo Authors: Elizabeth White, Mehdi Daoudi, Pat Romanski, Flint Brenton, Gordon Haff

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
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,
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
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...
"We started a Master of Science in business analytics - that's the hot topic. We serve the business community around San Francisco so we educate the working professionals and this is where they all want to be," explained Judy Lee, Associate Professor and Department Chair at Golden Gate University, 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.
For over a decade, Application Programming Interface or APIs have been used to exchange data between multiple platforms. From social media to news and media sites, most websites depend on APIs to provide a dynamic and real-time digital experience. APIs have made its way into almost every device and service available today and it continues to spur innovations in every field of technology. There are multiple programming languages used to build and run applications in the online world. And just li...
There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...
The general concepts of DevOps have played a central role advancing the modern software delivery industry. With the library of DevOps best practices, tips and guides expanding quickly, it can be difficult to track down the best and most accurate resources and information. In order to help the software development community, and to further our own learning, we reached out to leading industry analysts and asked them about an increasingly popular tenet of a DevOps transformation: collaboration.
We call it DevOps but much of the time there’s a lot more discussion about the needs and concerns of developers than there is about other groups. There’s a focus on improved and less isolated developer workflows. There are many discussions around collaboration, continuous integration and delivery, issue tracking, source code control, code review, IDEs, and xPaaS – and all the tools that enable those things. Changes in developer practices may come up – such as developers taking ownership of code ...
Cloud Governance means many things to many people. Heck, just the word cloud means different things depending on who you are talking to. While definitions can vary, controlling access to cloud resources is invariably a central piece of any governance program. Enterprise cloud computing has transformed IT. Cloud computing decreases time-to-market, improves agility by allowing businesses to adapt quickly to changing market demands, and, ultimately, drives down costs.
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
How is DevOps going within your organization? If you need some help measuring just how well it is going, we have prepared a list of some key DevOps metrics to track. These metrics can help you understand how your team is doing over time. The word DevOps means different things to different people. Some say it a culture and every vendor in the industry claims that their tools help with DevOps. Depending on how you define DevOps, some of these metrics may matter more or less to you and your team.
"CA has been doing a lot of things in the area of DevOps. Now we have a complete set of tool sets in order to enable customers to go all the way from planning to development to testing down to release into the operations," explained Aruna Ravichandran, Vice President of Global Marketing and Strategy at CA Technologies, 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.
"We are an integrator of carrier ethernet and bandwidth to get people to connect to the cloud, to the SaaS providers, and the IaaS providers all on ethernet," explained Paul Mako, CEO & CTO of Massive Networks, 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.
"Grape Up leverages Cloud Native technologies and helps companies build software using microservices, and work the DevOps agile way. We've been doing digital innovation for the last 12 years," explained Daniel Heckman, of Grape Up 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.
"NetApp's vision is how we help organizations manage data - delivering the right data in the right place, in the right time, to the people who need it, and doing it agnostic to what the platform is," explained Josh Atwell, Developer Advocate for NetApp, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"Outscale was founded in 2010, is based in France, is a strategic partner to Dassault Systémes and has done quite a bit of work with divisions of Dassault," explained Jackie Funk, Digital Marketing exec at Outscale, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"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.
Let's do a visualization exercise. Imagine it's December 31, 2018, and you're ringing in the New Year with your friends and family. You think back on everything that you accomplished in the last year: your company's revenue is through the roof thanks to the success of your product, and you were promoted to Lead Developer. 2019 is poised to be an even bigger year for your company because you have the tools and insight to scale as quickly as demand requires. You're a happy human, and it's not just...
The enterprise data storage marketplace is poised to become a battlefield. No longer the quiet backwater of cloud computing services, the focus of this global transition is now going from compute to storage. An overview of recent storage market history is needed to understand why this transition is important. Before 2007 and the birth of the cloud computing market we are witnessing today, the on-premise model hosted in large local data centers dominated enterprise storage. Key marketplace play...
Cavirin Systems has just announced C2, a SaaS offering designed to bring continuous security assessment and remediation to hybrid environments, containers, and data centers. Cavirin C2 is deployed within Amazon Web Services (AWS) and features a flexible licensing model for easy scalability and clear pay-as-you-go pricing. Although native to AWS, it also supports assessment and remediation of virtual or container instances within Microsoft Azure, Google Cloud Platform (GCP), or on-premise. By dr...
With continuous delivery (CD) almost always in the spotlight, continuous integration (CI) is often left out in the cold. Indeed, it's been in use for so long and so widely, we often take the model for granted. So what is CI and how can you make the most of it? This blog is intended to answer those questions. Before we step into examining CI, we need to look back. Software developers often work in small teams and modularity, and need to integrate their changes with the rest of the project code b...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...