Rules-Driven Method Invocation (RDMI) - Rules-Driven Method Invocation (RDMI) |
Rules-Driven Method Invocation adds interoperability to the Rules Engine by enabling method calling to interact with external components. For example, to perform complex calculations that cannot be done in SQL, and to use external data sources for validations. In USoft Developer, you can invoke methods of external DCOM components by using the INVOKE keyword in SQL statements. INVOKE clauses call methods of external components by specifying a logical component name and a method name. This is referred to as Rules-Driven Method Invocation (RDMI). When the INVOKE ... WITH SELECT ... construction is used, SELECTed values of each fetched record are passed to the invoked component as parameters. The basic syntax of the INVOKE clause is: INVOKE <component>.<method> [WITH SELECT <column(s)> FROM <table(s)> [WHERE <conditions>] ] If the component returns one or more values, these return values will be treated by the USoft application as if they were the result of the original SELECT. For the application, it makes no difference whether an external component was used to produce the values. Method calls are closely integrated with the Rules Engine because the INVOKE clause can be used in constraint SQL statements. |