Re: allowing content rules to be launched by other rules

"David Glick (Plone)" <david.glick-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.