On Sun, Oct 20, 2013 at 04:44:56AM -0700, Idan Moyal wrote:
>
> According to this page:
>
http://ruote.rubyforge.org/part/engine_participant.html
> It is possible to launch workflows using the EngineParticipant.
>
> Is it possible to use the participant to launch workflows on the same
> engine?
Hello Idan,
well, you usually do that by simply using "subprocess" as in
```ruby
Ruote.define do
subprocess 'do_that_other_thing'
end
```
> If so, the example in the page describes how to pass Ruote::FsStorage info
> the the engine, can I use an existing Ruote::HashStorage instance?
No, there is currently no way to pass an existing Ruote::HashStorage. If you
need that, I can add it to master.
Another way, though:
you can set :engine to nil and that'll run the subprocess locally:
```ruby
Ruote.define do
subprocess 'do_this_other_thing', :engine => 'engine_x'
subprocess 'do_that_other_thing', :engine => nil
end
```
which is equivalent to:
```ruby
Ruote.define do
do_this_other_thing :engine => 'engine_x'
do_that_other_thing :engine => nil
end
```
which is equivalent to:
```ruby
Ruote.define do
do_this_other_thing :engine => 'engine_x'
do_that_other_thing
end
```
Perhaps you prefer to use:
```ruby
Ruote.define do
engine_x :pdef => 'do_this_other_thing'
engine_self :pdef => 'do_that_other_thing'
end
```
In that case, tell me and I'll add a way to pass an existing storage when
registering an engine participant.
Kind regards,
--
John Mettraux -
http://lambda.io/jmettraux