Module: Oujoke::Workflow::InstanceMethods
- Defined in:
- lib/workflow.rb
Instance Method Summary collapse
-
#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.
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( = {}) #todo validation for main optons bp = [:klass].new(:workflow_id => self.id , :_contact => [:_contact], :raw_workflow => [:data] , :invoice_id => [:invoice_id]) bp.current_state = "created_state" bp.save! end |