UML Activity Diagram With Swimlanes in draw.io (Fork and Join)
A UML activity diagram with swimlanes shows each action, who does it, and which work runs at the same time. Learn how to draw one for free in draw.io: lanes for each team, the start dot, actions, a fork and a join bar, and the final node, using an online shop order.
Step by step
Work that runs together
- Activity diagrams. An activity diagram shows the flow of work. Swimlanes show who does each action, and the fork and join bars show work that runs at the same time. Here's the order flow we'll build.
- Blank diagram. Start a blank diagram in draw.io. I've already turned on the UML two point five shapes under more shapes.
Lanes
- Lanes. Open the Advanced shapes and drag in a horizontal pool with three lanes. Make it wider, then name it and each lane. Sales, finance and warehouse.
Start and fork
- Start dot. Every activity starts with a solid black dot, the initial node. Drop it in the sales lane, where the order comes in.
- Fork. Now the fork. It's a thick black bar. One flow goes in, and two flows come out that run at the same time. Hover over the dot and drag the blue arrow onto the bar.
Actions in lanes
- Actions. Actions are rounded boxes, named verb plus noun. Finance takes the payment, so drop it in the finance lane. Connect the fork to it. The line crosses into another lane, so the work changes hands. At the same time, the warehouse packs the items. Add that action in the warehouse lane, under the fork.
- Fork. Connect the fork down to pack items too. Two arrows leave the fork, so both actions start together.
Join and finish
- Join. Next, the join. It's the same bar, but now two flows come in and one goes out. Put it in the warehouse lane, under take payment. Connect take payment down to the join. The bar is thin, so this time select pack items, hold control and click the join, then click the arrow line in the general shapes. The join waits until both are finished, so no order ships before it's paid.
- Final node. The activity ends with the final node, a dot inside a ring. Drop it after the join. Connect the join to it. Only now is the order done.
- The finished activity. Click away to see the whole activity. Three lanes, one fork, one join, and every action sits in the lane of who does it.
Recap
- The rules. So, start with the black dot, put each action in the lane of who does it, open parallel work with a fork, and close it with a join. A yes or no choice would be a diamond, just like in a flowchart.