What are the rules while creating flow charts?

Rules of using the Flow Chart

A flowchart consists of a few kinds of nodes

  1. Label
  2. Condition
  3. Action
  4. Outcome
  5. Skip

More details:

Label: A label is the first node in a path and it contains a brief description for the path and its subpaths

Condition: A Condition node contains conditions that must be satisfied. It has ‘Yes’ and ‘No’ branches. The ‘Yes’ branch is taken if all conditions that are mentioned are satisfied. The ‘No’ branch is taken when any of the condition fails. Each condition is written on a line by itself. It has the form
#<entityName.property><comparator><value>?

Eg.

#user.admin==true?
#book.issued==false?
#user.type=="customer"?
#book.issuedTo==#user?
#user.issueCount>2?
#user!=user2?

If the lhs or rhs is an entity and the property is not specified, then the property defaults to __id.

Eg.
#book.issuedTo==#user?
is same as
#book.issuedTo==#user.__id?

#user!=#user2?
is same as
#user.__id!=#user2.__id?

In expressions, ==true can be omitted

#user.exists?
is same as
#user.exists==true?

Action: Actions specify the steps to be taken when the conditions are met. There are 3 kinds of lines allowed in actions.

a) Normal actions. Apart from specifying what to do, actions also denote which entities are involved in that action.

Eg.

Create #book
Issue #book to #user2

b) Screen actions. Screens start with an @ symbol.

Eg.
@create_user_screen
would force the system to navigate to the @create_user_screen.

c) Implicit login change. These are encased in square brackets.

Eg.
[login=#user]
forces the system to logout any existing user and login as this user.

[login=none]
forces the system to logout any existing user.

Outcome: When the actions are performed, we expect the system to behave in a particular way. We designate this via outcomes. Outcome boxes take 4 kinds of lines

a) Verification actions.

Eg.

Verify #user created
Verify #book issued to #user

b) State change.

Eg.

#user.exists=true
#book.issued=true
#book.issuedTo=#user

c) Screen change. These start with @ and specify what screen would we end up on when we perform the actions.

Eg.
@book_issued_screen

d) Login change

Eg.
[login=#user]
lets Test Flow Charts know that the previously performed actions would leave the system in a state where this user would be logged in.
[login=none]
lets Test Flow Charts know that the previously performed actions would leave the system in a state where there is no user currently logged in.

1 Like