Class: Smith::Workflow::Graph::TransitionContract

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/smith/workflow/graph/transition_contract.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_transition(transition, identifiers:, definition_index:) ⇒ Object



32
33
34
35
# File 'lib/smith/workflow/graph/transition_contract.rb', line 32

def self.from_transition(transition, identifiers:, definition_index:)
  attributes = TransitionContractAttributes.new(transition, identifiers:).to_h
  new(**attributes, definition_index:).freeze
end

Instance Method Details

#deterministic?Boolean

Returns:

  • (Boolean)


37
# File 'lib/smith/workflow/graph/transition_contract.rb', line 37

def deterministic? = deterministic

#fanout?Boolean

Returns:

  • (Boolean)


39
# File 'lib/smith/workflow/graph/transition_contract.rb', line 39

def fanout? = !fanout_config.nil?

#nested?Boolean

Returns:

  • (Boolean)


41
# File 'lib/smith/workflow/graph/transition_contract.rb', line 41

def nested? = !workflow_class.nil?

#optimized?Boolean

Returns:

  • (Boolean)


40
# File 'lib/smith/workflow/graph/transition_contract.rb', line 40

def optimized? = !optimization_config.nil?

#orchestrated?Boolean

Returns:

  • (Boolean)


38
# File 'lib/smith/workflow/graph/transition_contract.rb', line 38

def orchestrated? = !orchestrator_config.nil?

#parallel?Boolean

Returns:

  • (Boolean)


43
# File 'lib/smith/workflow/graph/transition_contract.rb', line 43

def parallel? = parallel

#routed?Boolean

Returns:

  • (Boolean)


42
# File 'lib/smith/workflow/graph/transition_contract.rb', line 42

def routed? = !router_config.nil?