Re: allowing content rules to be launched by other rules
Franco Pellegrini <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <CAP-H95YXOg=uvH9qG-eoe=oHyA0WrApgiZT0krBm_-PuDv9_yA@mail.gmail.com> |
I encountered the same issue in one of our projects, in which we needed to do exactly the same thing... ie. have one rule to execute another. I realized this restriction existed explicitly after reading the code, and then I thought on some of the scenarios that David describes here, and understood why such restriction existed. I think there is need for such functionality, but it will require a lot of work to check for loops, and for the UI to be very clear, so no extra complexity gets added as Andreas say... so I don't see it changing soon. However, if you need to go around it, check how Erico solved it in https://github.com/collective/sc.contentrules.groupbydate Regards, Franco On Mon, Jul 8, 2013 at 2:52 PM, David Glick (Plone) <david.glick-z4DKO/[email protected]>wrote: > On 7/7/13 1:11 PM, thomas desvenain wrote: > > Hi > > > > Today, a content rule can't be launched by an event triggered during > > the execution of an other rule. > > This avoids behavior unexpected for user an probably many errors. > > the 'rule_filter' ensures that. > > > > But I think that it could be useful that sometimes, a rule can be > > triggered from an other rule. > > > > for example : a rule that automatically 'publish' a content when it is > > added should trigger a rule that sends an email when a content is > > published. > > > > What do you think about an option on the rule, unselected by default, > > to allow the rule to be launched during an other rule ? > > > > I would be pleased to implement it, but I'd like to know about your > > opinion. > > > Sounds a bit dangerous, because of the potential to create loops (e.g. > one rule moves item from folder A to folder B, another rule moves it > back, etc...) > > Some ideas of how to mitigate that risk: > - Categorize rules that have an internal effect vs. external (i.e. > sending notifications) and only allow the latter to cascade > - Keep track of which rules have executed and don't allow a rule to > execute more than once per original rule invocation > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Plone-developers mailing list > Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/plone-developers > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers