Value Functions

Functions that simply supply a value.

current-user

current-user([form])➡String

Returns the identity of the user Stroom is processing as. This is mainly useful in interactive processing, such as a search.

The form of the user’s identity returned is controlled by the optional form argument. By default, the display name is used, falling back to the subject identifier if there is no display name.

Function Arguments:

Param Type Mandatory Default Value Allowed Values Multiple Min Count Description
form String - display, subject, full - The form of the user’s identity to return. If not provided ‘display name is used, falling back to the subject identifier if there is no display name.

Return Value:

Type Description
String The requested user identity, or an empty sequence if unavailable.

random

random()➡Decimal

Generates a random decimal number between 0.0 (inclusive) and 1.0 (exclusive).

Return Value:

Type Description
Decimal The random decimal number.

random-integer

random-integer(upperBound)➡Integer

Generates a random integer between 0 (inclusive) and the upper bound (exclusive).

Function Arguments:

Param Type Mandatory Default Value Allowed Values Multiple Min Count Description
upperBound Integer - - - The upper bound of the random integer (exclusive).

Return Value:

Type Description
Integer The random integer.