View on GitHub

Typed Use Case

Use case definition, for which this console application can generate PlantUML diagram, where all services are domain specific type safe.

Tuc

Home / Tuc


Typed Use-Case

Table of contents

Syntax

We use a custom syntax to create a PlantUML diagram with ease.

Syntax is meant to be as light-weight as possible. It is also a white-space significant, so no other boilerplate symbols are needed.

Indentation

Nested structure is indented by spaces.

The first indented line specifies the indentation level for the entire file.

You determine number of spaces on your own, but you need to stick with it in the entire file.

MainInitiator
    // here is the body (lifeline) of the initiator, currently indented by 4 spaces

Comments

You can comment your tuc file with the simple syntax of //. Everything behind // is ignored and the parser won’t do anything with it (at the moment).

// this is comment

There are no special multi-line comments.

// this
// is
// multi-line
// comment

Structure

Single tuc definition must consist of 3 parts:

Single tuc definition

tuc Example     // tuc name

participants    // participants
    MyService MyDomain

MyService       // use-case parts
    do something

Tuc file can contain one or more tuc definitions.

Tuc name

This is a start of a tuc definition. (It will be a section in puml result.)

tuc {NAME OF YOUR TYPED-USE-CASE}

Example:

tuc My use case definition

Participants

All participants of the use case must be defined.

NOTE: Order in this definition determines the order of participants in puml result.

Their definition must start with participants key word. Then there are participants defined as a name of the Record (or Initiator) in the Domain Types and its Domain.

The minimal participants definition.

participants
    MyService MyDomainName

NOTE: Participants are the first indented line(s) in the tuc file, so they determine the indentation level of the entire file.

Read more about participants here.

Use-Case Parts

There must be at lease one part of the use-case.

There is currently 13 available parts:

Read more about parts here.