Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML’s StateChart FSM, EFSM in UML Concurrent states Tool support.

Similar presentations


Presentation on theme: "UML’s StateChart FSM, EFSM in UML Concurrent states Tool support."— Presentation transcript:

1

2 UML’s StateChart FSM, EFSM in UML Concurrent states Tool support

3 Example Consider the following requirements describing the life cycle of a bank account entity. – A bank account is first created by a bank manager. The customer owning the account has to activate the account within one month. Otherwise, this account will be automatically cancelled. Once activated, the customer can use the account to perform bank transactions. The account becomes blocked for security reasons or if it is dormant for more than six months. In either case, the customer is asked to contact the bank. After being blocked for two weeks, if the customer does not contact the bank, the account will be cancelled. The customer may cancel the account at any time while it is active. States: created, active, blocked and cancelled.

4 A bank account is first created by a bank manager. The customer owning the account has to activate the account within one month. Otherwise, this account will be automatically cancelled. Once activated, the customer can use the account to perform bank transactions. The account becomes blocked for security reasons or if it is dormant for more than six months. In either case, the customer is asked to contact the bank. After being blocked for two weeks, if the customer does not contact the bank, the account will be cancelled. The customer may cancel the account at any time while it is active.

5 Concurrent states in StateCharts Concurrent activities when superstate state ‘created’ is reached

6 UML’s Activity diagram Describe dynamic behavior – sequential and concurrent flows of activities May involve activities spanning more than one use case Action states, activity states and transitions between them, and swimlanes Includes symbols from Petri Nets and Flowcharts

7 Example Given the following English description of the flow of activities within a company that receives orders through the internet. – “ Once the order is received by the Customer Service department, the customer’s credit is checked. If the customer has a bad credit rating, the order is rejected and closed. Otherwise, an invoice is prepared and sent to the Finance department for follow up, and at the same time the order is sent to the Order Fulfillment department. The Finance department processes the payment once received and informs the Customer Service department. Also, the Order Fulfillment department checks if the ordered items are available. If available, the order is delivered to the customer, otherwise it is back ordered. In either case, the Customer Service department is informed.

8 Once the order is received by the Customer Service department, the customer’s credit is checked. If the customer has a bad credit rating, the order is rejected and closed. Otherwise, an invoice is prepared and sent to the Finance department for follow up, and at the same time the order is sent to the Order Fulfillment department. The Finance department processes the payment once received and informs the Customer Service department. Also, the Order Fulfillment department checks if the ordered items are available. If available, the order is delivered to the customer, otherwise it is back ordered. In either case, the Customer Service department is informed

9 Process modeling: Data flow diagram (DFD) Process transforming input data and control into output data and control Bubble representing a process Arcs carrying flow of data and control in and out of a process Data store as source and sink of data External entities as source and sink of data

10 Data flow diagram (DFD)

11 Consistency of process refinement Process 2. is refined into 4 subprocesses 2.1 to 2.4

12 Example Consider the following informal requirements. – ‘An online book ordering system accepts orders from buyers which could be either human users or software agents. A book order is normally made after the buyer browses a books catalog. The system checks the availability of the ordered items in the store inventory and the status of the buyer in the customer file. If all items are available and the customer has a good record, the buyer is asked to provide credit card payment and shipping information. The payment information is then passed to a payment server to verify their validity. If the payment information is valid, an online bill and payment confirmation is sent to the buyer. Otherwise, the buyer is informed of the rejection of the payment information, and consequently the order. In the meantime, the inventory file, the customer information file and the orders file are updated. In addition, customer information including name and shipping address are used to deliver the ordered items to the buyer”.

13 Context level diagram An online book ordering system accepts orders from buyers which could be either human users or software agents. A book order is normally made after the buyer browses a books catalog. The system checks the availability of the ordered items in the store inventory and the status of the buyer in the customer file. If all items are available and the customer has a good record, the buyer is asked to provide credit card payment and shipping information. The payment information is then passed to a payment server to verify their validity. If the payment information is valid, an online bill and payment confirmation is sent to the buyer. Otherwise, the buyer is informed of the rejection of the payment information, and consequently the order. In the meantime, the inventory file, the customer information file and the orders file are updated. In addition, customer information including name and shipping address are used to deliver the ordered items to the buyer

14 First refinement An online book ordering system accepts orders from buyers which could be either human users or software agents. A book order is normally made after the buyer browses a books catalog. The system checks the availability of the ordered items in the store inventory and the status of the buyer in the customer file. If all items are available and the customer has a good record, the buyer is asked to provide credit card payment and shipping information. The payment information is then passed to a payment server to verify their validity. If the payment information is valid, an online bill and payment confirmation is sent to the buyer. Otherwise, the buyer is informed of the rejection of the payment information, and consequently the order. In the meantime, the inventory file, the customer information file and the orders file are updated. In addition, customer information including name and shipping address are used to deliver the ordered items to the buyer

15 Refinement of validate order process An online book ordering system accepts orders from buyers which could be either human users or software agents. A book order is normally made after the buyer browses a books catalog. The system checks the availability of the ordered items in the store inventory and the status of the buyer in the customer file. If all items are available and the customer has a good record, the buyer is asked to provide credit card payment and shipping information. The payment information is then passed to a payment server to verify their validity. If the payment information is valid, an online bill and payment confirmation is sent to the buyer. Otherwise, the buyer is informed of the rejection of the payment information, and consequently the order. In the meantime, the inventory file, the customer information file and the orders file are updated. In addition, customer information including name and shipping address are used to deliver the ordered items to the buyer

16 Structured English, Decision Table and Decision Tree To describe a process Typically used for a stateless (no internal states, no memory of previous inputs) process Pseudocode, structured english

17 Decision table Rows in the table are of two types: condition rows and action rows. A column represents a combination of condition outcomes and the corresponding actions to take. – also referred to as a rule. A complete decision table specifies one rule for each combination of the condition outcomes. – For example, if we have three independent binary conditions, the number of combinations or rules must be 2 3 = 8. A decision table contains redundancy, it there exists two columns that are equivalent. A decision table is ambiguous or contradictory if for the same combination of condition outcomes, the specified actions are different.

18

19

20 Data modeling Chen’s entity relationship diagram (ERD) Entities representing objects to be saved in permanent stores – Attributes for each entity Relationships linking entities (binary, ternary,.. Relationships) Cardinality of the relationship: 1 to 1, 1 to many, and many to many

21

22

23

24 Data dictionary Explaining the data items in a DFD or ERD For example in level 0 (first refinement) DFD of Figure 4.21: – reply = Msg1 or Msg2 or Msg3 in the data dictionary. – Msg1 = ‘Unable to accept your order at this moment’ – Msg2 = ‘Unavailable items at this moment’ – Msg3 = ‘Thank you for your order – Please proceed with payment’.

25 Object oriented analysis (OOA) Based on the identification of problem-domain objects, their attributes and operations Identification of relationships among objects Object states and transitions among them Description of the interactions among objects Textual analysis of requirements: nouns and verbs

26 What can be an problem domain Object? Entities that have more than one attribute Entities that need to be retained in permanent storage for future use External entities that produce information to be used or consumed by the system, or that consume information generated or produced by the system Events or actions that occur during the system’s operations Roles played by people interacting with the system Organizational units and places that are important in the problem domain such as flight crew team or airport Logical items such as flight reports and documents Composite physical items such as an airplane or a personal computer

27 Three types of solution domain objects Entity objects: to remain in permanent store for future use and reference Interface objects: forms, GUI components that are used but are not saved (transient objects) Control objects: encoding the business procedure or control flow (one per use case?)

28 Example Let us analyze the following English text providing a partial description of the requirements for a Proposal Evaluation System (PES). “PES allows different types of users to perform their functions. The three types of users are Evaluators, Administrators and Proposal Submitters. Users must first logon successfully to the system to be able to work. Submitters will submit their proposals. An Administrator will perform a basic evaluation of the proposal before assigning it to an Evaluator. The basic evaluation checks whether the Submitter has already submitted another pending proposal. If so the submission fails the check. In addition, the Submitter cannot have more than two accepted proposals to pass the basic check. If the proposal does not pass the basic check, the Submitter is informed and the refusal is logged in history.

29 Example An Administrator sends an email to the Evaluator once she/he is assigned to a proposal. The Evaluator will evaluate the proposal and will send his/her evaluation to the Administrator either by email or by filling a form on the internet. The Administrator will inform the Submitter of the result of the evaluation. At this point the proposal evaluation process is considered done”.

30

31 Composition relationship (includes, made of) Object relationships: inheritance (generalization/specialization, is_a)

32 Associations and roles


Download ppt "UML’s StateChart FSM, EFSM in UML Concurrent states Tool support."

Similar presentations


Ads by Google