Function

Each function specification should describe the purpose of the function, the inputs it accepts and outputs it produces. If it is necessary, it can also contain the low-level implementation details.

aa

Input and Output

Inputs and outputs are described by data objects, so if they are properly defined, the middleware will be able to generate a large part of this section automatically:

aa

Each input field must have the following attributes:

  • Purpose/description
  • Whether it is a mandatory field or not
  • A default value for non-mandatory fields

For the output fields following must be defined:

  • Purpose/description
  • Under which conditions the value is included in the output

The output could also contain a collection of data objects, Blocking Condition in this case:

aa

Internal Behavior

Unlike services, which are mostly described as black boxes, the specification of a function should not only document what id does, but also how it does it. Specification hence often describes the data structures which are used, services or functions that are called, and it could even include mapping to the real code:

aa

However, do not try to document every detail and always evaluate whether the information provides enough value to be worth documenting as documenting unnecessary details comes with the responsibility to keep it up to date in the future.