If you're on the managed package runtime with standard data model, Omnistudio automatically converts all custom functions in the user-defined syntax to the standard syntax when you switch to the Omnistudio standard runtime. For the custom data model, first use Omnistudio Migration Assistant (Pilot) to convert your records to the standard data model, then switch to the standard runtime to automatically convert the custom functions.
In the Omnistudio managed package runtime with a custom data model, custom functions are
written using a user-defined syntax, and are configured using Function
Definition custom metadata that references Apex classes and methods. The functions
are defined using this syntax:
functionName(args).
Here, functionName is the user-defined function name. Before migration,
custom functions are defined in custom metadata as Function Definition. The
ApexClassName and MethodName are part of the custom
metadata. For example, for a function REPL(targetString, replacementString),
the user-defined function name is REPL.
For more information, see Custom Functions.
To update the Omnistudio custom functions:
-
-
Review your existing custom functions:
-
- Locate all custom functions defined using the
Function Definitioncustom metadata, and check where they are used. For example, Data Mappers, Integration Procedures, and so on. - Note the user-defined syntax used in your formulas. For example,
REPL(targetString, replacementString).
- Locate all custom functions defined using the
-
-
- Validate Apex Class definitions:
- Ensure each function’s Apex class implements the
VlocityOpenInterface. - Confirm each method accepts expected arguments and returns output.
- Ensure each function’s Apex class implements the
- Run Omnistudio Migration Assistant to convert all component records to the standard data
model. Note Omnistudio Migration Assistant (Pilot) doesn't convert function references at this stage.
- After verifying your components are migrated and working on the standard data model, switch to Omnistudio standard runtime by disabling the Managed Package Runtime settings in your org.
This triggers an automatic conversion of your custom function syntax from:
Before (user-defined syntax): REPL(targetString, replacementString)
After (standard syntax):
FUNCTION("CustomStringFunctions", "REPLACE", targetString,
replacementString)
Here, CustomStringFunctions is the Apex class name and
REPLACE is the method name.