[Zope-CMF] Workflow: Multiple Workflows per Object?

Chris Withers chrisw@nipltd.com
Fri, 04 Oct 2002 14:49:41 +0100


Shane Hathaway 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.

That feels counterintuitive bordering on a bug to me.
So, only one workflow action with a particular name will ever be executed?
What if the person developing one workflow isn't aware that the name he's used 
has been picked by another workflow?

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

erk ;-( So, I would do this transition in the 
workflow-without-an-automatic-transition?

>> 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.)

Zope 3? ;-)

cheers,

Chris


> 
> Shane
> 
>