[Zope-CMF] [DCWorkflow]Problem with initial state

Encolpe Degoute encolpe at colpi.info
Wed Mar 8 16:02:33 EST 2006


Dieter Maurer a écrit :
> Encolpe Degoute wrote at 2006-3-7 20:33 +0100:
>> I found something funny yesterday that makes me spend some hours:
>> If you delete the state marked as initial state the variable initial_sate always
>> contains its id.
> 
> Any workflow needs an initial state.

Any workflow needs initial transitions.

> Thus, maybe, you should mark a new state as initial once you deleted
> the old one?

That time I forgot.

> In many cases, deleting state is not a good idea (at least not
> when there are objects in the deleted state).

If you rename a state you will have the same problem.
The method _executeTransition should test this case, at least to said the
value stored in self.initial_state is invalid.

Regards,
-- 
Encolpe DEGOUTE
http://encolpe.degoute.free.fr/
Logiciels libres, hockey sur glace et autres activités cérébrales


More information about the Zope-CMF mailing list