Previous Topic

Next Topic

Book Contents

Book Index

About user-defined functions

Central Designer rules support simple expressions with no compound or flow-of-control statements. For complex calculations or decision making, rule expressions can reference functions. The Central Designer application provides predefined functions that are available in all studies and libraries.

Additionally, using a programming language such as C#, experienced programmers can create user-defined functions and make them available to Central Designer users for use in rules. The Central Designer application supports user-defined functions defined as public static methods in a .NET class, compiled into a .NET assembly.

Function overloading is supported in accordance with C# overloading rules. The C# compiler determines the function to call based on the best match of actual parameters with the formal parameters of the overloaded function definitions. Automatic type promotion and conversion is used when resolving a function call to the appropriate definition.

Rule designers can associate user-defined functions with libraries or studies by importing them in the Functions tab of a study or library. After a user-defined function has been imported into the study or library in which a user is working, or into a library in the Libraries List for a study, the function appears in the Functions tab in the Study Editor or Library Editor and in the References window of the Rule Wizard and related dialog boxes. From there, users can include the function in rule expression definitions.

When a deployment package is created, all assemblies containing user-defined functions used by the study are included in the deployment package.

In rule processing, a user-defined function is treated as a local method on the study object class.

Tips

Copyright © 2013 Oracle and/or its affiliates. All rights reserved.