Worker on its own process can not find participants

19 views
Skip to first unread message

jordi

unread,
Jul 31, 2012, 2:38:52 AM7/31/12
to openwfe...@googlegroups.com

Hi,

I am trying to run a worker on its own process. 
I have a sinatra app where I am doing this:
  RuoteKit.engine = Ruote::Engine.new(
      Ruote::Sequel::Storage.new(DATABASE))


I then register the participants and workflows in this engine. 

On the other hand I have a Rake task like this:
 RuoteKit.run_worker Ruote::Sequel::Storage.new(DATABASE)


DATABASE is correct and the same constant (the rake file require the other file). 

When I run the app and in another terminal I run the rake task, I can start a workflow and I get its id, but when I call process on this id I get this error every time ( in status.errors message) :
NameError: uninitialized constant LowerCaseString

LowerCaseString is the name of the first participant of my workflow. 


On the other hand, if I call engine.participant_list on the Sinatra app , even after this error, I get:
/^lower_case_string$/ ==> LowerCaseString {}
and all my others participants.

When I run the worker in the same process it seems I do not have this problem. 
Any ideas of what I am doing wrong?

Hartog De Mik

unread,
Jul 31, 2012, 2:46:07 AM7/31/12
to openwfe...@googlegroups.com
2012/7/31 jordi <jca...@mdsol.com>:
Did you require the file that supplies LowerCaseString?


Kind regards,
Hartog.

jordi

unread,
Jul 31, 2012, 3:00:52 AM7/31/12
to openwfe...@googlegroups.com


Thank you. I was requiring but only in the sinatra app. I have to require also in the rakefile where I have the rack task. 
Now it seems to work. 
Thanks!
Reply all
Reply to author
Forward
0 new messages