[Zope-CMF] scriptable type information and workflow

Dieter Maurer dieter at handshake.de
Tue Dec 9 14:23:21 EST 2003


Sune Brøndum Wøller wrote at 2003-12-8 21:17 +0100:
> ...
>> >The STI add script adds a document.
>> >I followed the todo :
>> >http://cmf.zope.org/Members/tseaver/how_tos/using_scriptable_type
>> _info/view
>> >,
>> >but i use invokeFactory instead:
>> >
>> >  container.invokeFactory('Document', id)
>> >  ob = getattr(container, id)
>>
>> But, this requests the creation of a "Document" instance and
>> not of your new type instance...
>> ...

>I just follow the tutorial.
>
>The result is that the object has
>meta_type 'Document'
>and portal_type 'myNewType'.
>This should be the way to use STI's.
>(Or what ? did I miss something ?)

A bit:

  "invokeFactory('Document', id)"
  creates a document -- with its workflow and the corresponding
  permissions.
  Later, the "portal_type" is changed. Its workflow
  would be made active, too, if there were one.

-- 
Dieter



More information about the Zope-CMF mailing list