Reputation: 3181
I have this problem, my system is a clothes store which allows the customer to return the cloths he has bought only after one day of buying date.
Returning cloths is the use case ... but how can I represent the one day condition? I thought about using "Guard condition", what do you think?
Upvotes: 3
Views: 6407
Reputation: 9952
A few options, depends on how you choose to represent the flow of your Use Case.
Example of the last one for clarity:
Main Flow
Exception Flow: Maximum return interval exceeded
2a. Return date confirmed as greater than or equal to maximum return interval
3 Whatever you do in this scenario...
Bottom line, there are options. Which to choose depends on your modelling preferences. But to answer your original question: a guard condition is perfectly acceptable.
Upvotes: 3
Reputation: 5327
conditional statements aren't used in use cases because the conditions consist of behaviour. Such an use case "Returning cloths" is weird. use imperative statements for your use cases like: "make registration" "fullfill order" etc.
Upvotes: 1
Reputation: 2739
What you have here is actually two different use cases which share a common action.
You want to create a base use case of "Try to Return Clothes", and then extend that into two different use cases which generalize to it, eg:
Then you can in your sequence diagrams identify the results of these use cases, e.g. the customer who does it after one day is not allowed to have the return processed.
Upvotes: 3