【问题标题】:Need to call three webflow states in parallel需要并行调用三个 webflow 状态
【发布时间】:2011-11-11 05:13:02
【问题描述】:

我们的应用程序面临严重的性能问题。当我们使用 webflow 时,我们需要向后端发送三个不同的请求,并且我们将它们一一发送,这会导致相当长的屏幕加载时间。

我们可以并行调用 webflow 的三个状态,以便我们能够并行发送三个请求到我们的后端吗?或者有什么方法可以加载我们的屏幕并稍后调用一两个方法?

我们需要从retrieveAccInsList 视图状态导航到accSummary 视图状态,但在这之间我需要向backenf 发送三个不同的请求,因为AccSumary 屏幕包含3 个合并的屏幕,所以我需要来自三个不同位置的数据。但这是必需的解决方案

<view-state id="retrieveAccInsList">
    <transition on="openAccount" to="detailForAccountAction">
        <set name="conversationScope.selectedAccount" value="reqSearchHandler.selectedAccIns" />
        <set name="reqSearchHandler.objectToRetrieveCd" value="'RequestSearch'" />
    </transition>
</view-state>

<action-state id="detailForAccountAction">
    <evaluate expression="accountDetail.getDetailsForAccount(ClientDetailRq)"
        result="flowScope.response">
        <attribute name="name" value="detailAccountResponse" />
    </evaluate>
    <transition on="detailAccountResponse.success" to="searchNoteAction" />
    <transition on="detailAccountResponse.error" to="retrieveAccInsList" />
</action-state>

<action-state id="searchNoteAction">
    <evaluate expression="certNotesHandler.searchForNotes()"
        result="flowScope.response">
        <attribute name="name" value="noteResponse" />
    </evaluate>
    <transition on="noteResponse.success" to="searchActivityAction" />
    <transition on="noteResponse.error" to="retrieveAccInsList" />
</action-state>

<action-state id="searchActivityAction">
    <set name="reqSearchHandler.requestStatus" value="'O'" />
    <set name="reqSearchHandler.objectToRetrieveCd" value="'RequestSearch'" />
    <evaluate expression="reqSearchHandler.setparam()" />
    <evaluate expression="reqSearchHandler.searchForRequest(ReqInquireRq)"
        result="flowScope.response">
        <attribute name="name" value="activtiyResponse" />
    </evaluate>
    <transition on="activtiyResponse.success" to="accSummary" />
    <transition on="activtiyResponse.error" to="retrieveAccInsList" />
</action-state

【问题讨论】:

    标签: spring spring-webflow


    【解决方案1】:

    当然;使用阿贾克斯。但如果没有更多细节,就很难说——为什么需要“并行”调用三个 webflow 状态?之所以称为“流”,是因为它们是线性的(至少在单个对话中;我知道您可以同时激活多个流)。

    【讨论】:

    • 谢谢..我刚刚把我的代码和原因放在上面。请查看并提出解决方案
    猜你喜欢
    • 2020-09-12
    • 1970-01-01
    • 2011-06-13
    • 1970-01-01
    • 2020-12-03
    • 2022-07-19
    • 1970-01-01
    • 2012-08-13
    • 2016-11-08
    相关资源
    最近更新 更多