簡體   English   中英

如何強制重新運行應用的初始規則?

[英]How do I force the rerun of the app's initial rule?

我有一個具有登錄/注銷功能的應用程序。 注銷后,我正在清除實體變量。 如何強制應用重新運行初始規則並顯示登錄表單?

您可以通過精心設計初始規則的select語句來再次運行初始規則。 假設您正在瀏覽器中運行該應用程序,則初始規則在網頁瀏覽量上觸發,而注銷單擊會觸發自定義注銷網絡事件,這就是我要做的:

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
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM