1

I have an app that has a login/logout functionality. Upon logout, I am clearing the entity variable. How do I force the app to rerun the initial rule and display the login form?

jshakespear
  • 127
  • 5
  • Can you give a more specific example, perhaps with code? It's hard to give a good answer to your question as it stands. – Steve Nay Sep 22 '11 at 05:47

1 Answers1

1

You can have the initial rule run again by carefully crafting the select statement of the initial rule. Assuming that you are running the app in the browser, the initial rule fires on web pageview, and the logout click fires a custom logout web event, here is what I would do:

rule initial_rule {
    select when web pageview "awesome*Regex(here)" or web logout
    pre {
        // do cool stuff here
    }
    {
        // fire actions here
    }
    // postlude block of choice here
}
Mike Grace
  • 16,636
  • 8
  • 59
  • 79