Linking activity diagram to entities to be accessed

社会主义新天地 提交于 2019-12-10 19:36:42

问题


How do we represent in an Activity Diagram, which entities are to be accessed or updated? Is this is to be done as part of an activity diagram, or to be done separately?


回答1:


You specify which Classes are accessed or updated using Pins on an Action or using an ActivityParameterNode on an Activity. Those Pins look like little squares on the periphery of the Action, or rectangles on the diagram frame of an Activity, and you connect OutputPins to InputPins using ObjectFlows (which unfortunately look just like the ControlFlows that connect Actions together). Here's an example from the UML 2.5 spec:

Now, to answer what I think you are really asking. I think you want to know how to navigate to instances of Classes in your model. To do that from an Activity, you use a ReadStructuralFeatureAction to read properties from the Class instance that owns the Activity you're specifying. The values flow out of an OutputPin. Using ReadStructuralFeatureActions you can navigate anywhere your instances allow. (Note that when a Property is owned by an Association rather than a Class, you use one of the ReadLink*Actions specializations of Action.)

Please see Part 4 of Conrad Bock's excellent series, UML 2 Activity and Action Models, Part 4: Object Nodes for a better understanding.




回答2:


You can use either

  • a dependency (dashed line) or
  • an object flow (solid line) to show that an action is interacting with an object or
  • an information flow (stereotyped with <<flow>>). This way you can specify one or more classes which control the information that is flowing (in the example it is FileTypeObject).



来源:https://stackoverflow.com/questions/36468356/linking-activity-diagram-to-entities-to-be-accessed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!