2013-08-21 1 views
0

У меня есть поток, который вызывает подпоток с необязательной входной переменной. Как я могу проверить subflow, если мой подпоток получил вход?Проверьте, есть ли подпоток ввода

Так что это может быть мой поток:

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

    <subflow-state id="withoutInput" subflow="ReportEinlesen" > 
    <transition on="ende" to="ReportUebersichtAnzeigen" /> 
</subflow-state> 

    <decision-state id="somecondition"> 
    <if test="some condition" then="withnput" else="ende" /> 
    </decision-state> 

    <subflow-state id="withInput" subflow="ReportEinlesen" > 
    <input name="Report" value="${Report.foo()}" /> 
    <transition on="ende" to="ReportUebersichtAnzeigen" /> 
    </subflow-state> 

<end-state id="ende" /> 
</flow> 

И это может быть мой Подпоток называется ReportEinlesen:

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

    <decision-state id="anothercondition"> 
    <if test="has this subflow got input?" then="ShowYourInput" else="ende" /> 
    </decision-state> 

<view-state id="ShowYourInput" > 
    <transition on="Seen" to="ende" /> 
</view-state> 

<end-state id="ende" /> 
</flow> 

ответ

0

Создайте метод делегата и передать входной переменной, а затем проверить, если это null или не