[Zope-CMF] Workflow: Multiple Workflows per Object?
Shane Hathaway
shane@zope.com
Thu, 03 Oct 2002 09:23:46 -0400
Chris Withers wrote:
> What happens when or more workflows have transitions or variables with
> the same name?
Like Python base class lookup, it searches the workflow definitions in
the order you specify.
> In my case, on workflow has an automatic transition from its initial
> state to a second state. The other just had an initial state. The
> automatic transition never fired. Shane, what would you expect to happen
> here?
Automatic transitions are only a feature of DCWorkflow, not the workflow
tool, so DCWorkflow will never see the automatic transition unless you
kick the other workflow. In fact, I've been adding transitions called
"kick", set to "remain in the same state", for just this purpose. They
have no effect other than causing automatic transitions, if any are
pending, to fire.
Ok, it's a hack, but it it allows me to avoid overhauling CMF workflow
for now. :-)
>>> Indeed. But addign more hooks is even less appealing.
>>
>>
>> In this case a post-CMF-creation hook is quite legitimate.
>
>
> Hmmm... what if the STI just had the portal_type passed as an argument
> and the setPortalType machinery was made available as a method it could
> call?
I agree with Florent. There should be an event mechanism, and you
should register an event handler. (I think there is such a work in
progress somewhere.)
Shane