Martin Aspeli wrote:
yuppie-2 wrote:
If you write a new XML body to adapted.body the settings of the workflow are changed. The body is not stored as a string, it is stored as object tree. (So yes, the workflow is 'initialized' with the settings defined in the XML file.) If you modify the object tree TTW reading adapted.body will return the XML representation of the modified settings. XML body and object tree are just two different ways to look at and modify the same settings.

Right. I cringe slightly when writing to a property has side-effects beyond
just storing a value (possibly with some checks or transformations, of
course). In this case, it seems it does a lot more (changing portal_workflow
for this implementation), in which case I think a method like update() would
be more clear.

I also never liked this GS API and would never do something like that in my own code. Side effects should be more visible.


Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   [EMAIL PROTECTED]
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to