0

我正在尝试为我的项目配置多个流执行器,因为我需要一组“always-redirect-on-pause”属性为 false 且另一个为 true 的流。我曾尝试搜索、浏览 Spring Docs 但无法提出此配置。任何人都可以分享这些配置和/或直接访问一些相关资源吗?

谢谢

4

1 回答 1

2

您可以在项目 Spring 配置文件中有多个工作流(流程定义文件)位置注册

弹簧配置

    <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
    http://www.springframework.org/schema/webflow-config
    http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">

    <bean id="assetManagementService" />

    <bean id="savingsAssetService" />

    <bean id="handlerMapping">
        <property name="mappings">
            <value>/assetMgmtHomeView.htm=flowController</value>
        </property>
    </bean>

    <bean id="flowController">
        <property name="flowExecutor" ref="flowExecutor" />
    </bean>

    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
    </webflow:flow-executor>

    <webflow:flow-registry id="flowRegistry">
        <webflow:flow-location id="assetMgmtHomeView" path="/WEB-INF/flows/assetMgmtFlow.xml" />
        <webflow:flow-location id="savingsAssetViewFlow" path="/WEB-INF/flows/savingsAssetViewFlow.xml" />
    </webflow:flow-registry>

</beans>

如您所见,webflow:flow-registry包含两个工作流 xml 文件路径。请记住,这些位置注册具有用于区分工作流的不同ID 。

于 2013-06-24T11:02:38.440 回答