en en en en en en en en en en en en en en en en en en en en ca fa en en en en en en en en en en en en en en en en en en en en en en en en en en en en en pa en en en kn kn hi en en en en en en en en pt en en en en en en fr en sv fr fr en en en en en en en en en en
FlexRule Runtime SDK provides a very simple, plug-and-run library for loading and executing models. This approach covers many different options out of the box to support a wide range of scenarios:
Runner Command Handler is built on top of RuntimeEngine to provide ease of integration for complex scenarios. It provides the ability to:
Load models from Package or Individual files
Reuse (caching) of Runtime Engine
Write outputs of Notifications and Logs
Bind to a specific version of FlexRule Runtime
Load license files based on location or content
Runner Command Handler provides an abstraction layer on top of many components to make loading and executing models simpler.
An alternative approach is to create and use RuntimeEngine instances directly and handle everything related to instance management in your application’s code.
There are multiple different sets of commands that are available in Runner CommandHandler. These commands should be configured by your application code. For different tasks, your application should be using different commands.
Your licenses file will be required for executing a model. Therefore, the license’s content can be set using InitLicenseCommand .
Command RunLogicCommand allows you to load and run a model in different ways:
Individual files on computer file system
Package file on the computer file system
Package content (loaded from anywhere!)
Below are some basic properties that can be configured:
LogicContent: Packages content to load
Logic: package or model’s file path to load
Home: base folder and home when the list of logic documents are stored in a location
Extension: list of extensions to be registered and loaded during the execution. Each extension in this list is the name of the assembly.
InputValues: The values for input parameters
Runtime: the folder location that FlexRule Runtime assemblies can be found
Inspecting the Model Signature
Command LogicSignatureQueryloads the list of parameters from the model. The result will include:
Type of each parameter
The direction of each parameter
In some scenarios when a package is a reference for executing a model, it might be needed to understand what assemblies are included in the package. Command AssemblyListQuery will return the name and content of the assemblies included in the package as IDictionary .
A RuntimeEngineinstance is created for each request based on the Logic setting in RunLogicCommand. Each engine is checked to see if its performance can be improved. To remove an instance of RuntimeEnginefrom the cache, use RemoveRuntimeEngineCacheCommand.