Module: Reactor::Workflow::Base

Defined in:
lib/reactor/workflow.rb

Overview

This module provides support for Workflow actions and information querying.

Instance Method Summary collapse

Instance Method Details

#workflowObject

Returns instance of Standard (or Empty..) For the API See Reactor::Workflow::Standard



11
12
13
14
15
16
17
# File 'lib/reactor/workflow.rb', line 11

def workflow
  @workflow ||= if ((meta=RailsConnector::ObjectWithMetaData.find_by_object_id(self.obj_id)).workflow_name.present?)
    Standard.new(self,meta)
  else
    Empty.new(self)
  end
end

#workflow_commentsObject



19
20
21
# File 'lib/reactor/workflow.rb', line 19

def workflow_comments
  Reactor::Cm::LogEntry.where(:objectId => self.id).map {|entry| Comment.new(entry) }
end