Function

Each function specification should describe the purpose of the function, the inputs it accepts, and the outputs it produces. If necessary, it can also contain 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 output fields, the 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 document not only what it does, but also how it does it. A specification therefore often describes the data structures used, services or functions called, and it can even include a mapping to the actual code:

aa

However, do not try to document every single detail. Always evaluate whether the information provides enough value to be worth documenting, as keeping unnecessary details up to date becomes an ongoing responsibility.