Class: Aidp::Temporal::Workflows::BaseWorkflow

Inherits:
Temporalio::Workflow::Definition
  • Object
show all
Defined in:
lib/aidp/temporal/workflows/base_workflow.rb

Overview

Base class for AIDP Temporal workflows Provides common patterns and utilities for workflow implementations

Constant Summary collapse

DEFAULT_ACTIVITY_OPTIONS =

Default activity options applied to all activities

{
  start_to_close_timeout: 600,    # 10 minutes
  heartbeat_timeout: 60,          # 1 minute
  retry_policy: {
    initial_interval: 1,
    backoff_coefficient: 2.0,
    maximum_interval: 60,
    maximum_attempts: 3
  }
}.freeze

Class Method Summary collapse

Class Method Details

.activity_options(overrides = {}) ⇒ Object

Helper to define activity with default options



30
31
32
# File 'lib/aidp/temporal/workflows/base_workflow.rb', line 30

def activity_options(overrides = {})
  DEFAULT_ACTIVITY_OPTIONS.merge(overrides)
end

.workflow_nameObject

Define workflow name from class name



25
26
27
# File 'lib/aidp/temporal/workflows/base_workflow.rb', line 25

def workflow_name
  name.split("::").last.gsub(/Workflow$/, "").gsub(/([A-Z])/) { "_#{$1.downcase}" }.sub(/^_/, "")
end