Sha256: 4896881742462c23d82ef791bbe6a1b687e3828ff0e04616a98c4de8defbbe9b

Contents?: true

Size: 731 Bytes

Versions: 8

Compression:

Stored size: 731 Bytes

Contents

require "reactor/workflow/standard"
require "reactor/workflow/empty"
require "reactor/workflow/comment"

module Reactor
  module Workflow
    # This module provides support for Workflow actions and information querying.
    module Base
      # Returns instance of Standard (or Empty..)
      # For the API See Reactor::Workflow::Standard
      def workflow
        @workflow ||=
          if (meta = RailsConnector::ObjectWithMetaData.find_by_object_id(obj_id)).workflow_name.present?
            Standard.new(self, meta)
          else
            Empty.new(self)
          end
      end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/workflow.rb
infopark_reactor-1.29.0 lib/reactor/workflow.rb
infopark_reactor-1.28.0 lib/reactor/workflow.rb
infopark_reactor-1.27.0.rc10 lib/reactor/workflow.rb
infopark_reactor-1.27.0.rc9 lib/reactor/workflow.rb
infopark_reactor-1.27.0.rc8 lib/reactor/workflow.rb
infopark_reactor-1.27.0.rc7 lib/reactor/workflow.rb
infopark_reactor-1.27.0.rc4 lib/reactor/workflow.rb