[Erp5-dev] Interaction workflows - for new and copied objects

Łukasz K. Nowak lukasz.nowak at ventis.com.pl
Thu May 31 09:18:56 CEST 2007


Hello,

Dnia 30-05-2007, śro o godzinie 18:29 +0200, Romain Courteaud
napisał(a):
> * ??ukasz K. Nowak [2007-05-30 17:04:57 +0200]:
> 
> > Hello,
> 
> Hello,
> 
> > I'm interested in using interaction workflows for new and copied
> > objects. I know, that I could use Init Script for portal type or create
> > manage_afterCopy in document, but it is unacceptable:
> >  - manage_afterCopy have to be done in Document class and I will never
> > modify low level documents - I had to revert all changes, due to drastic
> > document incompatibilities while upgrading
> 
> You can add an [PortalType|Document|Metatype]_afterClone script.
> This script will be called on pasted objects.

Ouch, great. I wasn't able to find it in documentation. Where this could
be on wiki?

Well. It is not working in my case. I wanted to invoke
interaction_workflow to be done after clone, so I've made it with
context.edit(), but it raises unauthorized exception - workflow script
is not able to edit object. Well, I'll have to create same functionality
outside of interaction_workflow script, it is acceptable.

> >  - it is not possible to export only Init Script definition to BT, and
> > exporting full portal type would be maintenance horror. Besides that,
> > init script is often defined in BT.
> 
> This is a limitation of the business template implementation currently.
> But this is how I use it for now personnaly.
> 
> > I tried to use manage_after{Add,Copy} in Trigger Method Id(s) in
> > interaction workflow, but it wasn't working.
> > 
> > Is it possible to achieve such mechanism using interaction workflow?
> 
> Did you configure the interaction workflow on the container level?
> I think manage_after{Add,Copy} is called on container, isn't it ?
> After that, I don't know if it will not have any side effect.

I was trying to catch Sale Order creation. So I've attached interaction
workflow to Sale Order portal type and Sale Order Module portal type to
functions [_]manage_after{Add,Clone} but none of this combination works.
Container for Sale Order is Sale Order Module, yes? That's how I do
understand it.

Thanks,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''





More information about the Erp5-dev mailing list