[PEAK] peak.events.activity

Andrew Svetlov andrew.svetlov at gmail.com
Sat Mar 7 23:47:59 EST 2009


According to Sergey Schetinin:
yield in activity.task context works in this way:
  1. if result is Pause - workflow switched to 'pause' state.
  2. if result is generator - this generator temorary replaces current
until child done.
  3. all another results propageted to current parent as 'yield return value'

It was obvious for me first two points but last one is not (ok, I
missed RETUN() in TaskCell._stepper in case of non-exception when
looked source code).
Current documentation has good examples of invoking subtasks and
getting result from 'some generator'.
Moreover, it says:
    If you are targeting Python 2.5 or higher, you don't need to do anything
    special to receive values yielded by subtasks, or to ensure that subtask
    exceptions are propagated.  You can receive return values using expressions
    like::
        result = yield someGenerator(someArgs)

But it's not obvious. Trivial additional example or modification
'sample of subtask calling' can help very well to describe task
workflow .
Of couse I already figure out this one but maybe future users of
trellis will have same problems.

Thank you.
BTW, metaifo in trellis package doesn't contain "maintainer" email
address, only "author".


More information about the PEAK mailing list