I mentioned in a previous post I had created a tool that converts BPMN diagrams from Visio Premium 2010 to BPMN 2.0-compliant XML. It was an interesting project because Visio itself does not internally “understand” the structure of a BPMN model. Sure, it can test many of the rules in the BPMN spec, but that is by testing relationships between the shapes in the diagram. A BPMN structural element that has no shape – such as a process or a collaboration – has no associated Visio object to manipulate. At the same time, if a pool is replicated on multiple pages of a hierarchical model, Visio contains multiple pool objects that must be combined into a single participant element in the XML. So mapping Visio Premium to BPMN 2.0 XML is tricky… but it can be done.
A fundamental principle of BPMN2.0 should be that there is one and only one way to serialize a properly constructed model. Excluding (for the moment) imported components, a single multipage Visio file equates to one BPMN model. In the XML, that means it all sits underneath a single definitions root. So… here is a question for you… if you have a multipage Visio file, how many collaboration, participant, and process elements does it contain? Visio itself cannot tell you. But you can deduce it from the shape information, assuming the model follows certain conventions.
Most of the conventions relate to hierarchical modeling, in which a collapsed subprocess on one page of the model is expanded on a separate hyperlinked page. Visio Premium 2010 supports this via the Process/CreateNew menu pick on a selected subprocess shape. (There is also a Process/LinkToExisting function, but I haven’t played with it yet.) The conventions I apply to Visio Premium are, by and large, the same as I apply to structure-aware BPMN tools like Process Modeler for Visio from itp commerce. Here they are:
- A page that is the target of a Process/CreateNew hyperlink is, by definition, a child-level page. A page that is not a child-level page is, by definition, a top-level page.
- Each top-level page in a model that contains a visible pool shape defines a collaboration element in the XML.
- Each pool (visible or invisible) in a top-level page defines a participant in the collaboration. (Only one pool may be invisible, and it cannot be an empty – or “black box” – pool.)
- Each non-empty pool on a top-level page defines a process element in the XML. A top-level page may depict any number of processes, but only one can have an invisible pool.
- A child-level page can contain elements of at most one process.
- A child-level page can contain any number of black box pools, but there must be a corresponding pool (i.e., with the same name) on the top-level page. In other words, additional participants cannot be introduced on a child-level page.
- If the process elements on a child-level page are enclosed in a visible pool shape, the pool must have the same name as the corresponding process pool on the top-level page.
Lanes are especially tricky in Visio Premium 2010, because pools and lanes share a common shape in the stencil. That is unfortunate since they mean very different things in BPMN. Adding to the fun, the first instance of this shape on a page creates multiple Visio objects, including the CFF Container object (what BPMN calls the pool) and the Pool/Lane object (what BPMN calls the lane). When you add a second instance alongside, Visio automatically encloses them in a container shape. In that case, the CFF Container shape in the diagram refers to the enclosing container, and the Pool/Lane shapes become the lanes. As a result…
- Although it is allowed by BPMN, Visio Premium does not let you draw lanes without an enclosing pool.
- If you draw a pool with no lanes, Visio creates a default lane for the pool. The name you type in the pool header is actually the lane name in Visio; the pool name is some default like ‘Title’ and is hidden. If the pool is non-empty, I assign the pool and the lane the same name in the BPMN XML, which by convention is the name of the process. In the XML, the lane is placed inside a laneset.
- If the pool is empty, the default lane is excluded from the XML. A black box pool has no lanes, by definition.
- Lanes in a child level page generate another laneset in the associated subprocess. The lanes defined in that laneset are independent of the lanes in the parent-level page.
- While BPMN 2.0 allows nested sublanes, i.e. child lanesets of a lane, those child lanes must be drawn on the same page as the parent. Visio does not support this.
Data objects and associations are also tricky. In BPMN 1.2, these were artifacts. Most often the data object is drawn with a non-directional association to a sequence flow. In BPMN 2.0, data objects were upgraded to first-class semantic elements representing process variables, with dataAssociations representing mappings between those variables and data inputs and outputs of activities and events.
Furthermore, in BPMN 2.0 a non-directional association to a sequence flow is considered a visual shortcut, standing for a directional association from the sequence flow’s source node to the data object and another one from the data object to the sequence flow’s target node. In any case, Visio Premium cannot create a locked connection between an association and a sequence flow – i.e. the lines may look connected but they are really not. The upshot is that associating a data object with a sequence flow – the most common representation of data flow – is not supported by Visio Premium (in an exportable way). However, explicit data flow using directional associations from source node to data object to target node – the “right” way in BPMN 2.0 – works properly in Visio. Even though that representation is unfamiliar to most modelers today, it is the only way to draw BPMN-exportable data flow in Visio Premium.
Figure 1. Top-level page
Figure 2. Child-level page – expansion of Sub1.
The two-page model above, which contains the elements of the BPMN 2.0 analytic class supported in the Visio Premium palette, is automatically mapped by my tool to schema-valid BPMN 2.0 XML. If you are interested, the .vsd and mapped .bpmn files are here.
Bruce,
Your schema seems to achieved the impossible, hats off to you.
I would be curious to know, if you have taken any existing processes from both BPMN 2.0 and Visio Premium 2010 and converted them from one to another to test the validity of the results? If not, such test results would help in future discussions.
Thanks
Bala,
I am not sure I understand the validity test you suggest. Please explain.
Bruce,
Do you think that this lack of functionality within Visio will prompt for updates that will handle this better in the future?
Thanks!
Joe
I wouldn’t call it lack of functionality. For the kind of non-executable modeling typically done by process analysts, the difference between BPMN 1.2 and 2.0 is minimal. The absence of non-interrupting events is the most serious, and you could work around that with a naming convention. I found out that you can add connection points to sequence flows, so it should be possible to reliably connect a dataAssociation to it.
But in answer to your question, I expect that any changes would wait until “SP1”, probably a year out at least. Whether they would just tweak the BPMN 1.2 or go to BPMN 2.0 is anyone’s guess… I think driven by customer feedback in the next few months.
I’m using Visio professional 2010.. find it very useful for for complex diagramming needs. Would like to work on premium edition 🙂 equipped with all the advanced features. This was really informative post for a newbie like me. Would like to share training videos of BPMN using visio 2010 available at visio toolbox. Keep posting. Thanks.
Do you have an add-in for Visio 2010 that has all the functionality of your add-in for Visio 2007?
Hi Bill,
I’m a little confused by the question. The itp commerce tool is an add-in, and it works with Visio 2010 as well as 2007 (although there may be issues with 64-bit version of 2010, not sure). My Method and Style validation tool is not really an add-in, but an external service. You model on desktop (using either itp or Visio Premium) and export to xml. Then in my service you can upload the xml export and it provides the validation report as html page.
–Bruce
Can you explain the rationale for some of the rules? Specifically, what’s the problem with using a message flow to connect a decision or activity in one pool with an activity in another pool? We finally figured out how to remove the error, but it complicates the diagram. What am I missing?
Connie,
A message flow cannot connect to a gateway. That is just part of the BPMN metamodel, i.e. the structure defined by OMG. A gateway is not a message-aware element. A gateway is just routing logic; it does not take actions like “making” a decision (it can “test” a decision) or sending a message. You can use a message flow to connect an activity in one pool with an activity in another pool. I hope I didn’t say you could not.
–Bruce
Bruce,
My question stemmed from trying to resolve issues using Visio 2010. Even when we used a message flow from an activity to an event in another pool, we received the error that an activity must have at least one outgoing sequence flow. It seemed that we had to have both a message flow to the other pool and a sequence flow within the first pool. That seems to me to add unnecessary lines and complexity to the diagram. Scenario: activity 1 in pool 1 uses message flow to activity 2 in pool 2, which sequences to activity 3 in pool 2, then message flows up to activity 4 in pool 1. I’m not getting why we need the extra sequence flow from activity 1 to activity 4. (This surely illustrates the need for a diagram instead of words!)
Thanks.
Connie,
Are you talking about Visio’s built-in Check Diagram or my tool? Maybe this relates to a note I got from Steve White a few days ago re my rule BPMN 0101 and 0102, which says that implicit start and end nodes are not allowed if there are any real start and end events in the process level. That was in fact the rule from OMG in BPMN 1.x and up to the end of FTF in BPMN 2.0. But Steve tells me it got changed at the end of FTF, and so implicit start and end nodes are allowed now.
I told him I would change it to a style rule, because I still think it’s bad practice… and unfortunately, your example kind of proves it (at least as I imagine your diagram — maybe email me a copy). The reason is that without an incoming sequence flow, your activity 4 in pool 1 is an implicit start node of process 1. That means it starts concurrently with activity 1… which it does not. The part of BPMN that is hard for some modelers to catch on to is that a BPMN process is an “orchestration”, a continuous chain of sequence flows from some initial state (start event) to some final state (end event or events). So whatever tool is telling you (mine or Microsoft’s) that you need sequence flow from activity 1 to activity 4 is correct. And it shows why OMG’s caving on this rule was probably a mistake.
[…] the rule has gone away. Too bad, as it leads to diagram errors — see Connie’s comment here – so I am going to keep those rules but change to “style […]
Bruce,
Thanks so much for the explanation. I had thought the connection from Activity 1 to Activity 4 was satisfied by the message flow down and back from the second pool. It appears those are side-trips, or data providers, and the actual sequence in pool 1 must be retained by sequence flows. I’m still not sure I know the “why”. It appears to be in support of the next step – conversion to XML or some other approach.
It was Visio 2010 that gave us the issues. I don’t have the diagrams here, but I may send you a copy of a more complex one that illustrates the potential profusion of lines if I enforce the rule to provide incoming and outgoing sequence flows for each activity within a pool.
Thanks again for your patience and information!
Connie
It’s not about the XML. The XML is just the storage format. It’s about what things like “process” and “pool” and “sequence flow” actually mean in BPMN. I think I need to post about this topic again. BPMN 2.0 had an opportunity to remove the confusion but the team stubbornly refused to do so. (I gave up after months of trying.) Anyway, I will take it up again on a new post.
[…] the same thing many long-time flowcharters think it means, as evidenced in a recent comment thread here. Blame for this lies mainly with the BPMN spec itself, which adds to its sins of omission by […]
Hi Bruce,
Would you be willing to post your BMPN 2.0 Visio Stencil/Plugin?
It is not a plugin or stencil. It is an xslt transform of a BPMN model created using Microsoft Visio Premium 2010’s BPMN stencil.
Hi Bruce,
Could please you send me the tool which converts .vsd file to .bpmn
Thanks in Advance
Hi Bruce,
Did you see the Visio 2013 preview? It looks like it includes BPMN 2.0 and exports to an Open XML fileformat, which is still not BPMN 2.0 XML. However parsing this XML, surely when the Visio 2013 SDK will be out must be much easier to implement.
It also includes a BPMN 2.0 rule engine (based on 76 rules) which still looks a bit buggy, but the rules file is also an XML, so it is possible to enhance that also.
I took a glance at the preview. Looks like it supports the shapes. Completely changed the vdx format. The internal validation engine (which was in 2010) needed a serious upgrade to its function library to do style rule validation, but I haven’t checked it out yet. I’ll get to this tool later this year.
Hi Bruce,
My question is a bit off the current thread discussion, but it relates to the heading, therefore I’ll try anyway 🙂
Is there a way to use the Visio 2010 Professional BPMN Stencils in Visio 2007? I know, there will be no way to use validation or any other features, that are implemented code-wise in 2010. Nevertheless, we are restricted to 2007 (at least for now) and would still like to use some of the “future features”. 3rd party stencils are not an option since we would have to migrate once Visio 2010 or 2013 comes into our company.
thx
greg.
If you just want to draw the shapes, I think it should work, assuming you have the stencils. The context-menu functions probably depend on the template not the stencils, and those in turn have some dependency on Visio Premium 2010. But try it.
Would it also work on Visio 2007?
@Kenneth,
No. Just Visio 2010 Premium. Visio 2013 Pro has something similar for BPMN 2.0, but the file format has changed, so my tools don’t work with that yet.