Static enumeration

See also: Any static enumeration

Resolver – Abstract

Purpose: Returns a statically determined static enumeration value from a static enumeration determined by the context.

images/download/attachments/128387106/image2023-1-11_11-8-41-version-1-modificationdate-1676010848810-api-v2.png

IMPORTANT◄ All resolvers for Static values ignore the input value. Within a resolver chain (see Verketteter Wertauflöser) this prevents the processing of all preceding resolvers (if any).

The Static enumeration resolver returns a statically determined static enumeration value from a static enumeration determined by the context.

It appears by default as a suggestion for value configurations when the context refers to one particular static enumeration.

Configuration

The Auswahlfeld/Combobox element allows static single selection for values from all static enumerations defined in Lobster Data Platform / Orchestration source code.

Its search function looks for matches between the text input and the enumeration value labels listed in the dropdown. The label contains the following components:

  • The localization for the static enumeration value, e.g. 'Process exception'.

  • The internal name of the static enumeration value, e.g. PROCESS_EXCEPTION

NOTE◄ Unlike the Any static enumeration resolver, the label omits the localization for the static enumeration specified by the context (here: 'Abort type').

images/download/attachments/128387106/image2023-1-11_11-11-3-version-1-modificationdate-1676010848807-api-v2.png

IMPORTANT◄ Unlike the Any static enumeration resolver, the Static enumeration resolver cannot be specifically added to a value configuration via a context menu. If an existing value configuration refers to a static enumeration value as a static value, then this automatically appears either as a Static enumeration resolver or as Any static enumeration resolver, depending on the possibly changing context in the configuration:

Scenario

Configuration

Static enumeration (here: 'Abort type') is uniquely defined by the context:


  • The left side of the Set value event action defines a Variable (myAbortType) as the target of the assignment, whose Class 'Abort type' (AbortType) specifies the static enumeration of the same name as the context for the value configuration of the compare value (right).

  • By default, the Static enumeration resolver automatically appears for the value configuration on the right, offering only enumeration values from the static enumeration 'AbortType' (AbortType) as options.

  • In the example, the value 'Suppress' (SUPPRESS) was selected as the 'Abort type'.

images/download/attachments/128387106/image2023-1-11_11-12-11-version-1-modificationdate-1676010848803-api-v2.png

▼ The appearance changes automatically depending on the selection for the Class of Variable (left) ▲

images/download/attachments/128387106/image2023-1-11_11-12-29-version-1-modificationdate-1676010848799-api-v2.png

Reference to the static enumeration is not (any longer) guaranteed after modification:


  • On the left side of the Set value event action, the selection for the Class parameter has been removed from the configuration for the Variable. The context for the value configuration of the compare value (right) no longer refers to a specific static enumeration.

  • Instead of the Static enumeration resolver, the Any static enumeration resolver appears immediately, recognizable by the appearance of the label, in which the localization for the enumeration name (here: 'Abort type') appears before the localization for the enumeration value.

  • If the Class 'Abort type' matching the enumeration value is selected on the left, the Static enumeration resolver appears again on the right (as above).

Example

An event handling triggered by the common events 'New' and 'Copy' (see Common action event) contains a block of 'Common actions' and a block of 'Specific actions for copy'. The latter should only be executed if 'Copy' (COPY) is present as a Triggering event.

Configuration:

The Triggering events selected are 'New' and 'Copy' (see Common action event).


The Validating rule refers to the common class 'Entity' via Check type.


The Action on passed rule are only partially expanded in the image:

  • An Execute with event action labeled 'Common actions' groups together all event actions that are to be executed independently of the triggering event.

  • The following If then else event action contains another Execute with event action in the then branch, which bundles all event actions that are to be executed exactly when the 'Copy' event has triggered event handling at runtime.

  • The condition is defined by an Entity property rule:

    • On the left side, the Triggering event resolver is concatenated with an Input object (type safe) resolver. Since only Triggering events of the 'Common' class (CommonActionEvent) are configured, the Triggering event resolver will surely return an event of this type. The Input object (type safe) resolver can therefore be used to declare the context 'Common' for the compare value (right).

    • Therefore, once the Equals compare type is selected, the 'matching' Static enumeration resolver for the static enumeration 'Common' is suggested on the right side. In the Combobox element, the event 'Copy' (COPY) can therefore be selected accurately.

images/download/attachments/128387106/image2023-1-11_11-15-14-version-1-modificationdate-1676010848788-api-v2.png

NOTE◄ If the concatenated Input object (type safe) resolver is removed from the configuration shown at the top right, then the Static enumeration resolver is automatically replaced by the Any static enumeration resolver.

As shown in the image on the right, its label now shows the name of the static enumeration ('Common') as a prefix before the event. This has no influence on the function of the event handling.

images/download/attachments/128387106/image2023-1-11_11-15-50-version-1-modificationdate-1676010848783-api-v2.png