Hi all,

I'm seeing some differences between adding objects using the adding
traverser and using createObject().  Specifically, workflow seems not
to get set up for the latter (all other factors the same).

This is what I'm using:

from zope.proxy import removeAllProxies
from zope.app.zapi import createObject

obj_name = 'foo'
my_factory = 'some.valid.factory.name'
newtask = removeAllProxies(createObject(my_factory))
task_container[obj_name] = newtask

This works fine except that the object produced by this method has no
workflow state. When I add the same type of object to the same
container manually (add menu) I get exactly what I'm expecting... an
object with the correct initial workflow state.

Is there any obvious difference between the adding traverser and
createObject that would explain the difference in results?  From what
I can tell,  it seems that both techniques just get a reference to
factory and call it.

Any ideas?

Many thanks in advance,

Zope3-users mailing list

Reply via email to