• 沒有找到結果。

Edit OOMPNets with OOMPNE

在文檔中 建立OOMPNets之開發環境 (頁 61-69)

Chapter 5. Example

5.1 Edit OOMPNets with OOMPNE

Table 5-1 shows the specification of use case “Transfer Account” and Table 5-2 shows a scenario “Transfer Account Successfully” of the use case.

Use Case Title: Transfer Account

Goal: ATM supports user to transfer money from one account to another.

Related Actors: User, System Manager Primary Actors: User

Trigger: User

Precondition: ATM is turned on and the ATM is idle.

Primary Scenario:

Steps:

Pre: ATM is turned on and the ATM is idle.

1. User provides card and information to identify his identity.

Pre: User identity has no problem.

2. User transfers money.

Alternatives:

1a. User doesn’t pass the identity verification within 1 times.

1a1. ATM shows an “invalid identity” message.

53 Pre: The message is shown.

1a2. GO TO step 1.

1b. User doesn’t pass the identity verification 2 times.

1b1. ATM terminates the transaction.

2a. The transaction is fail.

2a1. ATM terminates the transaction.

Exceptions: could happen at any time 1. The power supply is cut off suddenly.

(1) Maintainer turns on ATM’s power supply.

(2) System manager turns on ATM system.

Postcondition: A transfer of money is executed successfully.

Table 5-1 The specification of “Transfer Account”.

Scenario: Transfer Account Successfully Pre: ATM is closed.

1. System manager turns on ATM.

Pre: ATM is turned on and the ATM is idle.

2. User provides card and information to identify his identity.

Pre: User identity has no problem.

3. User transfers money.

Table 5-2 The scenario of “Transfer Account Successfully”

In the process of modeling scenario “transfer account successfully”, the first step declares the color sets and variables needed. Figure 5-1 shows the window of declaring four color sets. The declared color sets are ATM, Information, Customer, and Management. Color set ATM belongs to complex type and the others belong to primary type. Because color set ATM is complex, OOMPNE creates a new sheet for the user to model the type of the complex color set after user declares color sets.

Figure 5-2 shows the net of the color set ATM. The details of modeling ATM are similar to modeling scenario “transfer account successfully”, so it is described later.

Figure 5-3 shows the activities of declaring variables. Here, this OOMPNet needs be

54

declared five variables, e.g. controller, user, machine, password, and account.

Figure 5-1 The window of declaring color sets.

Figure 5-2 The OOMPNet of color set ATM.

55

Figure 5-3 The window of declaring variables.

The second step is based on Table 5-2 to model the net structure of scenario

“transfer account successfully” and edit the inscriptions of the net elements. The process of creating and editing net elements are described in Section 3.1. When user edits the inscription of arcs, OOMPNE will remind user of his/her error edition.

Figure 5-4 shows the reaction of OOMPNE if user edits an inscription which might cause some abnormal phenomena. After creating and editing net elements, the modeled OOMPNet of scenario “transfer account successfully” is shown in Figure 5-5. The top-left is the declared color sets and variables. And, transition “System manager turns on ATM” synchronizes with the transition “turn on” in object-net atm.

56

Figure 5-4 The warning message of editing unbalance inscriptions of arc (Start, Provide information to identify the identity).

Figure 5-5 The OOMPNet of scenario “transfer account successfully”.

57

The final step of the modeling process refines the nodes which are needed to be refined. In current status of the modeled OOMPNet, transition “provide card and information to identify the identity” need be refined. Table 5-3 shows the refinement of transition “provide card and information to identify the identity”, and user uses the popup menu associated with transition to set the transition to be abstract. OOMPNE creates new sheet for user to model the refinement in Table 5-3. Figure 5-6 shows the OOMPNet of the refinement. Transition “Insert ATM card” in the refinement synchronizes with transition “Card is inserted” in object-net atm. Similarly, transition

“transfer account” in Figure 5-5 need be refined. The refinement of transition

“transfer account” is shown in Table 5-4. The modeled OOMPNet of the refinement is shown in Figure 5-7.

Refinement of transition “provide card and information to identify the identity”

Pre: ATM is turn on and idle

1. User inserts the ATM cash card.

Pre: ATM is occupied

2. User enters the password.

Pre: ATM is occupied and password is unchecked.

3. ATM verifies password.

Table 5-3 The refinement of transition “provide card and information to identify the identity”

58

Figure 5-6 The OOMPNet of refinement described in Table 5-3

Refinement of transition “transfer account”

Pre: ATM is occupied.

1. User selects function “transfer account”.

Pre: ATM is occupied.

2. User enters account number.

Pre: ATM is occupied and account is unchecked.

3. ATM checking account number format.

Pre: ATM is occupied and account is valid.

4. User enters the amount of money.

Pre: ATM is occupied.

5. User rechecks transfer information.

Table 5-4 The refinement of transition “transfer account”.

59

Figure 5-7 The OOMPNet of refinement described in Table 5-4.

From the above three steps, a scenario can be modeled as an OOMPNet by using OOMPNE. User can use function “Merge abstract nodes” to unfold the abstract node.

After unfolding abstract nodes, user can see the whole OOMPNet of scenario

“transfer account successfully” without aligning. Figure 5-8 shows the whole OOMPNet of scenario “transfer account successfully”. The two abstract transitions are replaced by their OOMPNets of refinements respectively. The inscriptions in above figure are the same as those in latter Figures. They will be omitted then.

60

Figure 5-8 The OOMPNet of scenario “transfer account successfully”.

在文檔中 建立OOMPNets之開發環境 (頁 61-69)

相關文件