Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Expression Builder

Grooper

Foundation for all dynamic code expressions in Grooper, enabling configurable logic across a wide range of Grooper objects.

Remarks

Overview

Expression Builder is the core engine that powers all user-configurable code expressions in Grooper.
It provides the infrastructure for compiling, caching, and executing custom logic written in Visual Basic, allowing Grooper users to tailor system behavior to meet complex business requirements.

Code Expressions in Grooper

Code expressions are used throughout Grooper to implement customizable behavior in various objects. Here are a few examples:

  • Conditional execution in Batch Processes and IP Profiles:
    Control the flow of processing steps, activities, and image processing actions using custom conditions.
  • Field validations and calculations in Data Fields:
    Enforce data quality, perform calculations, and implement business rules for extracted data.
  • Data manipulation in Data Rules:
    Transform, map, or clean up metadata and extracted values using custom logic.
  • Mapping and transforming metadata during Export:
    Dynamically map Grooper data to external systems, formats, or file structures.

How It Works

When a Grooper object exposes a property that supports scripting, the expression or script entered by the user is compiled and managed by a specialized subclass of DynamicCodeFactory.
This process includes:

  1. Source Code Generation:
    The factory generates Visual Basic source code that wraps the user’s expression in a method or class structure.
  2. Compilation and Caching:
    The code is compiled into an in-memory assembly using the Roslyn compiler.
    Compiled assemblies are cached for performance and re-used when the same code is encountered again.
  3. Execution:
    The compiled code is invoked at runtime, allowing Grooper to evaluate conditions, perform calculations, or transform data as needed.

This approach ensures that all dynamic logic in Grooper is both efficient and secure, with full support for referencing Grooper objects, properties, and system resources.

Derived Types

There are 1 implementations of Expression Builder.

Data Model Compiler Compiles a Data Model into a dynamic .NET type, enabling strongly-typed access and advanced expression evaluation.
Notification