Predefined Methods

This section describes the pre-defined methods available per object. These pre-defined methods can be divided into two categories: methods that are available on all or many objects, called generic methods, and methods that are only available on particular objects, called specific methods.

Generic Methods

This section describes generic methods

getSystemProperty

Returns the value of the property with the passed key as input.

Availability

This method is available in the dynamic logic (Groovy script).

Parameters
In or Out Type Description

In

String

Key of the property

Out

String

Value of the property

lookUpFlexCode

Returns the flex code object that matches the input character string.

Availability

This method can be called without a base object.

Parameters
In / Out Type Description

In

String

Key value of the flexCode

In

String

Definition code of the flexCode

Out

flexCode

Flex Code

Example
person.dynamicFieldYesNoIndicator = lookUpFlexCode("YES", "YES_NO")

lookUpPerson

Looks up the Person in the system on the input parameters passed.

Availability

This method is available in the Dynamic Logic (Groovy script).

Parameters
In or Out Type Description

In

String

Code of the Person

Out

Person

Person

test

Executes a dynamic logic function in "unit test" mode:

  1. Runs under the security context for the dynamic logic to be tested

  2. The database transaction is set to "rollback only". No data can be persisted permanently.

    Availability

    This method is available in the Dynamic Logic (Groovy script).

    Parameters

In or Out

Type

Description

In

String

The code of the dynamic logic unit to be invoked (UUT, Unit Under Test)

In

Map<String,Object>

A map holding the parameters of the UUT

Out

DynamicLogicResult

This object holds the results of the UUT and optionally the Exception class if an error was thrown from the UUT. Attributes of this object are:

. "result" . "exception"

Example
def result = test( "SPECIAL_BENEFIT_SELECT", [
    "claim" : claim
])

Please refer to the Claims Developer Guide for the list of other available generic methods.

Search Methods

Please refer to the Claims Developer Guide for the list of available search methods.

Object Methods

In this section, the methods are described that are only available on specific objects. For each method, the following information is given:

  • The purpose of the method.

  • On which object(s) the method can be called.

  • Description of the parameters.

  • An example of the usage.

addBasket

Adds a basket to an authorization.

Availability

This method is available for Authorization. Its purpose is to have the possibility to add a basket through function dynamic logic:

Parameters
In or Out Type Description

In

String

Basket code. Mandatory

In

Date

Authorization basket start date. Mandatory

In

Date

Authorization basket end date. Optional

Example
authorization.addBasket("NAPPI_BASKET", authorization.startDate)

addMessage

Adds a message to an authorization.

Availability

This method is available for Authorization. Its purpose is to have the possibility to add a message through function dynamic logic:

Parameters
In / Out Type Description

In

String

Message code. Mandatory

In

Object[]

Message arguments. Optional

Example
def enrollmentResponseMessage = enrollmentResonseMessageList[0]authorization.addMessage(enrollmentResponseMessage.message.code, enrollmentResponseMessage.value0, enrollmentResponseMessage.value1)

getAttachedData

This method returns the data attached to the authorization in context; this is necessary because no relationship between attached authorization data and the authorization exists.

Availability

This method is available for object authorization.

Parameters
In or Out Type Description

Out

AttachedAuthorizationData

The data attached to the authorization

setDynamicField

The method sets the dynamic field to an object.

Availability

This method is available for all objects that support dynamic fields.

Parameters
In or Out Type Description

In

String

A usage name

In

Object

Structure of the dynamic field

Example

The following logic sets a time-valid field usage:

policy.setDynamicField("policyCoverage", new DynamicFieldPeriod(polCovRef.policyCoverage,polCovRef.startDate,polCovRef.endDate))
NOTE

The recommended way to use the dynamic field is mentioned in the Writing section.