Class: ProcessEngine::Parser::ScriptTask
- Inherits:
-
XmlNode
- Object
- XmlNode
- ProcessEngine::Parser::ScriptTask
- Defined in:
- app/models/process_engine/parser/script_task.rb
Instance Method Summary collapse
- #extension_elements ⇒ Object
-
#initialize(element) ⇒ ScriptTask
constructor
A new instance of ScriptTask.
- #resource ⇒ Object
- #script ⇒ Object
- #script_format ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(element) ⇒ ScriptTask
Returns a new instance of ScriptTask.
2 3 4 |
# File 'app/models/process_engine/parser/script_task.rb', line 2 def initialize(element) super(element) end |
Instance Method Details
#extension_elements ⇒ Object
18 19 20 21 |
# File 'app/models/process_engine/parser/script_task.rb', line 18 def extension_elements # support [executionListener], [property], inputs_outputs custom_extension_elements(:execution_listeners, :properties, :inputs_outputs) end |
#resource ⇒ Object
10 11 12 |
# File 'app/models/process_engine/parser/script_task.rb', line 10 def resource element["camunda:resource"] end |
#script ⇒ Object
14 15 16 |
# File 'app/models/process_engine/parser/script_task.rb', line 14 def script element.at_xpath("bpmn2:script").try(:content) end |
#script_format ⇒ Object
6 7 8 |
# File 'app/models/process_engine/parser/script_task.rb', line 6 def script_format element["scriptFormat"] end |
#to_h ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/models/process_engine/parser/script_task.rb', line 23 def to_h custom_ext = custom_extension_elements_hash(:execution_listeners, :properties, :inputs_outputs) super.merge({ extension: { common: custom_ext, script_format: script_format, resource: resource, script: script } }) end |