Note that there are some explanatory texts on larger screens.

plurals
  1. POCheck if subflow has input
    text
    copied!<p>I have Flow which is calling a subflow with a not required input variable. How can I check in the subflow if my subflow has got input?</p> <p>So this could be my flow:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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 "&gt; &lt;subflow-state id="withoutInput" subflow="ReportEinlesen" &gt; &lt;transition on="ende" to="ReportUebersichtAnzeigen" /&gt; &lt;/subflow-state&gt; &lt;decision-state id="somecondition"&gt; &lt;if test="some condition" then="withnput" else="ende" /&gt; &lt;/decision-state&gt; &lt;subflow-state id="withInput" subflow="ReportEinlesen" &gt; &lt;input name="Report" value="${Report.foo()}" /&gt; &lt;transition on="ende" to="ReportUebersichtAnzeigen" /&gt; &lt;/subflow-state&gt; &lt;end-state id="ende" /&gt; &lt;/flow&gt; </code></pre> <p>And this could be my subflow called ReportEinlesen:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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 "&gt; &lt;decision-state id="anothercondition"&gt; &lt;if test="has this subflow got input?" then="ShowYourInput" else="ende" /&gt; &lt;/decision-state&gt; &lt;view-state id="ShowYourInput" &gt; &lt;transition on="Seen" to="ende" /&gt; &lt;/view-state&gt; &lt;end-state id="ende" /&gt; &lt;/flow&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload