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

2006-03-08 Thread Encolpe Degoute
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
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


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

2006-03-07 Thread Encolpe Degoute
Hi,
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.

It makes _exectuteTransition raising an error because _getWorkflowStateOf return
None.

The code of _executeTransition that gives me headaches:

old_sdef = self._getWorkflowStateOf(ob)
old_state = old_sdef.getId()

Regards,
-- 
Encolpe DEGOUTE
http://encolpe.degoute.free.fr/
Logiciels libres, hockey sur glace et autres activités cérébrales
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


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

2006-03-07 Thread Dieter Maurer
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.

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


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


-- 
Dieter
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests