Class: FlowCore::Place

Inherits:
ApplicationRecord show all
Defined in:
app/models/flow_core/place.rb

Direct Known Subclasses

EndPlace, StartPlace

Constant Summary collapse

FORBIDDEN_ATTRIBUTES =
i[workflow_id created_at updated_at].freeze

Instance Method Summary collapse

Instance Method Details

#can_destroy?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'app/models/flow_core/place.rb', line 48

def can_destroy?
  workflow.instances.empty?
end

#end?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'app/models/flow_core/place.rb', line 44

def end?
  false
end

#input_or_join?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'app/models/flow_core/place.rb', line 28

def input_or_join?
  input_arcs.size > 1
end

#input_sequence?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/flow_core/place.rb', line 32

def input_sequence?
  input_arcs.size == 1
end

#output_implicit_or_split?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/flow_core/place.rb', line 24

def output_implicit_or_split?
  output_arcs.size > 1
end

#output_sequence?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/models/flow_core/place.rb', line 36

def output_sequence?
  output_arcs.size == 1
end

#start?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'app/models/flow_core/place.rb', line 40

def start?
  false
end