Class: Tasker::Types::StepTemplate

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/tasker/types/step_template.rb

Overview

StepTemplate defines the structure for workflow step templates

A step template provides the blueprint for creating specific workflow steps in a task's sequence. It defines the behavior, dependencies, and configuration for steps of a particular type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#custom_eventsArray<Hash> (readonly)

Returns Custom events that this step handler can publish.

Returns:

  • (Array<Hash>)

    Custom events that this step handler can publish



53
# File 'lib/tasker/types/step_template.rb', line 53

attribute :custom_events, Types.Array(Types::Hash).optional.default([].freeze)

#default_retry_limitInteger (readonly)

Returns The default maximum number of retry attempts.

Returns:

  • (Integer)

    The default maximum number of retry attempts



29
# File 'lib/tasker/types/step_template.rb', line 29

attribute :default_retry_limit, Types::Integer.default(3)

#default_retryableBoolean (readonly)

Returns Whether this step can be retried by default.

Returns:

  • (Boolean)

    Whether this step can be retried by default



25
# File 'lib/tasker/types/step_template.rb', line 25

attribute :default_retryable, Types::Bool.default(true)

#dependent_systemString (readonly)

Returns The system that this step depends on for execution.

Returns:

  • (String)

    The system that this step depends on for execution



13
# File 'lib/tasker/types/step_template.rb', line 13

attribute :dependent_system, Types::Strict::String

#depends_on_stepString? (readonly)

Returns Optional name of a step that must be completed before this one.

Returns:

  • (String, nil)

    Optional name of a step that must be completed before this one



45
# File 'lib/tasker/types/step_template.rb', line 45

attribute :depends_on_step, Types::String.optional.default(nil)

#depends_on_stepsArray<String> (readonly)

Returns Names of steps that must be completed before this one.

Returns:

  • (Array<String>)

    Names of steps that must be completed before this one



49
# File 'lib/tasker/types/step_template.rb', line 49

attribute :depends_on_steps, Types.Array(Types::String).default([].freeze)

#descriptionString (readonly)

Returns A human-readable description of what this step does.

Returns:

  • (String)

    A human-readable description of what this step does



21
# File 'lib/tasker/types/step_template.rb', line 21

attribute :description, Types::String

#handler_classClass (readonly)

Returns The class that implements the step's logic.

Returns:

  • (Class)

    The class that implements the step's logic



37
# File 'lib/tasker/types/step_template.rb', line 37

attribute :handler_class, Types::Class

#handler_configObject? (readonly)

Returns Optional configuration for the step handler.

Returns:

  • (Object, nil)

    Optional configuration for the step handler



41
# File 'lib/tasker/types/step_template.rb', line 41

attribute :handler_config, Types::Any.optional.default(nil)

#nameString (readonly)

Returns The name identifier for this step template.

Returns:

  • (String)

    The name identifier for this step template



17
# File 'lib/tasker/types/step_template.rb', line 17

attribute :name, Types::Strict::String

#skippableBoolean (readonly)

Returns Whether this step can be skipped in the workflow.

Returns:

  • (Boolean)

    Whether this step can be skipped in the workflow



33
# File 'lib/tasker/types/step_template.rb', line 33

attribute :skippable, Types::Bool.default(false)

Instance Method Details

#all_dependenciesArray<String>

Returns all dependency step names as a single array

Returns:

  • (Array<String>)

    All step dependencies



58
59
60
# File 'lib/tasker/types/step_template.rb', line 58

def all_dependencies
  [depends_on_step, *depends_on_steps].compact.uniq
end