title: Spring Webflow 2.4.2 missing start state
body: <p>I just started adding Webflow to a Spring MVC project and I'm getting this compile error on my flow.xml component:</p>
  
  <pre><code>Start state is missing. Add at least one state to the flow
  </code></pre>
  
  <p>I found an identical post on SO from a year ago: <a href="https://stackoverflow.com/questions/26222008">webflow.xsd - Start state is missing. Add at least one state to the flow</a>. 
  No one responded to this question but I found it in the Jira repository for Spring Webflow: <a href="https://jira.spring.io/browse/SWF-1646" rel="nofollow noreferrer">webflow.xsd - Start state is missing. Add at least one state to the flow</a>. It is marked as Cannot Reproduce.</p>
  
  <p>Here is an excerpt from my very simple webflow.xml.</p>
  
  <pre><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;on-start&gt;
          &lt;evaluate expression="recipeService.createRecipe(currentUser.name)" result="flowScope.recipe" /&gt;
      &lt;/on-start&gt;
  
      &lt;view-state id="basics" view="recipe/basics" model="recipe"&gt;
          &lt;transition on="proceed" to="ingredients"&gt;&lt;/transition&gt;
          &lt;transition on="cancel" to="cancel"&gt;&lt;/transition&gt;
      &lt;/view-state&gt;
  
      ... more states ...
  
      &lt;end-state id="end" view="recipe/end"/&gt;
      &lt;end-state id="cancel" view="recipe/end"/&gt;
  
      &lt;/flow&gt;
  </code></pre>
  
  <p>The documentation indicates that start-state is optional - the first view-state will be assumed to be the start.  If I change the spring-webflow-2.4.xsd to 2.0 the error goes away, but then I get a different error if I attempt to use validation-hints on any of the view-state entries. "Basic1" and "Basic2" in the example below are validation groups on the recipe model.</p>
  
  <pre><code>&lt;view-state id="basics" view="recipe/basics" model="recipe" validation-hints="'basic1,basic2'"&gt;
  </code></pre>
  
  <p>I'm using </p>
  
  <ul>
  <li>STS 3.6.4</li>
  <li>Spring 4.1.6.RELEASE</li>
  <li>Spring WebFlow 2.4.2.RELEASE</li>
  <li>Spring Security 4.0.2.RELEASE</li>
  <li>Java 1.7</li>
  <li>Hibernate 4.3.10.FINAL</li>
  </ul>
  
  <p>I'm using java-based config for everything, but I don't think that is where the problem lies unless I have a mismatch in the versions that Webflow 2.4.2 requires?  I can post my WebMvcConfig and WebFlowConfig or the pom.xml or any other info if that would help. </p>
  
  <p>Any assistance would be greatly appreciated. </p>
  
  <p><strong>EDIT #1: excerpts from java config</strong></p>
  
  <pre><code>    From WebFlowConfig.java: 
      @Bean
      public FlowDefinitionRegistry flowRegistry() {
          return getFlowDefinitionRegistryBuilder(flowBuilderServices())
              .setBasePath("/WEB-INF/views")
              .addFlowLocationPattern("/**/*-flow.xml")
              .build();               
      }
  
      From WebMvcConfig.java
      @Override
      public void addViewControllers(final ViewControllerRegistry registry) {
          super.addViewControllers(registry);
          registry.addViewController("/recipe/basics.htm");        
          registry.addViewController("/recipe/ingredients.htm");
          registry.addViewController("/recipe/instructions.htm");
          registry.addViewController("/recipe/optional.htm");
          registry.addViewController("/recipe/end.htm");
      }
  </code></pre>
  
  <p>Using 2.0 all of the pages are executed in the correct order.</p>
  
  <p><strong>EDIT #2</strong></p>
  
  <p>I forgot to mention that even with the 2.4 xsd compile error the webflow does get executed, same as in the post from a year ago. I also found this issue regarding STS: <a href="https://issuetracker.springsource.com/browse/STS-3295" rel="nofollow noreferrer">webflow config gives incorrect "Start state definition is missing." error</a>.  The indicated fix version is 3.3.0.M1 so I would assume (?) the fix is still included in STS 3.6.4.</p>