Class: Reactor::Cm::Workflow
- Inherits:
-
ObjectBase
- Object
- ObjectBase
- Reactor::Cm::Workflow
- Defined in:
- lib/reactor/cm/workflow.rb
Class Method Summary collapse
-
.create(name, edit_groups = []) ⇒ Object
Creates a workflow with given name.
- .serialize_attribute_to_xml(xml, xml_attribute, value) ⇒ Object
Methods inherited from ObjectBase
#base_name, base_name, #delete, #delete!, delete!, exists?, get, inherited, #initialize, #reload, #save, #save!, #serialize_attribute_to_xml, set_base_name
Constructor Details
This class inherits a constructor from Reactor::Cm::ObjectBase
Class Method Details
.create(name, edit_groups = []) ⇒ Object
Creates a workflow with given name. A list of edit groups may also be specified - otherwise it defaults to empty list
20 21 22 |
# File 'lib/reactor/cm/workflow.rb', line 20 def self.create(name, edit_groups = []) super(name, { name: name, editGroups: edit_groups }) end |
.serialize_attribute_to_xml(xml, xml_attribute, value) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/reactor/cm/workflow.rb', line 24 def self.serialize_attribute_to_xml(xml, xml_attribute, value) if xml_attribute.name.to_sym == :signatureDefs xml.tag!("signatureDefs") do (value || []).each do |hash| xml.tag!("listitem") do xml.tag!("listitem", hash[:attribute]) xml.tag!("listitem", hash[:group]) end end end else super(xml, xml_attribute, value) end end |