Rules-Driven Method Invocation (RDMI)

Previous Next

Rules-Driven Method Invocation adds interoperability to the Rules Engine by enabling method calls to programmed components. This way, the Rules Engine can be made to perform complex calculations that cannot be done in SQL, or to use external data sources for validations.

You call an RDMI component with an INVOKE statement or function call syntax.

INVOKE statement

The INVOKE keyword is a special, USoft-specific extension to the industry-standard SQL otherwise used to specify Rules Engine behaviour.

This help topic introduces the basic constructs. For details on INVOKE, go to Invoking components from a USoft application.

The syntax of the INVOKE statement is:

INVOKE component.method WITH
SELECT     ...
FROM       ...
WHERE      ...

In this construct, the SELECT output list is required. The FROM and WHERE clauses are optional.

As you can see, this allows interoperability between SELECT and INVOKE. The outcome of the SELECT query is passed as the input for INVOKE:

If a FROM clause is specified, the component is called as many times as there are rows in the result of the SELECT query: 0, 1 or more times.

If no FROM clause is specified, the component is called 1 time, and is passed the values in the SELECT list.

The INVOKE statement can appear in place of a top-level SELECT but also in place of a subquery SELECT.

Function call syntax

An alternative for the INVOKE call without FROM is so-called function call syntax.

SELECT component.method(

In function syntax component.method is an argument of the SELECT keyword. A FROM keyword does not appear.

Function call syntax may also be used in other places than in the SELECT output list, for example:

SELECT   ...
FROM     ...
WHERE    column = component.method( value(s) )



See also

Invoking components from a USoft application

Possible USoft contexts for INVOKE

When and how many times a component is invoked


RDMI Protocols

Using RDMI