Class: OpenWFE::BaseHistory

Inherits:
Object
  • Object
show all
Includes:
FeiMixin, HistoryMixin
Defined in:
lib/openwfe/expool/history.rb

Overview

A base implementation for InMemoryHistory and FileHistory.

Direct Known Subclasses

FileHistory, InMemoryHistory

Instance Attribute Summary collapse

Attributes included from ServiceMixin

#service_name

Attributes included from Contextual

#application_context

Instance Method Summary collapse

Methods included from HistoryMixin

#service_init

Methods included from ServiceMixin

#service_init, #stop

Methods included from Contextual

#get_work_directory, #init_service, #lookup

Methods included from Logging

#ldebug, #ldebug_callstack, #lerror, #lfatal, #linfo, #llog, #lunknown, #lwarn

Methods included from OwfeServiceLocator

#get_engine, #get_error_journal, #get_expool, #get_expression_map, #get_expression_pool, #get_expression_storage, #get_expression_storages, #get_journal, #get_participant_map, #get_scheduler, #get_wfid_generator

Constructor Details

#initialize(service_name, application_context) ⇒ BaseHistory

Returns a new instance of BaseHistory.



79
80
81
82
83
84
# File 'lib/openwfe/expool/history.rb', line 79

def initialize (service_name, application_context)

    super()

    service_init(service_name, application_context)
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



77
78
79
# File 'lib/openwfe/expool/history.rb', line 77

def entries
  @entries
end

Instance Method Details

#log(event, *args) ⇒ Object



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/openwfe/expool/history.rb', line 86

def log (event, *args)

    return if event == :update
    return if event == :reschedule
    return if event == :stop

    msg = "#{Time.now.to_s} -- "

    msg << event.to_s

    if args.length > 0
        fei = extract_fei args[0]
        msg << " #{fei.to_s}"
    end

    #msg << " #{args[1].to_s}"      #    if args.length > 1

    @output << msg + "\n"
end