There is a huge list of diagrams that can help you visually model your software programs before you develop them. Plus you can model any and all types of processes (business, manufacturing, sales, etc.) Unified Modelling Language (UML) provides you with a variety of diagramming tools, some to detail information structure, and some to detail behaviour.
It’s easier to see what components will be needed during software development when you create a number of different UML diagrams!
UML activity diagrams
Like use case diagrams, activity diagrams model the behaviour of users and systems as they follow a process. They are a type of flow chart or workflow, but they use slightly different shapes.
- Start/End: Use a black or solid circle to show where the diagram starts, and a solid circle with a ring around it to indicate the end of the process.
- Actions: Use rounded rectangles with the name of the action.
- Decisions: Use diamonds whenever there is a choice. You can either include the decision as a question within the diamond, or indicate the decision outcome on the outgoing arrows instead of simply using yes/no labels.
- Split/Join: Use a thick bar to indicate where activities split or join.
Enable the UML shape library
In draw.io, all the shapes you need for activity diagrams are in the UML shape library. Click More Shapes … at the bottom of the left-hand panel, then enable the UML shape library and click Apply.
Create an activity diagram with draw.io
Use the shapes from the UML shape library to create your activity diagram. In the example below, I’ve created an activity diagram for the users of a habit tracking app. I previously created a use case diagram to get a rough idea of what actions were needed.
Tip: Select a connector then select a shape from the shape library to place it on the drawing area, already connected to the selected connector.
Activity diagrams can get quite complex quickly, so you will need to use line jumps to make your diagrams easier to follow.
UML activity diagram templates in draw.io
There are two activity diagram templates you can use to learn more about how this type of diagram is put together. Use these template diagrams as a starting point for your own diagram. When you create a new diagram, select UML from the left hand panel of the dialog, select one of the two activity diagrams, then click Create.
Tip: If you are unsure, hover your mouse cursor over the template diagrams to see what type of diagrams they are.
What other UML diagrams should you create?
After creating your use case diagrams and activity diagrams, there are additional UML diagrams that you can use to help illustrate your processes and software, and make it easier to program your software. The next step would be a sequence diagram, and then I would recommend working on the structural diagrams – class diagrams, component diagrams, package diagrams, etc.
Personally, I find it’s easier to get the process right first, then look at how the data will be structured!
Want some help?
- Add links to shapes and text so you can link to more detailed diagrams on other pages in your draw.io diagram – this can be important if an activity is composed of multiple steps!
- If you are using Trello, you can use the draw.io Trello Power-Up to quickly and easily collaborate on diagrams with your distributed team.
- Need a basic introduction? Our self-directed training course has many detailed exercises to get you up and running in draw.io quickly.