Class: ProcessEngine::Parser::UserTask
- Inherits:
-
XmlNode
- Object
- XmlNode
- ProcessEngine::Parser::UserTask
- Defined in:
- app/models/process_engine/parser/user_task.rb
Instance Method Summary collapse
- #assignee ⇒ Object
- #candidate_groups ⇒ Object
- #candidate_users ⇒ Object
- #extension_elements ⇒ Object
-
#initialize(element) ⇒ UserTask
constructor
A new instance of UserTask.
- #to_h ⇒ Object
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
#assignee ⇒ Object
11 12 13 |
# File 'app/models/process_engine/parser/user_task.rb', line 11 def assignee element["camunda:assignee"] end |
#candidate_groups ⇒ Object
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_users ⇒ Object
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_elements ⇒ Object
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_h ⇒ Object
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 |