简体   繁体   English

客户对用例图的要求

[英]Clients requirements on use case diagram

I want to create a use case diagram based on customer requirements (pnline food ordering system), which are for example我想根据客户要求(pnline 食品订购系统)创建一个用例图,例如

  1. ensure on-time delivery确保准时交货
  2. process and package orders工艺和 package 订单
  3. promote the pizza shop推广比萨店

How can I put these requirements on use case diagram?如何将这些要求放在用例图上? Could you please explain on specific example?你能解释一下具体的例子吗?

for 1) could it be like that: display order details < inlcude > display time left to prepare order对于 1) 是否可以这样:显示订单详情 <包括> 显示准备订单的剩余时间

There are a couple of ways how to model that. model 有几种方法。 The first step is always to read and understand the requirements.第一步始终是阅读和理解要求。 So putting them in some sort of order is vital.因此,将它们按某种顺序排列是至关重要的。 There are dedicated tools to deal with that and they may or may not be helpful (I'm talking of DOORS and the like).有专门的工具可以解决这个问题,它们可能有用也可能没有帮助(我说的是 DOORS 等)。 A more simple way is to create a profile for requirements management in UML that contains requirements elements where you can reference the customer documents and already put them in a certain structure.一种更简单的方法是在 UML 中为需求管理创建配置文件,其中包含需求元素,您可以在其中引用客户文档并已将它们放入特定结构中。

Now in the next step you synthesize these requirements to use cases.现在在下一步中,您将这些需求综合到用例中。 That is you pinpoint the added values and make them visible.那就是您确定附加值并使它们可见。 Actors and UCs shall be clearly visible.演员和 UC 应清晰可见。

Once you have done that you relate UC and requirement elements with realize relations (or some other stereotyped dependency depending on the profile you use).完成此操作后,您将 UC 和需求元素与实现关系(或其他一些定型依赖项,具体取决于您使用的配置文件)关联起来。 This way you have a nice traceability that connects requirements and UC for the upcoming design steps.这样,您就有了很好的可追溯性,可以将需求和 UC 连接起来,以用于即将到来的设计步骤。

A more simple approach would be to just attach constraints to an elaborated UC model containing requirement text.更简单的方法是将约束附加到包含需求文本的详细 UC model。 That could be done for simple (school) projects.这可以用于简单的(学校)项目。 Though it's unlikely you find that in the industry.尽管您不太可能在该行业中找到它。 Either you go to war (see above) or you have just a little chit-chat with some insults.要么你 go 开战(见上文),要么你只是闲聊一些侮辱。


Regarding the synthesis of UCs I recommend to read Bittner/Spence about Use Case Modeling.关于 UC 的综合,我建议阅读 Bittner/Spence 关于用例建模。 The best read you can find.你能找到的最好的读物。

Use cases describe operations, requirements are part of operations' restrictions.用例描述操作,需求是操作限制的一部分。

First, model the operations or activities of the customer, then add the requirements as constraints of each use case.首先,model 客户的操作或活动,然后添加需求作为每个用例的约束。

Your requirement examples seem to correspond to goals.您的需求示例似乎与目标相对应。 This is a good start for thinking about goal-oriented use-cases, leaving the designers opportunities to think about how to best achieve the goals.这是思考面向目标的用例的良好开端,让设计人员有机会思考如何最好地实现目标。

  • For example: process and package order is a clear (and popular) use-case for company staff to satisfy their clients.例如:流程和 package 订单是公司员工满足其客户的明确(且流行)用例。 It raises however a question: who will pass the order that is to be processed?然而,它提出了一个问题:谁将传递要处理的订单?

A use case represents a set of behaviors offered by a system, with observable result, that is if value for actors or other stakeholders;用例代表系统提供的一组行为,具有可观察的结果,即对参与者或其他利益相关者的价值; not all requirements are suitable for a use case diagram.并非所有需求都适用于用例图。

  • For example: promote the pizza shop is a popular business goal.例如:推广比萨店是一个受欢迎的商业目标。 But will the system have some observable behaviors that do it, and if yes with what users?但是系统是否会有一些可观察的行为来做到这一点,如果是的话,哪些用户会这样做? If the answer is that a nice system will automatically result in more sales, then it is wishful thinking (from a software engineering point of view).如果答案是一个好的系统会自动带来更多的销售,那么这是一厢情愿的想法(从软件工程的角度来看)。 But.但。 if there is some functionality that makes the system performing some promotion then keep such use-case, but think of rewording it to clarify what the system is expected to do (eg make advertisements? present the shop? carry out some email campaigns?)如果有一些功能使系统执行一些促销,那么保留这样的用例,但考虑改写它以阐明系统预期做什么(例如制作广告?展示商店?开展一些 email 活动?)

Last but not least, a use-case involves some actors.最后但并非最不重要的一点是,一个用例涉及一些参与者。 You need to identify those.你需要识别那些。 And to further promote a goal-oriented design, you may consider rewording the goal and behavior from the user perspective.为了进一步促进面向目标的设计,您可以考虑从用户的角度重新定义目标和行为。

  • For example, does the system really ensure a timely delivery ?例如,系统真的能保证及时交货吗? Or does it support some users who ensure it?或者它是否支持一些确保它的用户? If the user is the delivery agent, you could rephrase it into: deliver packages in time .如果用户是派送员,可以改写为:及时派送包裹

With all this, you may come to a use-case diagram that provides the big picture.有了所有这些,您可能会看到一个提供全局的用例图。 But you would never show graphically all the requirements.但是您永远不会以图形方式显示所有需求。 Some narrative would describe each use case, and there you can document the more detailed requirements.一些叙述会描述每个用例,您可以在那里记录更详细的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM