One case requirement: abnormal traffic

Source: Internet
Author: User

The problem that arises

Alternative streams, also known as alternative event streams, are alternativeflow in English. in RUP and UML . An explanation of the alternate stream is as follows: The alternate event stream contains the behavior of optional or unusual characteristics related to normal behavior, and also contains various variants of normal behavior at the same time. You can consider an alternative event stream as the "bypass path" to the basic event stream. Some alternative event streams will return to the basic event stream, and some will end the run of this use case.

by analyzing the definition of alternative streams, RUP can see that alternative flows can be divided into two categories:

1. Different approaches but still achieve use-case goals;

2. Abnormal conditions. The use case goal cannot be reached.

In the actual use case analysis. Because there are two possible scenarios for alternate streams, there are 2 main ways of writing alternative flows:

1. The handling of exception conditions outside the base stream is explained in the alternate stream. May still return to the basic stream, which may also lead to the end of the use case.

The handling of normal and abnormal conditions other than the basic stream is described in the alternative flow, overwriting other functions.

The sample of the 1 notation is more common. The following will appear. Don't repeat it here.

Examples of the 2 formulations are as follows:

Use case name: Fill out requisitions brief description

Employees fill out the book requisition online, the contents include: Book name, publishing house, author, price, ordering person (the system's own initiative identification), ordering department, order date, etc., completed and submitted to the Librarian for review.

The protagonist who fills in the requisition is the employee.

Event Flow

Employees choose "Fill out requisitions". The use case begins.

Basic flow

Employees choose "Fill out requisitions". Submit a "Fill out requisitions" request.

Display the "Fill out requisitions" form and display the requisition information (filled in uncommitted, submitted for review failed), the two status of the requisition information by selecting the separately listed, the audit failed only to see the reasons can not be changed.

Requisition information includes: Requisition code (the system self-generated), ordering department, ordering person, order date, reason for ordering, notes, and book details include: Book name, publishing house, author, unit price, quantity, etc. Book details include: Add, change, delete;

Please refer to the alternative flow for the purchase order information input operation.

Added: System detailed operation See "alternative stream new"

Changes: System detailed operation See "Alternate flow Changes"

Delete: System detailed operation See "alternate stream removal"

Select "Submit". The system submits the selected requisitions to the librarian for review. This use case ends.

Alternate stream

Three alternative streams are extracted from the basic flow of requisition requisitions:

Purchase requisition Information: Add, change, delete.

New

(a) The employee selects "new" in the "Fill out requisition" information area. Submit a "new" request.

(b) The system pops up the "Add Requisitions" blank mode form.

(iii) Requisition information includes: Book name, publishing house, author, unit price, quantity, etc.;

(d) After the requisition information is entered, select "Save" to submit and the system verifies the validity of the data, such as verification is unsuccessful. Correct the input data for the prompt error message, verify that the "Add requisition" form is closed successfully;

If you continue to add requisitions, repeat the ㈠㈡㈢㈣ steps.

Changes

(a) Employees in the "Fill out requisitions" Information area list select the requisition you want to change, submit a "change" request.

(b) The system pops up the "Change requisitions" mode form. and displays the current requisition information.

(iii) after changing the corresponding data. Select "Save" to submit, the system verifies the data validity. If validation is unsuccessful, then enter again based on the error prompt, verify that the data is saved after successful verification and close the "Change Requisitions" mode form to refresh the requisition information list at the same time;

If you continue to change, repeat the ㈠㈡㈢ step.

Delete

(a) Employees in the "Fill out requisitions" Information area list select the requisition that you want to delete, and submit a "delete" request.

(b) If the selected requisition is not approved by the audit, the system prompts "cannot delete the purchase requisition not approved by the audit";

(c) After deletion, refresh the purchase list information at the same time, the system prompts " XXX purchase requisition has been deleted!"

”;

If you continue to delete, repeat the ㈠㈡㈢ step.

Special Needs

No

Front-facing conditions

Employee Login System.

Post conditions

No

--- sample end ----

In the first 2 of these formulations. The basic functionality is explained in the alternate flow. Use cases have become longer. Suppose an exception occurs in an alternate stream. The alternative stream will appear to be more bloated.

Therefore, the first 2 is relatively rare.

In order to solve the different situation of alternative flow, people identify abnormal flow to solve the above problems.

What is an exception flow?

Bernd Lohmeyer presented for example the following classification rules

(See http://www.lohmy.de/2013/03/06/writing-use-cases-exception-or-alternate-flow/ )

L Result Negative:an Exception is anything this leads to not achieving the use case ' s goal. Negative results: Exceptions, whatever causes a failure to achieve a use-case goal

L Result Positive:an Alternate Flow is a step or a sequence of steps that achieves the use case ' s goal following Differen T steps than described in the main success scenario. But the goal is achieved finally. Positive results: Alternative flows, one or more step sequences, achieve the use-case goal, but not the same steps as the master success scenario.

Finally the goal is achieved.

See for example the following examples:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemhhbmdtawtl/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
Simply put: Abnormal flow is the anomaly of the basic flow and cannot reach the target of use case.
Replacing alternate streams with exception streams

Wolf Agile Demand Use case analysis method for alternative streams, the approach is to use the 1 approach, but instead of an alternative stream with an exception stream, exclude the first 2 practices from the name , and the optional process that satisfies the use case is expressed in the basic flow, Assuming that the basic flow is too long, split the use case.

In contrast to the above "fill requisitions" example, the Wolf Agile Requirements Use case analysis method is broken down at least for example the following multiple use cases:

1, add purchase order

2, change purchase order

3. Delete Requisition

Use case specification for new requisitions

Use Case Properties

Description

Name

Add Purchase Order

Brief description

The employee fills in the book purchase requisition online, the content includes: Book name, publishing house, author, unit price and so on. Fill it out and submit it to the librarian for review.

Front-facing conditions

Employee is logged in

Start point

Employees in the "Fill out requisitions" Information Area Select "New", submit "new" request, the system pops up "add requisitions" blank mode form

Basic flow

1. The employee fills in the requisition form information. Including book name, publishing house, author, unit price, quantity, reason for ordering, remark, employee requisition information input completed, select "Save" submit

2. System Validation data validity, validation rules see x.y

3. System verification hypothesis passed, record this requisition

4. System returns "Save" success information

Exception flow

3b assumes that validation is unsuccessful. Give the error message of the detailed field, let the user correct the input data

Post conditions

Submit to Librarian for review

Special Needs

Purchase requisition input information interface in one screen

Extension points

No

The advantages of abnormal flow can be seen based on the above analysis. The exception stream is essentially an alternative flow, and, in contrast to the original Rup alternative flow description, the definition is as follows: The exception flow is an anomalous behavior that is related to the normal behavior of the underlying stream. The exception stream is not the "bypass" of the underlying stream, and some of the anomalous flows return to the base stream. Some will end the run of the use case. Exception flow alternative Flow Basic benefits: 1, basic function all in the basic flow of the expression 2, the exception flow from the name clearly understand its positioning: the basic flow anomaly 3, the combination of basic stream + anomaly flow can cover all event flow scene 4. The granularity of the use case will be limited by the basic flow length. Facilitates finer management and is easy to use in an agile development environment.

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

One case requirement: abnormal traffic

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.