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

Object Library

Node Grooper

A script project which compiles a .NET assembly containing custom objects, activities, commands, and other integrations for Grooper.

Remarks

An Object Library allows you to extend and customize Grooper by developing custom .NET assemblies. These libraries can introduce new Activities, Commands, methods, and services that integrate seamlessly with Grooper's processing and user interface.

Overview

  • Object Libraries are used to add custom logic, integrations, and automation to Grooper without modifying the core product.
  • Assemblies in an Object Library can define new Activity types for use in Batch Processes, custom Commands for user actions, and methods callable from expressions on Data Fields or Batch Process Steps.
  • Libraries can also implement background services that run on a schedule or in response to system events.
  • Object Libraries are typically managed as part of a Project and can be versioned, backed up, and restored.
  • Every time you save a script project in Visual Studio (using the GrooperSDK extension), an automated backup is created in Grooper.
  • The 'Maximum Backups' property controls how many backup copies of the library are retained.
  • Use the provided commands to create backups or rename the script namespace to match the node name.

Usage Scenarios

  • Custom Activities:
    Implement specialized processing steps that can be inserted into Batch Processes by inheriting a class from CodeActivity.
  • Custom Commands:
    Add new user actions available during Review or other interactive workflows by inheriting a class from ObjectCommand..
  • Custom Actions:
    Add new Data Actions which can be used in Grooper's Data Rules architecture by in inheriting from DataAction.
  • Background Services:
    Automate recurring or event-driven tasks in a custom Windows Service Instance by inheriting a class from TimerService.
  • Expression Methods:
    Provide reusable static methods that can be called from code expressions throughout Grooper.

Getting Started

  1. Install Prerequisites

    • Install Visual Studio (2019 or later recommended).
    • Install the GrooperSDK extension for Visual Studio.
  2. Create an Object Library

  3. Generate the Script Project

    • Select the Object Library node.
    • Navigate to the Scripting tab in the Grooper UI.
    • If no script project exists, use the "Create Script Project" button to generate a new script project for this library.
  4. Download the Script Project

    • In the Scripting tab, use the Download button to save the script project to a local directory on your machine.
  5. Open in Visual Studio

    • Open the downloaded project folder in Visual Studio.
    • If prompted, restore NuGet packages.
    • Ensure the GrooperSDK extension is enabled for full integration.
  6. Edit, Save, and Compile

    • Make your code changes in Visual Studio.
    • Use the GrooperSDK commands (Save, Save and Compile, Get Latest) to synchronize your changes with Grooper and manage backups automatically.

> For collaborative development, always use "Get Latest" before editing to avoid conflicts, and use "Save and Compile" to deploy changes back to Grooper.

Visual Studio Integration: GrooperSDK Extension

To develop or edit an Object Library, you must install the GrooperSDK Visual Studio extension. This extension provides seamless integration between Visual Studio and Grooper, enabling a streamlined development workflow.

Key Features:

  • Project Creation:
    Create new script projects directly from Grooper, pre-configured for use with the Grooper API.
  • Automated Backups:
    Every time you save a script project in Visual Studio (using the GrooperSDK extension), an automated backup is created in Grooper.
  • Compile and Deploy:
    Compile your script project and deploy the resulting assembly back to Grooper with a single command.
  • Synchronization:
    Keep your local project files and the Grooper repository in sync.

SDK Command Integration

The GrooperSDK extension provides the following commands in Visual Studio for working with Object Library script projects:

  • Save: Saves the current script project from Visual Studio back to Grooper, ensuring all changes are persisted and an automated backup is created.
  • Save and Compile: Saves the script project and then compiles it, updating the Grooper repository with the latest assembly. This streamlines the workflow for rapid development and testing.
  • Get Latest: Retrieves the latest version of the script project from Grooper, ensuring your local files are synchronized with the repository and reducing the risk of conflicts.

Best Practices

  • Organize custom code into logical libraries to promote reuse and maintainability.
  • Regularly back up your Object Library to prevent loss of customizations.

Properties

NameTypeDescription

Design Tabs

General View or edit properties of a node.
Reports View reports for a node.
Scripting Create, debug, modify, and compile scripts for scriptable nodes.
Advanced View or edit advanced details about a node.

Context Menu Commands

Command Shortcut Description
settings_backup_restore Create Backup Creates a backup of the script project.
drive_file_rename_outline Rename Script Renames the script project files and .NET namespace to match the current Object Library node name.
Notification