Route: Difference between revisions

From Grooper Wiki
Created page with "The '''Route''' activity in Grooper is a powerful tool for dynamically directing Batches or Batch Folders into specific Batch Processes based on their Content Type and other configurable rules. It enables flexible, rule-based workflow branching, allowing organizations to automate complex document processing scenarios with precision and control. == What is the Route Activity? == The Route activity evaluates the Content Type of each Batch or Bat..."
(No difference)

Revision as of 11:34, 29 July 2025

The Route activity in Grooper is a powerful tool for dynamically directing Batches or Batch Folders into specific Batch Processes based on their Content Type and other configurable rules. It enables flexible, rule-based workflow branching, allowing organizations to automate complex document processing scenarios with precision and control.

What is the Route Activity?

The Route activity evaluates the Content Type of each Batch or Batch Folder and applies the first matching routing rule from a user-defined list of Route Definitions. Each Route Definition specifies:

  • The Content Type to match
  • The destination Batch Process
  • Optional conditions using a boolean trigger expression
  • Whether to move or clone the item
  • Data transformation actions (if needed)
  • Whether to start the routed batch paused

This design allows for highly granular control over how documents and batches are dispatched into downstream workflows, supporting both simple and advanced routing scenarios.

What is the Route Activity For?

The Route activity is used to automate the decision-making process for workflow routing in Grooper. Common use cases include:

  • Batch-Level Routing: Direct entire batches to different processes after import or classification.
  • Folder-Level Routing: Route individual folders (documents) within a batch to specialized workflows, such as exception handling or parallel processing.
  • Post-Classification Routing: Send different document types (e.g., invoices, contracts) to their respective Batch Processes after classification.
  • Exception Handling: Route unclassified or exception documents to a dedicated process for manual review.
  • Parallel Processing: Clone documents or batches into multiple workflows for audit, export, or additional processing.

How is the Route Activity Used?

To use the Route activity:

  1. Add the Route activity to a Batch Process Step in your workflow.
  2. Configure the "Routes" property with one or more Route Definitions. Each definition should specify:
    • The Content Type to match (or leave blank for unclassified items)
    • The target Batch Process
    • Optional trigger expressions for advanced conditions
    • Whether to move or clone the item
    • Any data transformation actions needed when routing between different Content Types
    • Whether to start the routed batch paused for review
  3. Order your Route Definitions from most specific to most general, as only the first matching route is applied to each item.
  4. When the Route activity runs, it evaluates each item in scope (batch or folder), applies the first matching route, and moves or clones the item into the target process as configured.

Batch-Level Routing with Cloning Disabled

When routing at the batch level and cloning is disabled, the Route activity leverages the routing functionality of the Batch object. The batch is moved to the target folder, and its routing properties are set to indicate the new process and step. The batch remains in its current state until routing is applied (typically when the batch is resumed or a routing command is executed), enabling seamless workflow transitions without unnecessary data movement.

Data Transformation During Routing

If routing between different Content Types, you can define Data Actions to map, copy, or transform data fields as part of the routing process. This is essential when the source and target types have different data models or require normalization.

Key Configuration Tips

  • Place more specific Route Definitions before general ones to ensure correct routing.
  • Use the "Clone" option to retain originals for compliance or parallel workflows.
  • Use the "Start Paused" option to allow for human review or additional configuration before processing.
  • The Route activity can operate on either Batches or Batch Folders, depending on the processing scope of the step.

How Route Differs from Spawn Batch

While both the Route and Spawn Batch activities are used to direct content into new or different workflows, they serve distinct purposes and operate differently.

  • Spawn Batch is primarily designed for splitting batches based on filtering criteria (such as MIME type, content type, or flag status), and then optionally launching the resulting batches into a process. Its focus is on dividing and distributing content, not on evaluating complex routing rules or conditions.
  • Route is purpose-built for workflow branching. It evaluates each batch or folder against a prioritized list of routing rules, which can include content type, custom conditions, and data transformation actions. Route is designed to automate decision-making and direct content into the correct process based on business logic.
Feature Route Activity Spawn Batch Activity
Purpose Directs batches or folders into specific batch processes based on content type and rules. Splits a batch into one or more new batches by selecting and moving/copying folders based on filters.
Granularity Can operate at the batch or folder level. Operates at the folder level within a batch.
Routing Logic Uses ordered Route Definitions with content type matching and optional trigger expressions. Uses filtering criteria (e.g., MIME type, content type, flag status) and spawn methods (Filter, EveryN, Random).
Action Moves or clones items into a target batch process; can apply data transformations. Copies, moves, or deletes folders; creates new batches and optionally launches them into a process.
Data Transformation Supports mapping or transforming data fields when routing between different content types. Does not perform data transformation; simply moves or copies folders.
Typical Use Cases Workflow branching, exception handling, post-classification routing, parallel processing. Splitting large batches, sampling, distributing work, or reorganizing batch content.

Summary

The Route activity is a flexible, rule-driven tool for automating workflow branching in Grooper. It enables organizations to direct content into the right processes based on document type, business rules, or custom logic, supporting advanced automation and process segmentation. In contrast, the Spawn Batch activity is focused on splitting and distributing batch content, without the rule-based routing or data transformation capabilities of Route.