Class: OpenWFE::AliasParticipant
- Inherits:
-
Object
- Object
- OpenWFE::AliasParticipant
- Includes:
- LocalParticipant
- Defined in:
- lib/openwfe/participants/participants.rb
Overview
Simply aliasing a participant.
engine.register_participant "toto" do |workitem|
workitem. = "toto was here"
end
engine.register_participant "user_.*", AliasParticipant.new("toto")
Workitems for participant whose name starts with ‘user_’ will be handled by participant ‘toto’. Note that you can’t use use a regex as the aliased name (“toto” in the example).
Instance Attribute Summary collapse
-
#aliased_name ⇒ Object
readonly
Returns the value of attribute aliased_name.
Attributes included from Contextual
Instance Method Summary collapse
- #consume(workitem) ⇒ Object
-
#initialize(aliased_name) ⇒ AliasParticipant
constructor
A new instance of AliasParticipant.
Methods included from LocalParticipant
#call_block, #get_flow_expression, #reply_to_engine
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(aliased_name) ⇒ AliasParticipant
Returns a new instance of AliasParticipant.
200 201 202 203 |
# File 'lib/openwfe/participants/participants.rb', line 200 def initialize (aliased_name) @aliased_name = aliased_name end |
Instance Attribute Details
#aliased_name ⇒ Object (readonly)
Returns the value of attribute aliased_name.
198 199 200 |
# File 'lib/openwfe/participants/participants.rb', line 198 def aliased_name @aliased_name end |
Instance Method Details
#consume(workitem) ⇒ Object
205 206 207 208 |
# File 'lib/openwfe/participants/participants.rb', line 205 def consume (workitem) get_participant_map.dispatch(nil, @aliased_name, workitem) end |