How to determine non-human actors of a use case?

与世无争的帅哥 提交于 2020-01-02 08:12:12

问题


I'm just learning about UML and am questioning how to define actors correctly. I know that actors perform role in the system and I don't have a problem determining human actors. My question is how do I decide what non-human, external components are actors on the system.

For example, in a home automation system a homeowner and a system installer would be actors. Would it be correct to name a door sensor or a coffee maker an actor? These components receive signals from the main computer module and use cases could be written for actions taken on them (i.e. turn the coffee maker on/off).

Is the main computer/server the "system" or is the system made up of the collection of the computer/server and all of the components (lighting modules, coffee makers, door sensors)?


回答1:


I think that you must first define system's boundaries, it will be then more easy to understand external actors but keep in mind that actors usually treated as black boxes.

For example if the automation system finds out that the food supplies are low and need a restock it may initiate an order perhaps on an online service; in this case the online system accepting such orders is an actor, you don't need to know how it will process the order, you as a developer of the automation system need to know it's public interface in order to interact with it.

An actor is someone or something (another system) that interacts with the system you are trying to develop. More formally an actor initiates use cases.




回答2:


@Stef - An actor can also assist the primary actor to achieve the stated goal of the use case. That would be the case with the online service from your example. The online service wouldn't initiate any use cases here, but in receiving the order, it becomes a secondary actor to the Order Food Supplies use case.



来源:https://stackoverflow.com/questions/5294287/how-to-determine-non-human-actors-of-a-use-case

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