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)


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

def can_destroy?
  workflow.instances.empty?
end

#end?Boolean

Returns:

  • (Boolean)


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

def end?
  false
end

#input_or_join?Boolean

Returns:

  • (Boolean)


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

def input_or_join?
  input_arcs.size > 1
end

#input_sequence?Boolean

Returns:

  • (Boolean)


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

def input_sequence?
  input_arcs.size == 1
end

#output_implicit_or_split?Boolean

Returns:

  • (Boolean)


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

def output_implicit_or_split?
  output_arcs.size > 1
end

#output_sequence?Boolean

Returns:

  • (Boolean)


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

def output_sequence?
  output_arcs.size == 1
end

#start?Boolean

Returns:

  • (Boolean)


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

def start?
  false
end