活动图
动作(Action)
用(状态名)
表示一个状态,其中(start)
和(end)
分别表示开始状态和结束状态,箭头->
表示状态的转换
![](http://upload-images.jianshu.io/upload_images/46259-3e723bb2cdec264a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)->(Boil Kettle)->(end))
->(Boil Kettle)->(end))
判断和限制(Decisions and Constraints)
使用<判断名>
表示一个条件判断,其后跟[条件]->
表示满足条件后状态的转换,用不同的判断名来标示不同的判断位置
![](http://upload-images.jianshu.io/upload_images/46259-3e723bb2cdec264a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)-><a>[kettle empty]->(Fill kettle)->(Boil kettle),<a>[kettle full]->(Boil kettle)->(end))
-><a>[kettle empty]->(Fill kettle)->(Boil kettle),<a>[kettle full]->(Boil kettle)->(end))
分支合并(Fork/Join)
使用||
表示分支或者合并点
![](http://upload-images.jianshu.io/upload_images/46259-3e723bb2cdec264a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)-><a>[kettle empty]->(Fill kettle)->|b|,<a>[kettle full]->|b|->(Boil kettle)->|c|,|b|->(Add Tea Bag)->(Add Milk)->|c|->(Pour Water)->(end))
-><a>[kettle empty]->(Fill kettle)->|b|,<a>[kettle full]->|b|->(Boil kettle)->|c|,|b|->(Add Tea Bag)->(Add Milk)->|c|->(Pour Water)->(end))
对象(Objects)
符号[]
表示一个对象
![](http://upload-images.jianshu.io/upload_images/46259-3e723bb2cdec264a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)->[Water]->(Fill kettle)->(end))
->[Water]->(Fill kettle)->(end))
连接器名称(Connector Name)
在->
中加入名称,-名称>
表示命名连接器
![](http://upload-images.jianshu.io/upload_images/46259-3e723bb2cdec264a?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)-fill>(Fill kettle)->(end))
-fill>(Fill kettle)->(end))