Class: ProcessEngine::Parser::UserTask

Inherits:
XmlNode
  • Object
show all
Defined in:
app/models/process_engine/parser/user_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ UserTask

Returns a new instance of UserTask.



2
3
4
# File 'app/models/process_engine/parser/user_task.rb', line 2

def initialize(element)
  super(element)
end

Instance Method Details

#assigneeObject



11
12
13
# File 'app/models/process_engine/parser/user_task.rb', line 11

def assignee
  element["camunda:assignee"]
end

#candidate_groupsObject



19
20
21
# File 'app/models/process_engine/parser/user_task.rb', line 19

def candidate_groups
  (element["camunda:candidateGroups"].try(:split, ",") || []).map(&:strip).select(&:present?)
end

#candidate_usersObject



15
16
17
# File 'app/models/process_engine/parser/user_task.rb', line 15

def candidate_users
  (element["camunda:candidateUsers"].try(:split, ",") || []).map(&:strip).select(&:present?)
end

#extension_elementsObject



6
7
8
9
# File 'app/models/process_engine/parser/user_task.rb', line 6

def extension_elements
  # support [executionListener], [taskListener], [formField], [property], inputs_outputs
  custom_extension_elements(:execution_listeners, :task_listeners, :form_fields, :properties, :inputs_outputs)
end

#to_hObject



23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/process_engine/parser/user_task.rb', line 23

def to_h
  custom_ext = custom_extension_elements_hash(:execution_listeners, :task_listeners, :form_fields, :properties, :inputs_outputs)

  super.merge({
    extension: {
      common: custom_ext,
      assignee: assignee,
      candidate_users: candidate_users,
      candidate_groups: candidate_groups
    }
  })
end