[Zope-CMF] Workflow variables updating too many times
Dieter Maurer
dieter@handshake.de
Fri, 4 Jul 2003 21:07:14 +0200
Adam Fields wrote at 2003-7-1 18:18 -0400:
> I have a number of transitions set up. Some of them change the
> review_history variable (which is set to only update when a state or
> transition specifies a new value), as follows:
>
> review_history = state_change/getHistory
>
> Most of the time this seems to work fine, but when I "Publish", I get
> seven entries in the history for that action.
>
> Since the workflow is massively more complicated than I can express
> here, I guess my questions are:
>
> 1) where are the workflow variables updated?
I expect you are using "DCWorkflow".
In this case, the variables are updated in
"DCWorkflow.DCWorkflowDefinition._executeTransition"
in the block starting with "# Update variables".
> 2) has anyone seen anything like this?
I did not.
> Also, a related problem I'm seeing is that some objects with this
> workflow don't have workflow variables. It's possible that the objects
> were created without a workflow which was then applied - when are the
> workflow variables created?
I think variables stored in the status are also instantiated in
"_executeTransition". Usually, this is called during object
creation for the first time (to enter the initial state).
Dieter