On Wed, Sep 16, 2009 at 9:06 AM, Jordan Ritter <[email protected]> wrote:
>
> Howdy John,
>
>        Found a few issues, have a few questions.

Hello Jordan,

> Issues:
>
> (1) @dm_workitem_class isn't used inside of self.from_ruote_workitem
> et al., so even if you set the class differently it'll still invoke
> the default class.
>
>        - dm_participant.rb:76 - maybe should be self.first || self.new?
>        - same with search() I think

You are right :

  
http://github.com/jmettraux/ruote-dm/commit/afe6ff0581bcf6d24ecf500b573dfd5ba1f09738

Thanks a lot.

> (2) Figured out how to override wfidgen and errorjournal today (very
> easy!). in doing so though, I realized that the other subsystems rely
> on wfidgen's mkdir(work), so I have to manually mkdir(work).

Yes, you have to provide a #split method in your WfidGenerator
implementation. FsStorage for example uses it to determine its
subdirectories structure.


> (3) Docs bug for concurrent_iterator :times 
> (http://ruote.rubyforge.org/exp/concurrent_iterator.html
> ), example line 2  -- missing "do"

Well spotted. Fixed, thanks !


> Questions:
>
> (1) Can you explain the practical use for the inclusion of the word
> "engine" in the 'engine|wfid|expid' wfid/expid/etcs?

Was thinking of two completely different engines sharing the same
storage (not a very good idea perhaps) or simply 1 engine per
sub-organization and workitems zipping around. May help routing
workitems back to their origin engine.


> (2) Any idea why whenever I "return" from a block participant (due to
> a detected error condition usually), I get this sort of error (my own
> formatting, but you get the gist):
>        2009-09-15 13:20:08 ERROR </engine|20090911-bokishineki_44|
> 0_0_0_0_7_2_0_0_0> ThreadError: return can't jump across threads
> ({:workitem=>#<Ruote::Workitem:0x107500cc8 .... })

OK,

try to run that piece of Ruby code :

---8<---
Thread.new do
  return :nada
end.join
--->8---

Since block participant, by default, lets the engine wraps its consume
action in a Thread, that triggers your error.

For block participants, this style :

---8<---
engine.register_participant "toto" do
  if $something_is_wrong == false
    do_the_job
  end
end
--->8---

is OK, while, you've experienced the downfall with :

---8<---
engine.register_participant "toto" do
  return if $something_is_wrong
  do_the_job
end
--->8---

I learned that the hard way a couple of years ago. I know the pain. (I
love the short-circuit coding as well).


Best regards,

-- 
John Mettraux   -   http://jmettraux.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to