0

I have a condition that should occurs in 2 use cases. Can i add the action in the condition as a separate use case (as the condition itself has several steps like logging in, entering details etc.) and include it in the precondition. Is it possible to Include a use case in precondition?!!

Kartik
  • 78
  • 1
  • 7
  • 1
    Try to dig in [http://stackoverflow.com/search?tab=votes&q=%5buse-case%5d%20precondition%20is%3aanswer](http://stackoverflow.com/search?tab=votes&q=%5buse-case%5d%20precondition%20is%3aanswer). For better answer you'd need to provide **more data**. What do you have exactly (the use case diagram, the condition, the use case names, the use case meaning, the use case relationships)? – xmojmr Feb 26 '15 at 07:23

2 Answers2

2

No. A use case is not a condition. A use case is something that describes how an actor gets additional value. There is also no "precondition element" (AFAIK) that can be used. You need to copy the text.

What you CAN do is to write "Use Case XY needs to be completed".

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Thomas, I don't think it would be a good idea to link use cases together like that. After all your use case shouldn't care about which other use case realized the precondition. It could be Use case XY, or it could be another use case. As long as the precondition is met the use case can start. – Geert Bellekens Feb 27 '15 at 09:12
  • Yes, Geert. That's the reason why I did put CAN in upper case. It should mean "you can do it but you should not". I remember some discussions about use case chaining and it always started to get religious ;-) – qwerty_so Feb 27 '15 at 12:40
  • @GeertBellekens one such opinion-based discussion is in [Stack Overflow: UML Use case: Waiting for another use case to finish](http://stackoverflow.com/questions/28031171/uml-use-case-waiting-for-another-use-case-to-finish) – xmojmr Mar 01 '15 at 11:56
1

No, not that way. But you can use the «precedes» relationship from use case A to use case B to specify that A must be completed before B can be done.

Big Warning here: don't try to use use cases to model some sort of flow (first this, then that, then maybe the other...). That's not what they're for. If you need to describe a flow, use activity or sequence diagrams.

Uffe
  • 10,396
  • 1
  • 33
  • 40