Hey John.
Thanks for the reply.
>
> What do your participants look like ?
We have a mix of participants (local, storage). Most of them are
simple checks (on a record) and then setting some fields on the
workitem and moving on
>
> Have you tried to do
>
> engine.noisy = true
Thanks for the hint. I enabled it and it showed some interesting
stuff... for example, the first time it 'hangs' this is the output:
8 00 ap * 20110428-yasodode 6b001 0_0_0 {:wi=>["0_0_0!
6b001c52b99df796fd7819b333c20804!20110428-yasodode",
3], :t=>["cursor", {"if"=>"${${v:cursor_cond}}"}, [["participant",
{"${v:name}"=>nil, "timeout"=>"${v:timeout}"}, []], ["sequence",
{"unless"=>"${${v:success_cond}}"}, [["rewind", {}, []]]]]], :pi=>"0_0!
5e9093c406157357ed5f578a37b3244f!20110428-yasodode"}
9 00 ap * 20110428-yasodode d9108 0_0_0_0 {:wi=>["0_0_0_0!
d9108299d8b8f3c292a50d6c898ae602!20110428-yasodode",
4], :t=>["participant", {"${v:name}"=>nil, "timeout"=>"${v:timeout}"},
[]], :pi=>"0_0_0!6b001c52b99df796fd7819b333c20804!20110428-yasodode"}
0 00 di * 20110428-yasodode d9108 0_0_0_0
{"participant_name"=>"organization_picker",
"participant"=>["Ruote::StorageParticipant", {}], :wi=>["0_0_0_0!
d9108299d8b8f3c292a50d6c898ae602!20110428-yasodode", 5]}
Then it should be waiting for an organization to be picked #
features/step_definitions/workflow_steps.rb:111
1 00 dd * 20110428-yasodode d9108 0_0_0_0
{"participant_name"=>"organization_picker"}
^C
Exiting... Interrupt again to exit immediately.
When an organization is picked #
features/step_definitions/workflow_steps.rb:34
2 00 rc * 20110428-yasodode d9108 0_0_0_0
{"participant_name"=>"organization_picker",
"receiver"=>"Ruote::StorageParticipant", :wi=>["0_0_0_0!
d9108299d8b8f3c292a50d6c898ae602!20110428-yasodode", 3]}
I'm using cucumber for the tests, hence the Then / When steps in the
middle. Here are the implementations:
Then /^it should be waiting for an organization to be picked$/ do
wait_for_participant_and_resume :organization_picker
workitem.participant_name.should == "organization_picker"
end
When /^an organization is picked$/ do
wait_for_participant_and_resume :organization_picker
Command::OrganizationPicker.new(@doc, :organization_id =>
@organization.id).save
end
def wait_for_participant_and_resume(participant)
RuoteKit.engine.wait_for participant
RuoteKit.engine.resume @wfid, :anyway => true
end
So, what happens is that the Then steps succeeds in checking for the
correct position in the workflow, but it doesn't move on after that.
Is there a problem when I call the #wait_for on the same participant
multiple times?
>
> To determine if it's really hanging "while begin in some (random)
> participants".
>
> What does the stack trace look like when you interrupt the hanging worker ?
As you can see, I don't really get a stack trace because it's running
within cucumber.
>
> > Is there a way to manually
> > trigger the worker to move on?
>
> The worker's run method looks like
>
> def run
> step while @running
> end
>
> so you could do
>
> engine.worker.send(:step)
>
I tried this one instead of the #resume call, but it didn't help.
Thanks,
Tom
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en