Extend StackState with functions

Extending StackState's capabilities using functions.
This page describes StackState version 4.1.
The StackState 4.1 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.1 version range to upgrade to a more recent release.
StackState is built to deal with a wide variety of different situations. StackState comes with functions to stay flexible enough to account for different types of logic.
Functions are predefined scripts that transform input into an output. Functions are called by StackState on-demand. For example, when a component changed state, some new telemetry flowed in or when the user triggered an action.

Packaging functions

Functions give power-users the ability to customize StackState fully. However, everyday users of StackState should not need to know that they exist.
StackPacks pre-package functions and automatically install functions on StackState whenever the StackPack gets installed. You can develop your function in StackState. When you are confident that it does what you want, you can export it and package it with a StackPack. Read more about it in how to create StackPacks.

Async vs synchronous functions

Functions in StackState can be either synchronous or asynchronous (async).
Baseline function
Check function
Component mapper function
Event handler function
Id extractor function
Propagation functions
Relation mapper function

Async functions

Propagation functions can optionally be created as asynchronous (async) functions. This gives the function access to the Script APIs and allows more functions to be run in parallel.
Read more about propagation functions.

Synchronous functions

In StackState, functions are generally written in a synchronous blocking manner.
Read more about: