InProc Integration

Print Friendly, PDF & Email

◷ Reading Time: 3 minutes


Integration is as simple as:

  1. Referencing Runtime
  2. Using the RuntimeEngine type to load and execute logic (i.e., rules, flow, decision, NL, etc.)

Referencing Runtime

To reference FlexRule Runtime into your application you should be using NuGet package named FlexRule.Runtime in your application.

Please visit the below site for more information:

Referencing Runtime (old versions)

This is for legacy version of FlexRule Runtime. Please do not use this method for version 8.0 onward.

You need to reference the following core assemblies:

  • FlexRule.Core.Element.dll
  • FlexRule.Core.Library.dll
  • FlexRule.Engine.dll
  • FlexRule.Procedure.dll

Also, based on the type of logic you may need, one or more of the following assemblies:

  • FlexRule.Validation.dll: Validation, Decision, Natural Language
  • FlexRule.Decisions.dll: Decision table (This requires FlexRule.Validation.dll as well)
  • FlexRule.Flows.dll: Flow orchestration
  • FlexRule.Flows.Workflow.dll: Workflow (This requires FlexRule.Flows.dll as well)

Load and Execution

After referencing the required assembly in your application, executing logic in FlexRule requires two simple steps:

  1. Creating a Runtime Engine instance
  2. Calling the engine by providing values for input parameters (if required)

More details

Handling Exceptions

When you load and/or execute rules, you may face some exceptions. To get a complete understanding of the exception details, you can use ExceptionCenter

    // do stuff 
 catch(Exception ex) 
    string error = FlexRule.ExceptionCenter.GetExceptionString(ex); 
    // send this error when required

The error variable has details information of full rule execution stack trace.

Use Glossary

Business glossaries must be referenced as part of your rule execution if

  1. Running Decision table that has Term in its conditions instead of an expression
  2. Using Natural Language that uses a business glossary to introduce terms

More details

Modeling Logic

There are many different ways to model business logic (i.e., rules, decisions, flows, etc.). For more details please check Logic.

Updated on July 23, 2019

Was this article helpful?

Related Articles