Loops with Rules ?

Events happening in the community are now at Drupal community events on www.drupal.org.
Goofy2k's picture

Hi, I want to use rules to cycle through a number of nodes and produce derivatives of those.

I tried to implement a loop by defining a counter that is updated after every cycle. Then I want to call a rule set earlier in the sequence.

Now I get a notification that the specific rule is not invoked because of recursion prevention.

Is there a way to get around this?
Do I have to take special precautions in the transfer of variables ?
Is this simply something that can not be done with the current version of Rules?

I am a user/administrator and not a developer, so I try to build solutions from the UI.

Thanks
Fred

Comments

Loops with Rules ?

AlexisWilke's picture

Fred,

I think you need to create two rules. The outer loop and the one being executed. If that's possible...

Alexis Wilke

Loop with Rules?

Goofy2k's picture

Hi Alexis,

Thanks for your response.

I think I already did something like that. I call a rule set ('monotask') performing the task from inside an other rule set ("Nr2"). After returning to the original rule set I Then I want to make a jump to a rule set ("Nr1") that is before the calling rule set ("Nr2). This does not work.

I already prevented to call "Nr1" from inside "Nr1" to try to circumvent recursion protection, but apparently that is not sufficient. It looks like recursion protection is that good that it recognises my trick :-(.

I have read a lengthy thread about ways to incorporate looping in the code for version 2 of Rules. From that fact I conclude that looping might not me possible at all from the UI. But I don't know if I'm correct.

I probably have to wait for version 2 of Rules ?

Fred

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: