Created
November 3, 2010 21:47
-
-
Save MikeGrace/661784 to your computer and use it in GitHub Desktop.
Testing going into a loop without passing the loop count parameter. Everything worked as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruleset a60x412 { | |
meta { | |
name "test-non-passed-parameter" | |
description << | |
test-non-passed-parameter | |
>> | |
author "Mike Grace" | |
logging on | |
} | |
rule start { | |
select when pageview ".*" | |
{ | |
notify("getting started","Not passing count param") with sticky = true; | |
} | |
fired { | |
raise explicit event loopy; | |
} | |
} | |
rule loopy { | |
select when explicit loopy | |
pre { | |
loopCount = event:param("loopCount"); | |
} | |
if (loopCount < 5) then { | |
notify("Loopy!","loopCount: #{loopCount}") with sticky = true; | |
} | |
fired { | |
raise explicit event loopy | |
with loopCount = loopCount + 1; | |
} else { | |
raise explicit event loopy_bye_bye | |
} | |
} | |
rule loopy_bye_bye { | |
select when explicit loopy_bye_bye | |
{ | |
notify("All done!","That was fun. : )") with sticky = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment