Class: SpotFlow::Bpmn::ExtensionElements

Inherits:
Object
  • Object
show all
Defined in:
lib/spot_flow/bpmn/extension_elements.rb

Constant Summary collapse

VALID_EXTENSION_NAMESPACES =
%w[zeebe]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExtensionElements

Returns a new instance of ExtensionElements.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 10

def initialize(attributes = {})
  if attributes[:properties].present?
    @properties = HashWithIndifferentAccess.new
    Array.wrap(attributes[:properties][:property]).each { |property_moddle| @properties[property_moddle[:name]] = property_moddle[:value] }
  end

  @assignment_definition = Zeebe::AssignmentDefinition.new(attributes[:assignment_definition]) if attributes[:assignment_definition].present?
  @called_element = Zeebe::CalledElement.new(attributes[:called_element]) if attributes[:called_element].present?
  @called_decision = Zeebe::CalledDecision.new(attributes[:called_decision]) if attributes[:called_decision].present?
  @form_definition = Zeebe::FormDefinition.new(attributes[:form_definition]) if attributes[:form_definition].present?
  @io_mapping = Zeebe::IoMapping.new(attributes[:io_mapping]) if attributes[:io_mapping].present?
  @script = Zeebe::Script.new(attributes[:script]) if attributes[:script].present?
  @subscription = Zeebe::Subscription.new(attributes[:subscription]) if attributes[:subscription].present?
  @task_definition = Zeebe::TaskDefinition.new(attributes[:task_definition]) if attributes[:task_definition].present?
  @task_headers = Zeebe::TaskHeaders.new(attributes[:task_headers]) if attributes[:task_headers].present?
  @task_schedule = Zeebe::TaskSchedule.new(attributes[:task_schedule]) if attributes[:task_schedule].present?
end

Instance Attribute Details

#assignment_definitionObject

Returns the value of attribute assignment_definition.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def assignment_definition
  @assignment_definition
end

#called_decisionObject

Returns the value of attribute called_decision.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def called_decision
  @called_decision
end

#called_elementObject

Returns the value of attribute called_element.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def called_element
  @called_element
end

#form_definitionObject

Returns the value of attribute form_definition.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def form_definition
  @form_definition
end

#io_mappingObject

Returns the value of attribute io_mapping.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def io_mapping
  @io_mapping
end

#propertiesObject

Returns the value of attribute properties.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def properties
  @properties
end

#scriptObject

Returns the value of attribute script.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def script
  @script
end

#subscriptionObject

Returns the value of attribute subscription.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def subscription
  @subscription
end

#task_definitionObject

Returns the value of attribute task_definition.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def task_definition
  @task_definition
end

#task_headersObject

Returns the value of attribute task_headers.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def task_headers
  @task_headers
end

#task_scheduleObject

Returns the value of attribute task_schedule.



8
9
10
# File 'lib/spot_flow/bpmn/extension_elements.rb', line 8

def task_schedule
  @task_schedule
end