Number range value

Value resolver – Abstract

Purpose: Attempts to retrieve a number range value for the specified Number range type.

images/download/attachments/78256065/image2022-8-26_16-9-9-version-1-modificationdate-1661522949141-api-v2.png

The Number range value value resolver attempts to retrieve a number range value for the specified Number range type.

Whether the value resolver returns a number range value depends on whether a number range:

  • is configured for the Number range type,

  • is set to active,

  • is applicable in the given context (see note below) and

  • is not yet 'exhausted'

For further details see Number range.

If one of these criteria is not met, 'no value' ($null) is returned.

NOTE◄ The dynamic assignment of number ranges for the selected Number range type takes into account the input value for the Number range value value resolver as a data context, which may differ from the reference object applicable in the context of a concatenation.

The input value is passed to the number range assigned, if any, together with the variables valid in the context of the Number range value value resolver. The corresponding data can be used in its configuration to define number parts (see Wert über Resolver (Nummernteil)).

Configuration

The only Number range type parameter is not formally a required field. However, without any selection for the Number range type, 'no value' ($null) is always returned.

The selection field for the Number range type parameter refers to the dynamic enumeration Number range type and supports a search function as shown to the right.

Dynamische Aufzählungsfilter for the Number range type applicable in the context of the configuration can limit the selection options. Such restrictions have no influence on the runtime behaviour.

images/download/attachments/78256065/image2022-8-26_16-12-2-version-1-modificationdate-1661523123044-api-v2.png

Example

Whenever the account of a user (see Users) or guest user (see Guest users) is created, modified or deleted, an e-mail should be sent to an administrator with a number range value in the subject line as a unique identifier for the 'Account Transaction'.

Specifically, the number range combines a six-digit incremental run number with an identifying letter for the transaction ('C'=CREATE, 'U'=UPDATE, 'D'=DELETE') and the type of account involved.

Runtime example:

In the example on the right, the sequence number (#58) appears and is followed by the letter 'D' (DELETE) and the internal class name for the deleted object of the guest user (GuestUser) type.

images/download/attachments/78256065/image2022-8-26_16-13-7-version-1-modificationdate-1661523187955-api-v2.png

Configuration:

An event handler is configured as shown on the right:

  • Triggering events are defined as 'Delete', 'Create', 'Update' (see Common action event).

  • The Validating rule performs a Typprüfung on the overall class 'Interface > Users' so that event actions are performed only for Users and Guest users.

  • At runtime, the E-Mail event action receives the account to which the triggering event refers as input value. Its data is therefore also available for the value resolvers defined in the configuration:

    • In the Subject parameter, this concerns the Number range value value resolver, which refers to the specially created Number range type 'Account Transaction' (ACCOUNT_TRANSACTION) as shown in the image.

    • The same data could be used further on for configurations for the Mail body builder or for defining an attachment for the mail. Details of this are not relevant in the present example.

The Subject for the e-mail is completely defined here by configuring a number range with the Number range type 'Account Transaction'. This contains 5 number parts as shown in the screenshot below:

  • The first is of the Dynamic (Number part) type and defines an incrementally ascending sequence number with a value range of 1 – 999,999, represented with leading zeros so that e-mails can be sorted by Subject, if necessary, to track 'Account Transactions' chronologically.

  • This is followed by a number part of the Fixed (Number part) type, which inserts an underscore as a separator.

  • This is followed by a number part of the Wert über Resolver (Nummernteil) type with the description 'Event', which sets the identification letter 'C', 'U' or 'D'.
    This enables a concatenation of the Triggering event value resolver, which is not visible in the image, with a Substring value resolver, which only takes the first character from the internal name of the event.

  • This is followed by a number part of the Fixed (Number part) type, which inserts an underscore as a separator.

  • The final part is another number part of the Wert über Resolver (Nummernteil) type, which (see image) reads the internal class name from the variable entityClass and replaces all text characters up to the last full stop with nothing via the concatenated Replace text value resolver (i.e. 'removes' the namespace part of the class name). What remains is the internal name of the class (here: 'User' or 'GuestUser'), which should suffice for the Subject.

images/download/attachments/78256065/image2022-8-26_16-14-45-version-1-modificationdate-1661523285775-api-v2.png

images/download/attachments/78256065/image2022-8-26_16-17-30-version-1-modificationdate-1661523450814-api-v2.png