| By Michael Havey | Article Rating: |
|
| May 25, 2005 04:00 PM EDT | Reads: |
34,152 |
Some elementary rules of Petri net design are:
- An arc can connect a place to a transition, or a transition to a place, but never a place to a place, or a transition to a transition. Thus, the order of places and transitions alternates on a given path: place->transition->place->transition->place, and so on.
- A path should begin and end with a place.
- Place and transition are many-to-many. A place can branch into multiple transitions. Multiple places can join into a single transition. A transition can branch into multiple places. Multiple transitions can converge into a single place.
- Tokens belong in places. A transition cannot contain a token.
Rules of execution include the following: - A transition is enabled (i.e., capable of firing) if each input place (i.e., each place that links to it) has at least one token.
- When a transition fires, it consumes a token from each input place and generates a token for each output place (i.e., each place that the place links to).
The Petri net starts at the New place. When the Send For Vote transition fires, the net branches into three paths: two for acceptance, one for rejection. In the acceptance paths, the place Accepting links into the transition Accept, whose output place is Accepted; in effect, when Accept fires, a token is passed from Accepting to Accepted. The rejection path is similar: the transition Reject moves a token from the place Rejecting to the place Rejected. The two acceptance paths converge in the transition Send Accept Notice. Similarly, in the rejection path, the place Rejected links to the transition Send Reject Notice. Each of the "send notice" transitions links to the output place Done, the final step in the process. The curiously named place Mutex, an input to "send notice" transitions, is discussed below.
The behavior of the voting process is best understood by following the path of tokens through the net. Step (a) shows the initial placement: one token in New and one in Mutex. The shading of the transition Send For Vote indicates that it is enabled; it is enabled because its one input place, New, has a token. When Send For Vote fires, the token is removed from New and tokens are generated in the Rejecting and Accepting places, thus enabling the transitions Accept and Reject, as shown in step (b). Step (c) depicts the state of the net after one acceptance and one rejection. The token from the uppermost Accepting has now moved to Accepted; likewise Rejecting has now transitioned to Rejected. Of the two "send notice" transitions, only Send Reject Notice is enabled, because both of its input places - Rejected and Mutex - have a token. When Send Reject Notice fires in step (d), the tokens from Rejected and Mutex disappear and a token is moved into Done.
Exemplifying the powerful synchronization capabilities of Petri nets is the Mutex ("mutual exclusion") place, which ensures that only one notice - an acceptance or a rejection - is sent to the author. Mutex is an input place to both the Send Accept Notice and Send Reject Notice transitions, and hence neither of these transitions can fire unless Mutex has a token. However in the initial token placement, Mutex has exactly one token. If two acceptances and one rejection occur at roughly the same time, both Send Accept Notice and Send Reject Notice will contend for that token. But when one transition fires, it will consume the token, immediately disabling the other transition, thereby preventing it from firing.
Petri Nets and Dead-Path Elimination
A mountain of academic papers has been written about the use of Petri nets to model process control flow. "Fundamentals of Control Flow in Workflows" (see References below), for example, develops precise Petri net implementations of common process patterns such as AND and XOR splits and joins, as well the thornier "dead-path elimination," considered in this section.
Dead-path elimination is a technique used in languages such as BPEL and WSFL to bypass, or "pass through" activities whose preconditions are not met. For example, in part (a) of Figure 6, the activity Buy New Home waits for the parallel activities Sell Home and Get Mortgage to complete, and it executes only if both have a true result. If at least one is false, the execution of Buy New Home is skipped (i.e., don't buy a new home without financing and the sale of your old home), as is the execution of the successor activity Hire Movers (i.e., don't call movers if you aren't moving).
Part (b) shows the Petri net representation. Two crucial constructs used in this example are:
- Color: The ability of a transition to branch to one of several places depending on the value of the token. In our case, the ability to follow different paths depending on whether "Sell Home" and "Get Mortgage" succeed or fail.
- Lambda Transition: A transition that is strictly internal, used merely to drive control flow. A lambda transition fires immediately once it is enabled. In our case, lambda transitions are used to pass through the "dead path."
Petri Nets and BPM Standards
Of the major BPM standards, three - BPEL, WSFL, and BPMN - have roots in Petri nets. Each standard uses the notion of token passing to describe the semantics of control flow. The BPMN specification uses the token concept throughout. In WSFL and BPEL, the most striking Petri net-inspired discussion is "dead-path elimination."
Summary
For the BPM practitioner, theory, in the form of the Pi Calculus and the Petri net, actually matters! Why? First, because theory is mentioned so frequently in practical discussion of BPM, it is unavoidable: practitioners need to understand what the hype is all about. Second, theory injects much-needed rigor into a relatively immature BPM: Pi Calculus formalizes system interactions; Petri nets demonstrate precise control flow.
References
Published May 25, 2005 Reads 34,152
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
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.
- The Top 150 Players in Cloud Computing
- Commercial vs Federal Cloud Computing
- Why IBM’s Server Chief Got Busted
- Industry Experts Discuss the State of Cloud Computing
- Cloud Expo New York Call for Papers Deadline December 15
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- US Federal Government is Major Cloud Computing Innovator
- Google Wave
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Adaptivity & Cloud Computing: Exclusive Q&A with CEO Tony Bishop
- 4th International Cloud Expo: Photo Album
- The Top 150 Players in Cloud Computing
- SYS-CON.TV: Cloud Computing Expo Power Panel
- Commercial vs Federal Cloud Computing
- Why IBM’s Server Chief Got Busted
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Industry Experts Discuss the State of Cloud Computing
- SOA World Power Panel on SYS-CON.TV
- CIA was Headed to an Enterprise Cloud All Along: Jill Tummler Singer
- 1st Annual Government IT Conference & Expo: Themes & Topics
- Cloud Expo New York Call for Papers Deadline December 15
- Stock in Focus: Dragon Capital
- The i-Technology Right Stuff
- Who Are The All-Time Heroes of i-Technology?
- Get the Message
- Where Are RIA Technologies Headed in 2008?
- i-Technology Viewpoint: Is Web 2.0 the Global SOA?
- i-Technology Viewpoint: Thinking Outside the VC Box
- ESB Myth Busters: 10 Enterprise Service Bus Myths Debunked
- i-Technology Viewpoint: When to Leave Your First IT Job
- SOA Web Services Edge Conference Coverage on SYS-CON.TV
- Five Reasons Why Web 2.0 Matters
- SYS-CON.TV's "SOA Web Services" and "Enterprise Open Source" Programs To Air in December
- SOA World Conference & Expo SYS-CON.TV Power Panel Live From Times Square









There are a variety of applications that supp...

























