Module: Oujoke::Workflow::InstanceMethods

Defined in:
lib/workflow.rb

Instance Method Summary collapse

Instance Method Details

#start(options = {}) ⇒ Object

Create businessprocess , with filled data then after-create will be notify MQ-queue that we have one new BP, witch should be performed



21
22
23
24
25
26
# File 'lib/workflow.rb', line 21

def start(options = {})
  #todo validation for main optons
    bp = options[:klass].new(:workflow_id => self.id , :_contact => options[:_contact], :raw_workflow => options[:data] , :invoice_id => options[:invoice_id])
    bp.current_state = "created_state"
    bp.save!
end