Making iRules Modular

Is there a way for one iRule to call another iRule, so that rules can be called conditionally in a structured manner?

Thanks,

David

This is not possible at present.

You can set the priority of events to control the order that they are fired.

Click here

You can also use global variables to “pass” information from one rule to another. So, the second rule in the chain could know whether to execute a section of code depending on what happend in the first event.

-Joe

Well, I suppose that’s one way to accomplish it somewhat. As Joe indicates, you can define multiple handlers for the same event. One of the handlers can terminate the rule event chain with the event disable command. However, this is really not the same thing as synthetic rule events. That is, the ability to raise an event from within a rule.