Hello Rashi,
welcome to the ruote mailing list.
Sorry for the confusion, this :override => false is available on the "master"
branch of ruote, not in the gem at version 2.2.0.
If I run this (https://gist.github.com/1594410) with the "master" branch:
---8<---
require 'rubygems'
require 'pp'
require 'ruote'
class ParticipantTest
include Ruote::LocalParticipant
def initialize(options)
@options = options
end
def on_workitem
p @options
reply
end
end
engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))
engine.register_participant(
:Test, ParticipantTest, 'source' => 'TestParticipant')
engine.register_participant(
:Test, ParticipantTest, 'source' => 'TestParticipant2', :override => false)
puts
pp engine.participant_list
puts
#engine.noisy = true
pdef = Ruote.define do
participant :Test
end
wfid = engine.launch(pdef)
engine.wait_for(wfid)
puts
--->8---
I get:
---8<---
[/^Test$/ ==> ParticipantTest {"source"=>"TestParticipant"},
/^Test$/ ==> ParticipantTest {"source"=>"TestParticipant2"}]
{"source"=>"TestParticipant"}
--->8---
(with 2.2.0 it outputs
---8<---
[/^Test$/ ==> ParticipantTest {"source"=>"TestParticipant2", "override"=>false}]
--->8---
and then complains because "on_workitem" is 2.3.0 and not 2.2.0, but the
point is that override is not known to 2.2.0 as the output tells.
Sorry again for the confusion, best regards,
--
John Mettraux - http://lambda.io/processi
Hello Rashi,
I'm sorry, there is no easy/straightforward way to do that with ruote 2.2.0.
Please note that with Bundler it's easy to use the latest version of ruote
(or any commit/tag).
I'm supposed to release 2.3.0 soon, but I'm struggling to find free time to
do it.
Do you really need to have the same name for the two different participants ?
It's a rather infrequent use case.
Best regards,