Workflows and Rules

Overview

The Risk Workflow Management CLI provides tools for managing fraud detection workflows and rules. All commands follow the pattern canso workflows ...

Prerequisites

  • Set GRU_TOKEN environment variable for authentication

  • Valid JSON configuration files for workflow and rule creation/updates

Workflow Management Commands

List Workflows

# List all workflows
canso workflows list

# List only active workflows
canso workflows list --is_active=true

# Get specific workflow details
canso workflows list --workflow_name=<workflow-name>

Create Workflow

Sample workflow_config.json:

Update Workflow Status

Workflow status changes are tracked only in the control plane database. Future versions may implement rollouts in the data plane via ARGOCD.

Deploy Workflow

The following environment variable can be set using the --env_vars flag:

NOTE: By default, the feature store is connected to the deployed Redis instance along with the Helm chart.

Example:

Providing HPA Configuration

You can customize the Horizontal Pod Autoscaler (HPA) settings by providing your own configuration file with the --hpa_configs flag. Below is an example of what the configuration file look like:

Sample hpa_config.json:

To deploy a workflow with your custom HPA settings, use the following command:

If you don’t provide an HPA configuration file, the system will automatically use the default settings.

Rule Management Commands

List Rules

Available stages: REGISTERED, BACKTESTING, STAGING, PRODEXPERIMENT, LIVE

Create Rule

Sample rules_config.json:

Update Rule

Sample rule_def.json:

Common Fields

Rule Operators

  • AND: All sub-rules must pass

  • OR: At least one sub-rule must pass

Sub-Rule Operators

  • <: Less than

  • >: Greater than

  • ==: Equal to

  • !=: Not equal to

  • >=: Greater than or equal to

  • <=: Less than or equal to

Rule Stages

  1. REGISTERED: Initial state for new rules

  2. BACKTESTING: Under testing with historical data

  3. STAGING: Testing in non-production environment

  4. PRODEXPERIMENT: Limited production testing

  5. LIVE: Active in production

Status Values

  • ACTIVE: Rule/workflow is enabled

  • INACTIVE: Rule/workflow is disabled

  • DEPRECATED: Rule/workflow is no longer in use

Last updated

Was this helpful?