Skip to content

How to use

JoseColombini edited this page Sep 20, 2020 · 7 revisions

Welcome to the UCWriter wiki!

How to use

You can easily use with our web editor (unfortunately it allows only one user at a time), or you can clone the repo and run in your machine (like any Xtext project) (I will release the Eclipse plugin)

Now you can Write, but what?

This project divides use cases in three parts: Header, main flow, and alternative flow.

Remember: all the reserved words are uppercase.

The metadata between <> are your inputs to the use case.

Header

Here you will present your use case (UC) that is tagged by a integer number (INT), a colon (:) and follow by the name you choose, resulting this

UC <INT>: <Name of your usecase>

Next you can represent the Precondition and Postcondition of your use case (they are optional):

PRECONDITION: <your precondition>

POSTCONDITION: <your postcondition>

Main Flow

Here you will describe the main flow of your use case. It begins with a declaration (MAIN FLOW:) and each following line will have a step.

For the steps we need to understand the general structure and the organization of them. Each step is named by a number, tagged by a type, have its information, and have one indentation level.

After you declare the main flow, you must add one indentation level, and another one is added if the step is inside a loop (loops inside loops will increase successively the indentation).

Each step is named by an integer number in ascending order followed by a point (.). Steps inside loops will also have the number assigned to the RepeatingStep they are inside, which we will call parent. A Step can be a UserStep (executed by an Actor), SystemStep (executed by the Subject), or RepeatingStep, respectivly by using the reserved words USER SYSTEM WHILE

The resulting main flow will look like:

MAIN FLOW:
  1. USER <do something>
  2. SYSTEM <do something>
  3. WHILE <**Condition**>
    3.1. USER <do something>
...

Alternative flow

Alternatives flows are declared using the sequence ALTERNATIVE FLOW:. The flows inside it must have an indentation level. Each flow starts with a letter followed by a point and the number of the step that it extend (CHAR.INT.). The condition that causes the flow is represented after the reserved word IF. Under the alternative flow, the AlternativeSteps must have an additional indentation level. They are represented by a number in ascending order and a sentence.

The end of an alternative flow can be a return to the original flow (RETURN TO) or an end of the use case (UC END).

ALTERNATIVE FLOW:
  <CHAR>.<STEP NUMBER>. IF <**condition**>
    1. <something happen>
    2. <other thing happen>
    3. RETURN TO <some step>

  <CHAR>.<STEP NUMBER>. IF <**condition**>
    1. <something happen>
    2. <other thing happen>
    3. UC END

Other features

Include

You can include another use case, at any step in Alternative Flow or Main Flow, by using this structure:

<STEP NUMBER>. INCLUDE <use case name>

Conditions

Conditions have logical operators: AND, OR, NOT. One condition is a simple sentence with this operators inside.

Example

grant #2019/12641-7, São Paulo Research Foundation (FAPESP)

The opinions, hypotheses and conclusions or recommendations express in this material are responsibilities of the authors and note necessarily reflect the vision of FAPESP.

Clone this wiki locally