Discussion:
[Erp5-dev] Interaction workflows - for new and copied objects
Łukasz K. Nowak
2007-05-30 15:04:57 UTC
Permalink
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
- 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.

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?

Thanks in advance,
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...''
Romain Courteaud
2007-05-30 16:29:50 UTC
Permalink
Post by Łukasz K. Nowak
Hello,
Hello,
Post by Łukasz K. Nowak
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 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.
Post by Łukasz K. Nowak
- 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.
Post by Łukasz K. Nowak
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.

Regards,
Romain
Łukasz K. Nowak
2007-05-31 07:18:56 UTC
Permalink
Hello,

Dnia 30-05-2007, ?ro o godzinie 18:29 +0200, Romain Courteaud
Post by Łukasz K. Nowak
Post by Łukasz K. Nowak
Hello,
Hello,
Post by Łukasz K. Nowak
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 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.
Post by Łukasz K. Nowak
Post by Łukasz K. Nowak
- 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.
Post by Łukasz K. Nowak
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...''
Loading...