Function

An application function describes the internal behavior of an application component. It specifies a single behavior the system or application provides, but it abstracts from the way it is implemented. The function is not a black box, though; the internal working is usually documented, yet the description is just logical - it does not expect any particular technology.

Functions are artifacts that will really be implemented in the system. They could represent loading data from the database, storing data, or executing some complex algorithm. The function can also call other functions. This means that functions can vary in size, scope, and level of detail.

Functions represent the internal behavior of the system solely, so unlike use cases or activities, they do not include any user interaction.

Example: Delete Order

  1. System receives a request to delete the order
  2. System checks if the order was placed by the user requesting the deletion
  3. If yes, system deletes the order
  4. If not, system returns an error code

As you can see, there is no user-system interaction in the previous example, as functions consist only of system steps. On the other hand, they can be broken down into other functions. For example, checking the condition in step number two could be encapsulated in a separate child function - Was placed by the requestor.

Although the textual description is possible, system functions are more often described using a diagram. For instance, the following example demonstrates describing the Delete order function using a sequence diagram:

aa