2

私は現在Use Case Diagram、上記のものに似たものを持っています:

代替テキスト

私の最終的なアプリケーションでは、おそらくとの両方で同じLoginフォームを共有します。私はこれにそれを反映する必要があります、両方が同じものを使用していますか?もしそうなら、どのように私は彼らのそれぞれがした後に何ができるかを表すことができますか?EmployeesEmployersUse Case DiagramActorsLogin Use CaseLogin

4

3 に答える 3

3

Most likely there will be other shared use cases? So the 'abstract' user makes sense I think, although I don't think it needs to be ‘abstract’, it can be an actor in its own right?

No matter what style you prefer the purpose of modeling is to abstract information away. If the login use case is very significant in a way that it needs to be in the diagram, this diagram is not telling me anything special about it. This diagram tells me that in this system the login use case precedes all other use cases? Duh? Any system will have a login use case so for most systems it won’t be (architecturally/very) significant. If the use case is special for some reason I would put in the diagram without relationships, that suffices I think. The diagram will communicate: we have a special login use case, we want you to take note of it. Does the system have anonymous use cases? Use cases that can be executed without the login use case? That is significant, worthy of some model elements. Otherwise it is implied IMHO.

If your modeling needs to do more than enable understanding and communication e.g. needs to drive code generation, this is different of course. But then you can – depending on your modeling environment – make it part of the model but not the diagram. That way it can do both: drive code generation and enable understanding, communication.

于 2010-11-01T12:02:28.127 に答える
1

@CesarGon'sは良い解決策です。もう1つの方法は、必ずしも優れているとは限りませんが、異なるだけですが、両方のユースケースEmployeeEmployerユースケース<<include>>loginUCにすることです。

どちらを使用するかは、スタイルと好みによって異なります。Abstract Userアプローチは、見た目がすっきりし、宣言型になります(他のUCの前提条件としてログインを指定する必要があります)。各UCは最初のステップとしてログインの呼び出しを明示的に示すため、この<<includes>>アプローチはおそらく命令型/プロセスモデリングの考え方によりよく適合します。

于 2010-10-29T09:39:15.297 に答える
1

雇用主と従業員の両方を抽象的なユーザーに特化させ、そのユーザーアクターにログインユースケースを使用させてみませんか?

その場合、雇用主と従業員は特定のユースケースのみを使用します。

于 2010-10-29T01:07:13.310 に答える