The UML Modeling feature lets you add to Activity Edges in an Activity diagram.
To add guard conditions to an Activity Edge:
In the Diagram editor, right-click the target Activity Edge and choose Labels > Show Guard Condition.
The guard condition brackets are added to the Activity Edge.
Inside the guard condition brackets, type the expression of the guard condition and press Enter.