changeset 337:a887074460b6

Last Step of the Refactoring Work on the Transition Model. Splitted Businesslogic between States and Transitions. Splitted the ConfigurationElements of State and Transition in several XML-Fragments. gnv-artifacts/trunk@403 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 08 Dec 2009 13:38:21 +0000
parents 1b9ca0f2d498
children c94936b1f4ba
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml gnv-artifacts/doc/conf/products/timeseries/conf_timeseriespoint.xml gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml gnv-artifacts/doc/conf/products/verticalprofile/conf_mesh.xml gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/DefaultTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionFactory.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/ValueCompareTransition.java
diffstat 18 files changed, 779 insertions(+), 316 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Dec 08 13:38:21 2009 +0000
@@ -1,3 +1,26 @@
+2009-12-08  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/transition/profile:
+	  Removed empty needless package.
+	* src/main/java/de/intevation/gnv/transition/TransitionFactory.java:
+	  src/main/java/de/intevation/gnv/transition/ValueCompareTransition.java, 
+	  src/main/java/de/intevation/gnv/transition/TransitionBase.java, 
+	  src/main/java/de/intevation/gnv/transition/Transition.java,
+	  src/main/java/de/intevation/gnv/transition/DefaultTransition.java:
+	  The new Transitions which has the only job to provide the connectios between
+	  the different States and look if it is Possible to go the different Ways.
+	* src/main/java/de/intevation/gnv/state/StateBase.java,
+	  src/main/java/de/intevation/gnv/state/State.java: 
+	  Removed the Logic to descide which State is be reacable as next.
+	  Now the Transition configured in the Artifacts will do that according
+	  to the modified TransitionModel.
+	* src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java (transitions): 
+	  Added the Transitions to the Artifact and changed the Logic.
+	  Now the Transition is able to decide if it could be uses or not.
+	* doc/conf/products/verticalprofile/*.xml:
+	  Modified the Configuration. Splitted States and Transitions into 
+	  different XML-Fragments according to the modified Transitionmodel.
+
 2009-12-08  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* doc/conf/queries.properties: Added marker ('DATAID') for different data
--- a/gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,10 +6,6 @@
             <dataname>areaid</dataname>
             <data-multiselect>false</data-multiselect>
              <data-noselect>true</data-noselect>
-            <reachablestates>
-                   <state>horizontalcrosssection_subarea</state>
-                   <state>horizontalcrosssection_mesh_without_geom</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -17,13 +13,21 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="horizontalcrosssection_area"/>
+            <to state="horizontalcrosssection_subarea"/>
+            <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+        </transition>
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="horizontalcrosssection_area"/>
+            <to state="horizontalcrosssection_mesh_without_geom"/>
+            <condition inputvalue="areaid" value="n/n" operator="equal"/>
+        </transition>
+        
         <state id="horizontalcrosssection_subarea" description="horizontalcrosssection_area_one" state="de.intevation.gnv.state.DefaultState">
             <queryID>subarea_filter</queryID>
             <dataname>subareaid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>horizontalcrosssection_mesh</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -32,13 +36,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_subarea"/>
+            <to state="horizontalcrosssection_mesh"/>
+        </transition>
+        
         <state id="horizontalcrosssection_mesh_without_geom" description="horizontalcrosssection_mesh" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh</queryID>
             <dataname>meshid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>horizontalcrosssection_meshpoint_depth</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="subareaid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -47,13 +53,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_mesh_without_geom"/>
+            <to state="horizontalcrosssection_meshpoint_depth"/>
+        </transition>
+        
         <state id="horizontalcrosssection_mesh" description="horizontalcrosssection_mesh" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh_with_area</queryID>
             <dataname>meshid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>horizontalcrosssection_meshpoint_depth</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="subareaid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -62,27 +70,31 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_mesh"/>
+            <to state="horizontalcrosssection_meshpoint_depth"/>
+        </transition>
+        
         <state id="horizontalcrosssection_meshpoint_depth" description="horizontalcrosssection_meshpoint_depth" state="de.intevation.gnv.state.DefaultState">
             <queryID>horizontalcrosssection_meshpoint_depth</queryID>
             <dataname>depthid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>horizontalcrosssection_meshpoint_parameter</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                  <inputvalue name="depthid" type="Integer" multiselect="false" usedinquery="0"/>
             </inputvalues>
         </state>
-
+        
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_meshpoint_depth"/>
+            <to state="horizontalcrosssection_meshpoint_parameter"/>
+        </transition>
+        
         <state id="horizontalcrosssection_meshpoint_parameter" description="horizontalcrosssection_meshpoint_parameter" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh_parameter</queryID>
             <dataname>parameterid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>horizontalcrosssection_mesh_date</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="depthid" type="Integer" multiselect="false" usedinquery="0"/>
@@ -91,13 +103,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_meshpoint_parameter"/>
+            <to state="horizontalcrosssection_mesh_date"/>
+        </transition>
+        
         <state id="horizontalcrosssection_mesh_date" description="horizontalcrosssection_mesh_date" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalcrosssection_mesh_date</queryID>
            <dataname>dateid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                <state>horizontalcrosssection_mesh_calculate_results</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="depthid" type="Integer" multiselect="false" usedinquery="0"/>
@@ -107,6 +121,11 @@
            </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="horizontalcrosssection_mesh_date"/>
+            <to state="horizontalcrosssection_mesh_calculate_results"/>
+        </transition>
+        
         <state id="horizontalcrosssection_mesh_calculate_results" description="horizontalcrosssection_mesh_calculate_results" state="de.intevation.gnv.state.profile.horizontalcrosssection.HorizontalCrossSectionMeshOutputState">
             <queryID>horizontalcrosssection_mesh_data</queryID>
             <queryID-odv>horizontalcrosssection_mesh_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,10 +6,6 @@
             <dataname>areaid</dataname>
             <data-multiselect>false</data-multiselect>
              <data-noselect>true</data-noselect>
-            <reachablestates>
-                   <state>horizontalprofile_instantaneouspoint_subarea</state>
-                   <state>horizontalprofile_instantaneouspoint_vehicle_without_geom</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -17,13 +13,21 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="horizontalprofile_instantaneouspoint_area"/>
+            <to state="horizontalprofile_instantaneouspoint_subarea"/>
+            <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+        </transition>
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="horizontalprofile_instantaneouspoint_area"/>
+            <to state="horizontalprofile_instantaneouspoint_vehicle_without_geom"/>
+            <condition inputvalue="areaid" value="n/n" operator="equal"/>
+        </transition>
+        
         <state id="horizontalprofile_instantaneouspoint_subarea" description="horizontalprofile_instantaneouspoint_subarea" state="de.intevation.gnv.state.DefaultState">
             <queryID>subarea_filter</queryID>
             <dataname>subareaid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>horizontalprofile_instantaneouspoint_vehicle</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -31,15 +35,17 @@
                 <inputvalue name="subareaid" type="Integer" multiselect="false" usedinquery="0"/>
             </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_subarea"/>
+           <to state="horizontalprofile_instantaneouspoint_vehicle"/>
+       </transition>
         
         <!-- Anfang Sonderfall Ablaufsteuerung mit Anwendung des Gebietsfilters  -->
        <state id="horizontalprofile_instantaneouspoint_vehicle" description="horizontalprofile_instantaneouspoint_vehicle" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_vehicle_with_area</queryID>
            <dataname>vehicleid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-               <state>horizontalprofile_instantaneouspoint_cruise_with_area</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -47,13 +53,16 @@
                <inputvalue name="vehicleid" type="Integer" multiselect="false" usedinquery="0"/>
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_vehicle"/>
+           <to state="horizontalprofile_instantaneouspoint_cruise_with_area"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_cruise_with_area" description="horizontalprofile_instantaneouspoint_cruise_with_area" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_cruise_with_area</queryID>
            <dataname>cruiseid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_track_with_area</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false"/>
                <inputvalue name="vehicleid" type="Integer" multiselect="false"/>
@@ -62,13 +71,16 @@
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_cruise_with_area"/>
+           <to state="horizontalprofile_instantaneouspoint_track_with_area"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_track_with_area" description="horizontalprofile_instantaneouspoint_track_with_area" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_track_with_area</queryID>
            <dataname>trackid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_surveyinfo</state>
-           </reachablestates>Eisklimatologie
            <inputvalues>
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="1" />
                <inputvalue name="subareaid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -76,6 +88,11 @@
                <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_track_with_area"/>
+           <to state="horizontalprofile_instantaneouspoint_surveyinfo"/>
+       </transition>
        <!-- Ende Sonderfall Ablaufsteuerung mit Anwendung des Gebietsfilters  -->
        
        <state id="horizontalprofile_instantaneouspoint_vehicle_without_geom" description="horizontalprofile_instantaneouspoint_vehicle_without_geom" state="de.intevation.gnv.state.DefaultState">
@@ -92,13 +109,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_vehicle_without_geom"/>
+           <to state="horizontalprofile_instantaneouspoint_cruise"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_cruise" description="horizontalprofile_instantaneouspoint_cruise" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_cruise</queryID>
            <dataname>cruiseid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_track</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="vehicleid" type="Integer" multiselect="false"/>
                <inputvalue name="sourceid" type="Integer" multiselect="false"/>
@@ -106,26 +125,32 @@
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_cruise"/>
+           <to state="horizontalprofile_instantaneouspoint_track"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_track" description="horizontalprofile_instantaneouspoint_track" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_track</queryID>
            <dataname>trackid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_surveyinfo</state>
-           </reachablestates>Eisklimatologie
            <inputvalues>
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="1" />
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_track"/>
+           <to state="horizontalprofile_instantaneouspoint_surveyinfo"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_surveyinfo" description="horizontalprofile_instantaneouspoint_surveyinfo" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_surveyinfo</queryID>
            <dataname>surveyid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_parameter</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" />
                <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="1" />
@@ -133,13 +158,16 @@
                <inputvalue name="surveyid" type="Integer" multiselect="false" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_surveyinfo"/>
+           <to state="horizontalprofile_instantaneouspoint_parameter"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_parameter" description="horizontalprofile_instantaneouspoint_parameter" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_parameter</queryID>
            <dataname>parameterid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_depth</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" />
                <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="0" />
@@ -148,13 +176,16 @@
                <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_parameter"/>
+           <to state="horizontalprofile_instantaneouspoint_depth"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_depth" description="horizontalprofile_instantaneouspoint_depth" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_instantaneouspoint_depth</queryID>
            <dataname>measurementid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_instantaneouspoint_calculate_results</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" />
                <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="0" />
@@ -164,6 +195,12 @@
                <inputvalue name="measurementid" type="Double" multiselect="true" usedinquery="0" />
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_instantaneouspoint_depth"/>
+           <to state="horizontalprofile_instantaneouspoint_calculate_results"/>
+       </transition>
+       
        <state id="horizontalprofile_instantaneouspoint_calculate_results" description="horizontalprofile_instantaneouspoint_calculate_results" state="de.intevation.gnv.state.profile.horizontal.HorizontalProfileOutputState">
            <queryID>horizontalprofile_instantaneouspoint_chart_data</queryID>
            <queryID-odv>horizontalprofile_instantaneouspoint_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,23 +6,28 @@
                <dataname>areaid</dataname>
                <data-multiselect>false</data-multiselect>
                 <data-noselect>true</data-noselect>
-               <reachablestates>
-                      <state>horizontalprofile_mesh_subarea</state>
-                      <state>horizontalprofile_mesh_without_geom</state>
-               </reachablestates>
                <inputvalues>
                    <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                    <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                    <inputvalue name="areaid" type="Integer" multiselect="false" usedinquery="0"/>
                </inputvalues>
           </state>
+          
+          <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+              <from state="horizontalprofile_mesh_area"/>
+              <to state="horizontalprofile_mesh_subarea"/>
+              <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+          </transition>
+          <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+              <from state="horizontalprofile_mesh_area"/>
+              <to state="horizontalprofile_mesh_without_geom"/>
+              <condition inputvalue="areaid" value="n/n" operator="equal"/>
+          </transition>
+        
           <state id="horizontalprofile_mesh_subarea" description="horizontalprofile_mesh_subaera" state="de.intevation.gnv.state.DefaultState">
                <queryID>subarea_filter</queryID>
                <dataname>subareaid</dataname>
                <data-multiselect>false</data-multiselect>
-               <reachablestates>
-                      <state>horizontalprofile_mesh</state>
-               </reachablestates>
                <inputvalues>
                    <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                    <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -31,27 +36,31 @@
                </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+             <from state="horizontalprofile_mesh_subarea"/>
+             <to state="horizontalprofile_mesh"/>
+         </transition>
+         
          <state id="horizontalprofile_mesh_without_geom" description="horizontalprofile_mesh_without_geom" state="de.intevation.gnv.state.DefaultState">
               <queryID>verticalprofile_mesh</queryID>
               <dataname>meshid</dataname>
               <data-multiselect>false</data-multiselect>
-              <reachablestates>
-                     <state>horizontalprofile_mesh_coordinate</state>
-              </reachablestates>
               <inputvalues>
                   <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                   <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="0"/>
               </inputvalues>
-          </state>
+         </state>
+          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+             <from state="horizontalprofile_mesh_without_geom"/>
+             <to state="horizontalprofile_mesh_coordinate"/>
+         </transition>
           
         <state id="horizontalprofile_mesh" description="horizontalprofile_mesh" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_with_area</queryID>
            <dataname>meshid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_mesh_coordinate</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -60,12 +69,14 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_mesh"/>
+           <to state="horizontalprofile_mesh_coordinate"/>
+       </transition>
+       
        <state id="horizontalprofile_mesh_coordinate" description="horizontalprofile_mesh_coordinate" state="de.intevation.gnv.state.SingleInputState">
            <dataname>mesh_coordinate</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>horizontalprofile_mesh_point</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -73,13 +84,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_mesh_coordinate"/>
+           <to state="horizontalprofile_mesh_point"/>
+       </transition>
+       
        <state id="horizontalprofile_mesh_point" description="horizontalprofile_mesh_point" state="de.intevation.gnv.state.CoordinateSelectionState">
            <queryID>verticalprofile_mesh_point</queryID>
            <dataname>mesh_point</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-               <state>horizontalprofile_mesh_axis</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false"/>
                 <inputvalue name="mesh_coordinate" type="Coordinate" multiselect="false"/>
@@ -87,12 +100,15 @@
                 <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
            </inputvalues>
        </state>
-        <state id="horizontalprofile_mesh_axis" description="horizontalprofile_mesh_point" state="de.intevation.gnv.state.profile.horizontal.NorthSouthEastWestState">
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_mesh_point"/>
+           <to state="horizontalprofile_mesh_axis"/>
+       </transition>
+       
+       <state id="horizontalprofile_mesh_axis" description="horizontalprofile_mesh_point" state="de.intevation.gnv.state.profile.horizontal.NorthSouthEastWestState">
           <dataname>axisid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-               <state>horizontalprofile_meshpoint_parameter</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false"/>
                 <inputvalue name="mesh_point" type="Integer" multiselect="false"/>
@@ -100,13 +116,16 @@
                 <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="0"/>
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_mesh_axis"/>
+           <to state="horizontalprofile_meshpoint_parameter"/>
+       </transition>
+       
        <state id="horizontalprofile_meshpoint_parameter" description="horizontalprofile_meshpoint_parameter" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_parameter</queryID>
            <dataname>parameterid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-               <state>horizontalprofile_meshpoint_depth</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -116,14 +135,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_meshpoint_parameter"/>
+           <to state="horizontalprofile_meshpoint_depth"/>
+       </transition>
        
         <state id="horizontalprofile_meshpoint_depth" description="horizontalprofile_meshpoint_depth" state="de.intevation.gnv.state.DefaultState">
            <queryID>horizontalprofile_meshpoint_depth</queryID>
            <dataname>depthid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-               <state>horizontalprofile_mesh_date</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
@@ -134,13 +154,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_meshpoint_depth"/>
+           <to state="horizontalprofile_mesh_date"/>
+       </transition>
+       
        <state id="horizontalprofile_mesh_date" description="horizontalprofile_mesh_date" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_date</queryID>
            <dataname>dateid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-                <state>horizontalprofile_mesh_calculate_results</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -152,6 +174,11 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="horizontalprofile_mesh_date"/>
+           <to state="horizontalprofile_mesh_calculate_results"/>
+       </transition>
+       
        <state id="horizontalprofile_mesh_calculate_results" description="horizontalprofile_mesh_calculate_results" state="de.intevation.gnv.state.profile.horizontal.HorizontalProfileOutputState">
            <queryID>horizontalprofile_mesh_chart_data</queryID>
            <queryID-odv>horizontalprofile_mesh_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,23 +6,28 @@
             <dataname>areaid</dataname>
             <data-multiselect>false</data-multiselect>
              <data-noselect>true</data-noselect>
-            <reachablestates>
-                   <state>timeseries_mesh_subarea</state>
-                   <state>timeseries_mesh_without_geom</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                 <inputvalue name="areaid" type="Integer" multiselect="false" usedinquery="0"/>
             </inputvalues>
         </state>
+        
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="timeseries_mesh_area"/>
+            <to state="timeseries_mesh_subarea"/>
+            <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+        </transition>
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="timeseries_mesh_area"/>
+            <to state="timeseries_mesh_without_geom"/>
+            <condition inputvalue="areaid" value="n/n" operator="equal"/>
+        </transition>
+        
         <state id="timeseries_mesh_subarea" description="timeseries_mesh_subaera" state="de.intevation.gnv.state.DefaultState">
             <queryID>subarea_filter</queryID>
             <dataname>subareaid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>timeseries_mesh</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -31,27 +36,31 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_mesh_subarea"/>
+            <to state="timeseries_mesh"/>
+        </transition>
+        
          <state id="timeseries_mesh_without_geom" description="timeseries_mesh_without_geom" state="de.intevation.gnv.state.DefaultState">
              <queryID>verticalprofile_mesh</queryID>
              <dataname>meshid</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                    <state>timeseries_mesh_coordinate</state>
-             </reachablestates>
              <inputvalues>
                  <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="0"/>
              </inputvalues>
          </state>
+         
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_mesh_without_geom"/>
+            <to state="timeseries_mesh_coordinate"/>
+         </transition>
                 
         <state id="timeseries_mesh" description="timeseries_mesh" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh_with_area</queryID>
             <dataname>meshid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>timeseries_mesh_coordinate</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -60,12 +69,14 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_mesh"/>
+            <to state="timeseries_mesh_coordinate"/>
+         </transition>
+         
         <state id="timeseries_mesh_coordinate" description="timeseries_mesh_coordinate" state="de.intevation.gnv.state.SingleInputState">
             <dataname>mesh_coordinate</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>timeseries_meshpoint</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="0"/>
                  <inputvalue name="mesh_coordinate" type="Coordinate" multiselect="false" usedinquery="0"/>
@@ -73,13 +84,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_mesh_coordinate"/>
+            <to state="timeseries_meshpoint"/>
+         </transition>
+         
         <state id="timeseries_meshpoint" description="timeseries_meshpoint" state="de.intevation.gnv.state.CoordinateSelectionState">
             <queryID>timeseries_meshpoint</queryID>
             <dataname>mesh_point</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>timeseries_meshpoint_depth</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false"/>
                  <inputvalue name="mesh_coordinate" type="Coordinate" multiselect="false" usedinquery="1"/>
@@ -88,13 +101,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_meshpoint"/>
+            <to state="timeseries_meshpoint_depth"/>
+         </transition>
+         
         <state id="timeseries_meshpoint_depth" description="timeseries_meshpoint_depth" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_meshpoint_depth</queryID>
             <dataname>depthid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                <state>timeseries_meshpoint_parameter</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false"/>
                  <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
@@ -102,14 +117,16 @@
                  <inputvalue name="depthid" type="Integer" multiselect="false" usedinquery="0"/>
             </inputvalues>
         </state>
-
+        
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_meshpoint_depth"/>
+            <to state="timeseries_meshpoint_parameter"/>
+         </transition>
+         
         <state id="timeseries_meshpoint_parameter" description="timeseries_meshpoint_parameter" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_mesh_parameter</queryID>
             <dataname>parameterid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                <state>timeseries_meshpoint_interval</state>
-            </reachablestates>
             <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="depthid" type="Integer" multiselect="false" usedinquery="0"/>
@@ -119,13 +136,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_meshpoint_parameter"/>
+            <to state="timeseries_meshpoint_interval"/>
+         </transition>
+        
         <state id="timeseries_meshpoint_interval" description="timeseries_interval" state="de.intevation.gnv.state.MinMaxState">
             <queryID>timeseries_mesh_interval</queryID>
             <dataname>timeinterval</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>timeseries_meshpoint_calculate_results</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -137,6 +156,11 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_meshpoint_interval"/>
+            <to state="timeseries_meshpoint_calculate_results"/>
+         </transition>
+        
         <state id="timeseries_meshpoint_calculate_results" description="timeseries_interval" state="de.intevation.gnv.state.timeseries.TimeSeriesOutputState">
             <queryID>timeseries_mesh_chart_data</queryID>
             <queryID-odv>timeseries_mesh_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/timeseries/conf_timeseriespoint.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/timeseries/conf_timeseriespoint.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -50,16 +50,6 @@
                  this state. -->
             <data-noselect>true</data-noselect>
             
-            <reachablestates>
-                   <!-- reachablestates are those state which can be
-                        reached as next Step. The state notifies in 
-                        describe-output which states can be reached.
-                        The User / calling program can choose which state 
-                        he/it wants to use next  -->
-                   <state>timeseries_subarea</state>
-                   <state>timeseries_without_geom</state>
-            </reachablestates>
-            
             <inputvalues>
                 <!-- At this place it is necessary to configure the Elements
                      which must be feed and can be used in this state.
@@ -74,14 +64,21 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="timeseries_area"/>
+            <to state="timeseries_subarea"/>
+            <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+        </transition>
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="timeseries_area"/>
+            <to state="timeseries_without_geom"/>
+            <condition inputvalue="areaid" value="n/n" operator="equal"/>
+        </transition>
+        
         <state id="timeseries_subarea" description="timeseries_subaera" state="de.intevation.gnv.state.DefaultState">
             <queryID>subarea_filter</queryID>
             <dataname>subareaid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>timeseries_timeseriespoint</state>
-            </reachablestates>
-
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -90,27 +87,31 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_subarea"/>
+            <to state="timeseries_timeseriespoint"/>
+        </transition>
+        
         <state id="timeseries_without_geom" description="timeseries_mesh_without_geom" state="de.intevation.gnv.state.DefaultState">
            <queryID>timeseries_timeseriespoint</queryID>
            <dataname>featureid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>timeseries_parameter</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="0"/>
            </inputvalues>
        </state>
-        
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_without_geom"/>
+            <to state="timeseries_parameter"/>
+        </transition>
+       
         <state id="timeseries_timeseriespoint" description="timeseries_timeseriespoint" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_timeseriespoint_with_area</queryID>
             <dataname>featureid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>timeseries_parameter</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -119,27 +120,31 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_timeseriespoint"/>
+            <to state="timeseries_parameter"/>
+        </transition>
+        
         <state id="timeseries_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_parameter</queryID>
             <dataname>parameterid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                <state>timeseries_depth_height</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/>
             </inputvalues>
-        </state>           
+        </state>
+        
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_parameter"/>
+            <to state="timeseries_depth_height"/>
+        </transition>
         
          <state id="timeseries_depth_height" description="timeseries_depth_height" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_depth_height</queryID>
             <dataname>measurementid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                 <state>timeseries_interval</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true"/>
@@ -148,13 +153,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_depth_height"/>
+            <to state="timeseries_interval"/>
+        </transition>
+        
         <state id="timeseries_interval" description="timeseries_interval" state="de.intevation.gnv.state.MinMaxState">
             <queryID>timeseries_interval</queryID>
             <dataname>timeinterval</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>timeseries_calculate_results</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true"/>
@@ -164,6 +171,11 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="timeseries_interval"/>
+            <to state="timeseries_calculate_results"/>
+        </transition>
+        
         <!--  Last state is the Output-state. At this place the differen OutputModes are configured.
               For each OutputMode it might be necessary to configure separat Databasequery which collect the
               Data. -->
--- a/gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,23 +6,28 @@
                <dataname>areaid</dataname>
                <data-multiselect>false</data-multiselect>
                 <data-noselect>true</data-noselect>
-               <reachablestates>
-                      <state>verticalcrosssection_mesh_subarea</state>
-                      <state>verticalcrosssection_mesh_without_geom</state>
-               </reachablestates>
                <inputvalues>
                    <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                    <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                    <inputvalue name="areaid" type="Integer" multiselect="false" usedinquery="0"/>
                </inputvalues>
           </state>
+          
+          <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+              <from state="verticalcrosssection_mesh_area"/>
+              <to state="verticalcrosssection_mesh_subarea"/>
+              <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+          </transition>
+          <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+              <from state="verticalcrosssection_mesh_area"/>
+              <to state="verticalcrosssection_mesh_without_geom"/>
+              <condition inputvalue="areaid" value="n/n" operator="equal"/>
+          </transition>
+          
           <state id="verticalcrosssection_mesh_subarea" description="verticalcrosssection_mesh_area_one" state="de.intevation.gnv.state.DefaultState">
                <queryID>subarea_filter</queryID>
                <dataname>subareaid</dataname>
                <data-multiselect>false</data-multiselect>
-               <reachablestates>
-                      <state>verticalcrosssection_mesh</state>
-               </reachablestates>
                <inputvalues>
                    <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                    <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -31,27 +36,31 @@
                </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalcrosssection_mesh_subarea"/>
+            <to state="verticalcrosssection_mesh"/>
+        </transition>
+         
          <state id="verticalcrosssection_mesh_without_geom" description="verticalcrosssection_mesh" state="de.intevation.gnv.state.DefaultState">
               <queryID>verticalprofile_mesh</queryID>
               <dataname>meshid</dataname>
               <data-multiselect>false</data-multiselect>
-              <reachablestates>
-                     <state>verticalcrosssection_mesh_coordinate</state>
-              </reachablestates>
               <inputvalues>
                   <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                    <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="0"/>
               </inputvalues>
           </state>
+          
+          <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_without_geom"/>
+              <to state="verticalcrosssection_mesh_coordinate"/>
+          </transition>
          
          <state id="verticalcrosssection_mesh" description="verticalcrosssection_mesh" state="de.intevation.gnv.state.DefaultState">
              <queryID>verticalprofile_mesh_with_area</queryID>
              <dataname>meshid</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                    <state>verticalcrosssection_mesh_coordinate</state>
-             </reachablestates>
              <inputvalues>
                  <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -60,12 +69,14 @@
              </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh"/>
+              <to state="verticalcrosssection_mesh_coordinate"/>
+          </transition>
+         
          <state id="verticalcrosssection_mesh_coordinate" description="verticalcrosssection_mesh_coordinate" state="de.intevation.gnv.state.SingleInputState">
              <dataname>mesh_coordinate</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                    <state>verticalcrosssection_mesh_point</state>
-             </reachablestates>
              <inputvalues>
                   <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -73,13 +84,15 @@
              </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_coordinate"/>
+              <to state="verticalcrosssection_mesh_point"/>
+          </transition>
+         
          <state id="verticalcrosssection_mesh_point" description="verticalcrosssection_mesh__point" state="de.intevation.gnv.state.CoordinateSelectionState">
              <queryID>verticalprofile_mesh_point</queryID>
              <dataname>mesh_point</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                 <state>verticalcrosssection_mesh_axis</state>
-             </reachablestates>
              <inputvalues>
                   <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="mesh_coordinate" type="Coordinate" multiselect="false" usedinquery="1"/>
@@ -87,12 +100,15 @@
                   <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
              </inputvalues>
          </state>
+         
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_point"/>
+              <to state="verticalcrosssection_mesh_axis"/>
+         </transition>
+         
           <state id="verticalcrosssection_mesh_axis" description="verticalcrosssection_mesh_axis" state="de.intevation.gnv.state.profile.horizontal.NorthSouthEastWestState">
             <dataname>axisid</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                 <state>verticalcrosssection_mesh_parameter</state>
-             </reachablestates>
              <inputvalues>
                   <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
@@ -100,13 +116,16 @@
                   <inputvalue name="axisid" type="AttributeName" multiselect="false" usedinquery="0"/>
              </inputvalues>
          </state>
+         
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_axis"/>
+              <to state="verticalcrosssection_mesh_parameter"/>
+         </transition>
+         
          <state id="verticalcrosssection_mesh_parameter" description="verticalcrosssection_mesh_parameter" state="de.intevation.gnv.state.DefaultState">
              <queryID>verticalprofile_mesh_parameter</queryID>
              <dataname>parameterid</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                 <state>verticalcrosssection_mesh_date</state>
-             </reachablestates>
              <inputvalues>
                   <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                   <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -116,14 +135,15 @@
              </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_parameter"/>
+              <to state="verticalcrosssection_mesh_date"/>
+         </transition>
          
          <state id="verticalcrosssection_mesh_date" description="verticalcrosssection_mesh_date" state="de.intevation.gnv.state.DefaultState">
              <queryID>verticalcrosssection_mesh_date</queryID>
              <dataname>dateid</dataname>
              <data-multiselect>false</data-multiselect>
-             <reachablestates>
-                  <state>verticalcrosssection_mesh_calculate_results</state>
-             </reachablestates>
              <inputvalues>
                  <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                  <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -134,6 +154,11 @@
              </inputvalues>
          </state>
          
+         <transition transition="de.intevation.gnv.transition.DefaultTransition">
+              <from state="verticalcrosssection_mesh_date"/>
+              <to state="verticalcrosssection_mesh_calculate_results"/>
+         </transition>
+         
          <state id="verticalcrosssection_mesh_calculate_results" description="verticalcrosssection_mesh_calculate_results" state="de.intevation.gnv.state.profile.verticalcrosssection.VerticalCrossSectionOutputState">
              <queryID>verticalcrosssection_mesh_chart_data</queryID>
              <queryID-odv>verticalcrosssection_mesh_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -5,22 +5,22 @@
          <queryID>verticalprofile_instantaneouspoint_series</queryID>
          <dataname>seriesid</dataname>
          <data-multiselect>false</data-multiselect>
-         <reachablestates>
-             <state>verticalprofile_instantaneouspoint_point</state>
-         </reachablestates>
          <inputvalues>
              <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
               <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
               <inputvalue name="seriesid" type="Integer" multiselect="false" usedinquery="0"/>
          </inputvalues>
      </state>
+     
+     <transition transition="de.intevation.gnv.transition.DefaultTransition">
+          <from state="verticalprofile_instantaneouspoint_series"/>
+          <to state="verticalprofile_instantaneouspoint_point"/>
+     </transition>
+     
      <state id="verticalprofile_instantaneouspoint_point" description="verticalprofile_instantaneouspoint_point" state="de.intevation.gnv.state.CoordinateSelectionState">
          <queryID>verticalprofile_instantaneouspoint_point</queryID>
          <dataname>instantaneouspoint_point</dataname>
          <data-multiselect>false</data-multiselect>
-         <reachablestates>
-             <state>verticalprofile_instantaneouspoint_parameter</state>
-         </reachablestates>
          <inputvalues>
               <inputvalue name="seriesid" type="Integer" multiselect="false" usedinquery="1"/>
               <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
@@ -28,13 +28,16 @@
               <inputvalue name="instantaneouspoint_point" type="Integer" multiselect="false" usedinquery="0"/>
          </inputvalues>
      </state>
+     
+     <transition transition="de.intevation.gnv.transition.DefaultTransition">
+          <from state="verticalprofile_instantaneouspoint_point"/>
+          <to state="verticalprofile_instantaneouspoint_parameter"/>
+     </transition>
+     
      <state id="verticalprofile_instantaneouspoint_parameter" description="verticalprofile_instantaneouspoint_parameter" state="de.intevation.gnv.state.DefaultState">
          <queryID>verticalprofile_instantaneouspoint_parameter</queryID>
          <dataname>parameterid</dataname>
          <data-multiselect>true</data-multiselect>
-         <reachablestates>
-             <state>verticalprofile_instantaneouspoint_minmaxdepth</state>
-         </reachablestates>
          <inputvalues>
               <inputvalue name="seriesid" type="Integer" multiselect="false" usedinquery="0" />
               <inputvalue name="instantaneouspoint_point" type="Integer" multiselect="false" usedinquery="1"/>
@@ -42,13 +45,16 @@
               <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/>
          </inputvalues>
      </state>
+     
+     <transition transition="de.intevation.gnv.transition.DefaultTransition">
+          <from state="verticalprofile_instantaneouspoint_parameter"/>
+          <to state="verticalprofile_instantaneouspoint_minmaxdepth"/>
+     </transition>
+     
      <state id="verticalprofile_instantaneouspoint_minmaxdepth" description="verticalprofile_instantaneouspoint_minmaxdepth" state="de.intevation.gnv.state.MinMaxState">
          <queryID>verticalprofile_instantaneouspoint_minmaxdepth</queryID>
          <dataname>depthrange</dataname>
          <data-multiselect>true</data-multiselect>
-         <reachablestates>
-             <state>verticalprofile_instantaneouspoint_calculate_results</state>
-         </reachablestates>
          <inputvalues>
               <inputvalue name="seriesid" type="Integer" multiselect="false" usedinquery="0" />
               <inputvalue name="instantaneouspoint_point" type="Integer" multiselect="false" usedinquery="1"/>
@@ -58,6 +64,12 @@
               <inputvalue name="maxvalue" type="Double" multiselect="false" usedinquery="0"/>
          </inputvalues>
      </state>
+     
+     <transition transition="de.intevation.gnv.transition.DefaultTransition">
+          <from state="verticalprofile_instantaneouspoint_minmaxdepth"/>
+          <to state="verticalprofile_instantaneouspoint_calculate_results"/>
+     </transition>
+     
      <state id="verticalprofile_instantaneouspoint_calculate_results" description="verticalprofile_mesh_calculate_results" state="de.intevation.gnv.state.profile.vertical.VerticalProfileOutputState">
          <queryID>verticalprofile_instantaneouspoint_chart_data</queryID>
          <queryID-odv>verticalprofile_instantaneouspoint_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_mesh.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_mesh.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,23 +6,28 @@
            <dataname>areaid</dataname>
            <data-multiselect>false</data-multiselect>
             <data-noselect>true</data-noselect>
-           <reachablestates>
-                  <state>verticalprofile_mesh_subarea</state>
-                  <state>verticalprofile_mesh_without_geom</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                <inputvalue name="areaid" type="Integer" multiselect="false" usedinquery="0"/>
            </inputvalues>
        </state>
+       
+       <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+           <from state="verticalprofile_mesh_area"/>
+           <to state="verticalprofile_mesh_subarea"/>
+           <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+       </transition>
+       <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+           <from state="verticalprofile_mesh_area"/>
+           <to state="verticalprofile_mesh_without_geom"/>
+           <condition inputvalue="areaid" value="n/n" operator="equal"/>
+       </transition>
+       
        <state id="verticalprofile_mesh_subarea" description="verticalprofile_mesh_subaera" state="de.intevation.gnv.state.DefaultState">
            <queryID>subarea_filter</queryID>
            <dataname>subareaid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>verticalprofile_mesh</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -31,27 +36,31 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_subarea"/>
+           <to state="verticalprofile_mesh"/>
+       </transition>
+       
         <state id="verticalprofile_mesh_without_geom" description="timeseries_mesh_without_geom" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh</queryID>
             <dataname>meshid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>verticalprofile_mesh_coordinate</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="0"/>
             </inputvalues>
         </state>
-               
+       
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_without_geom"/>
+           <to state="verticalprofile_mesh_coordinate"/>
+       </transition>
+       
        <state id="verticalprofile_mesh" description="verticalprofile_mesh" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_with_area</queryID>
            <dataname>meshid</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>verticalprofile_mesh_coordinate</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -60,12 +69,14 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh"/>
+           <to state="verticalprofile_mesh_coordinate"/>
+       </transition>
+       
        <state id="verticalprofile_mesh_coordinate" description="verticalprofile_mesh_coordinate" state="de.intevation.gnv.state.SingleInputState">
            <dataname>mesh_coordinate</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-                  <state>verticalprofile_mesh_point</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -73,13 +84,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_coordinate"/>
+           <to state="verticalprofile_mesh_point"/>
+       </transition>
+       
        <state id="verticalprofile_mesh_point" description="verticalprofile_mesh_point" state="de.intevation.gnv.state.CoordinateSelectionState">
            <queryID>verticalprofile_mesh_point</queryID>
            <dataname>mesh_point</dataname>
            <data-multiselect>false</data-multiselect>
-           <reachablestates>
-               <state>verticalprofile_mesh_mindepth</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="mesh_coordinate" type="Coordinate" multiselect="false" usedinquery="1"/>
@@ -88,13 +101,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_point"/>
+           <to state="verticalprofile_mesh_mindepth"/>
+       </transition>
+       
         <state id="verticalprofile_mesh_mindepth" description="verticalprofile_mesh_mindepth" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh_mindepth</queryID>
             <dataname>mindepthid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>verticalprofile_mesh_maxdepth</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/>
@@ -103,6 +118,11 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_mindepth"/>
+           <to state="verticalprofile_mesh_maxdepth"/>
+        </transition>
+        
         <state id="verticalprofile_mesh_maxdepth" description="verticalprofile_mesh_maxdepth" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_mesh_maxdepth</queryID>
             <dataname>maxdepthid</dataname>
@@ -118,13 +138,16 @@
                 <inputvalue name="maxdepthid" type="Double" multiselect="false" usedinquery="0"/>
             </inputvalues>
         </state>
-       <state id="verticalprofile_meshpoint_parameter" description="verticalprofile_meshpoint_parameter" state="de.intevation.gnv.state.DefaultState">
+        
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_maxdepth"/>
+           <to state="verticalprofile_meshpoint_parameter"/>
+        </transition>
+        
+        <state id="verticalprofile_meshpoint_parameter" description="verticalprofile_meshpoint_parameter" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_parameter</queryID>
            <dataname>parameterid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-               <state>verticalprofile_mesh_date</state>
-           </reachablestates>
            <inputvalues>
                 <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -135,13 +158,15 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_meshpoint_parameter"/>
+           <to state="verticalprofile_mesh_date"/>
+        </transition>
+       
        <state id="verticalprofile_mesh_date" description="verticalprofile_mesh_date" state="de.intevation.gnv.state.DefaultState">
            <queryID>verticalprofile_mesh_date</queryID>
            <dataname>dateid</dataname>
            <data-multiselect>true</data-multiselect>
-           <reachablestates>
-                <state>verticalprofile_mesh_calculate_results</state>
-           </reachablestates>
            <inputvalues>
                <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/>
                <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
@@ -153,6 +178,11 @@
            </inputvalues>
        </state>
        
+       <transition transition="de.intevation.gnv.transition.DefaultTransition">
+           <from state="verticalprofile_mesh_date"/>
+           <to state="verticalprofile_mesh_calculate_results"/>
+        </transition>
+       
        <state id="verticalprofile_mesh_calculate_results" description="verticalprofile_mesh_calculate_results" state="de.intevation.gnv.state.profile.vertical.VerticalProfileOutputState">
            <queryID>verticalprofile_mesh_chart_data</queryID>
            <queryID-odv>verticalprofile_mesh_odv_data</queryID-odv>
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_timeseriespoint.xml	Tue Dec 08 13:38:21 2009 +0000
@@ -6,10 +6,6 @@
             <dataname>areaid</dataname>
             <data-multiselect>false</data-multiselect>
              <data-noselect>true</data-noselect>
-            <reachablestates>
-                   <state>verticalprofile_subarea</state>
-                   <state>verticalprofile_without_geom</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -17,13 +13,21 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="verticalprofile_area"/>
+            <to state="verticalprofile_subarea"/>
+            <condition inputvalue="areaid" value="n/n" operator="notequal"/>
+        </transition>
+        <transition transition="de.intevation.gnv.transition.ValueCompareTransition">
+            <from state="verticalprofile_area"/>
+            <to state="verticalprofile_without_geom"/>
+            <condition inputvalue="areaid" value="n/n" operator="equal"/>
+        </transition>
+        
         <state id="verticalprofile_subarea" description="verticalprofile_subaera" state="de.intevation.gnv.state.DefaultState">
             <queryID>subarea_filter</queryID>
             <dataname>subareaid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>verticalprofile_timeseriespoint</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="0"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -32,13 +36,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_subarea"/>
+            <to state="verticalprofile_timeseriespoint"/>
+        </transition>
+        
         <state id="verticalprofile_without_geom" description="verticalprofile_without_geom" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_point</queryID>
             <dataname>featureid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                   <state>verticalprofile_parameter</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -46,13 +52,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_without_geom"/>
+            <to state="verticalprofile_parameter"/>
+        </transition>
+        
         <state id="verticalprofile_timeseriespoint" description="timeseries_timeseriespoint" state="de.intevation.gnv.state.DefaultState">
             <queryID>timeseries_timeseriespoint_with_area</queryID>
             <dataname>featureid</dataname>
             <data-multiselect>false</data-multiselect>
-            <reachablestates>
-                <state>verticalprofile_parameter</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="sourceid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -61,13 +69,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_timeseriespoint"/>
+            <to state="verticalprofile_parameter"/>
+        </transition>
+        
         <state id="verticalprofile_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_parameter</queryID>
             <dataname>parameterid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                <state>verticalprofile_date</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false"  usedinquery="1"/>
                 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
@@ -75,13 +85,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_parameter"/>
+            <to state="verticalprofile_date"/>
+        </transition>
+        
         <state id="verticalprofile_date" description="verticalprofile_date" state="de.intevation.gnv.state.DefaultState">
             <queryID>verticalprofile_date</queryID>
             <dataname>dateid</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                 <state>verticalprofile_minmaxdepth</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false"  usedinquery="1"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
@@ -90,13 +102,15 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_date"/>
+            <to state="verticalprofile_minmaxdepth"/>
+        </transition>
+        
         <state id="verticalprofile_minmaxdepth" description="verticalprofile_minmaxdepth" state="de.intevation.gnv.state.MinMaxState">
             <queryID>verticalprofile_minmaxdepth</queryID>
             <dataname>depthrange</dataname>
             <data-multiselect>true</data-multiselect>
-            <reachablestates>
-                 <state>verticalprofile_calculate_results</state>
-            </reachablestates>
             <inputvalues>
                 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
                 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
@@ -107,6 +121,11 @@
             </inputvalues>
         </state>
         
+        <transition transition="de.intevation.gnv.transition.DefaultTransition">
+            <from state="verticalprofile_minmaxdepth"/>
+            <to state="verticalprofile_calculate_results"/>
+        </transition>
+        
         <state id="verticalprofile_calculate_results" description="verticalprofile_calculate_results" state="de.intevation.gnv.state.profile.vertical.VerticalProfileOutputState">
             <queryID>verticalprofile_chart_data</queryID>
             <queryID-odv>verticalprofile_odv_data</queryID-odv>
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Dec 08 13:38:21 2009 +0000
@@ -5,6 +5,7 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -34,6 +35,8 @@
 import de.intevation.gnv.state.State;
 import de.intevation.gnv.state.StateFactory;
 import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.transition.Transition;
+import de.intevation.gnv.transition.TransitionFactory;
 import de.intevation.gnv.utils.ArtifactXMLUtilities;
 
 /**
@@ -71,6 +74,11 @@
      * The States that can be used
      */
     protected Map<String, State> states = null;
+    
+    /**
+     * The Transitions which can switch between the different States.
+     */
+    protected Collection<Transition> transitions = null;
 
     /**
      * The Name of the Artifact
@@ -98,7 +106,7 @@
             if (this.current != null) {
                 String stateName = this.readStateName(target);
                 log.debug("Statename: " + stateName);
-                if (this.current.isStateReachable(stateName)) {
+                if (this.isStateCurrentlyReachable(stateName)) {
                     try {
                         State nextStep = this.states
                                 .get(stateName);
@@ -144,6 +152,21 @@
     }
     
     
+    private boolean isStateCurrentlyReachable(String stateid){
+        log.debug("GNVArtifactBase.isStateCurrentlyReachable "+stateid);
+        Iterator<Transition> it = this.transitions.iterator();
+        String from = this.current.getID();
+        while (it.hasNext()){
+            Transition transition = it.next();
+            if (transition.getFrom().equals(from)){
+                if (transition.getTo().equals(stateid) && transition.isValid(this.current)){
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+    
     public Document initialize (CallContext context) {
         Document result = XMLUtils.newDocument();
         try {
@@ -252,6 +275,17 @@
                     }
                 }
             }
+            
+            NodeList transitionList = Config.getNodeSetXPath(artifactNode,
+            "states/transition");
+            this.transitions = new ArrayList<Transition>(transitionList.getLength());
+            for (int i = 0; i < transitionList.getLength(); i++) {
+                Transition tmpTransition = TransitionFactory.getInstance()
+                        .createTransition(transitionList.item(i));
+                if (tmpTransition != null) {
+                    this.transitions.add(tmpTransition);
+                }
+            }
 
         }
     }
@@ -308,17 +342,20 @@
         Element stateNode = xmlUtilities.createArtifactElement(document,
                 "reachable-states");
         if (this.current != null) {
-            Iterator<String> states = this.current.reachableStates()
-                    .iterator();
-            while (states.hasNext()) {
-                String value = states.next();
-                Element currentNode = xmlUtilities.createArtifactElement(
-                        document, "state");
-                currentNode.setAttribute("name", value);
-                log.debug("Reachable State: " + value);
-                currentNode.setAttribute("description", this.states.get(value)
-                        .getDescription());
-                stateNode.appendChild(currentNode);
+            Iterator<Transition> transitions = this.transitions.iterator();
+            while (transitions.hasNext()) {
+                Transition tmpTransition = transitions.next();
+                if (tmpTransition.getFrom().equals(current.getID()) && 
+                    tmpTransition.isValid(this.current)){
+                    Element currentNode = xmlUtilities.createArtifactElement(
+                            document, "state");
+                    currentNode.setAttribute("name", tmpTransition.getTo());
+                    log.debug("Reachable State: " + tmpTransition.getTo());
+                    currentNode.setAttribute("description", 
+                                             this.states.get(tmpTransition.getTo())
+                                                             .getDescription());
+                    stateNode.appendChild(currentNode);
+                }
             }
         }
         parent.appendChild(stateNode);
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/State.java	Tue Dec 08 13:38:21 2009 +0000
@@ -20,10 +20,6 @@
 
     public void setup(Node configuration);
 
-    public Collection<String> reachableStates();
-
-    public boolean isStateReachable(String stateID);
-
     public String getID();
 
     public String getDescription();
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Dec 08 11:18:27 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Dec 08 13:38:21 2009 +0000
@@ -46,8 +46,6 @@
  */
 public abstract class StateBase implements State {
 
-    
-
     /**
      * The UID of this Class
      */
@@ -77,8 +75,6 @@
 
     protected String queryID = null;
 
-    private Collection<String> reachableStates = null;
-
     protected Collection<String> inputValueNames = null;
 
     private Map<String, InputValue> inputValues = null;
@@ -109,38 +105,7 @@
         return this.description;
     }
 
-    /**
-     * @see de.intevation.gnv.state.State#reachableStates()
-     */
-    public Collection<String> reachableStates() {
-        
-        if (this.couldAlternativeStateUsed()){
-            Iterator<String> it = this.reachableStates.iterator();
-            String transValue = null;
-            while (it.hasNext()){
-                transValue = it.next();
-            }
-            Collection<String> returnValue = new ArrayList<String>(1);
-            returnValue.add(transValue);
-            return returnValue;
-        }else{
-            return this.reachableStates;
-        }
-        
-    }
 
-    /**
-     * @return
-     */
-    private boolean couldAlternativeStateUsed() {
-     // TODO das muss hier noch etwas freier gestaltet werden.
-        String key = this.dataName;
-        boolean returnValue=this.inputData != null &&
-                            this.inputData.containsKey(key) && 
-                            this.inputData.get(key).getValue().
-                                                    equals(NODATASELECTIONKEY);
-        return returnValue;
-    }
 
     /**
      * @see de.intevation.gnv.state.State#getRequiredInputValues()
@@ -158,15 +123,6 @@
         this.description = ((Element)configuration).getAttribute("description");
 
         log.info("State-ID = " + this.id);
-        NodeList nodes = Config.getNodeSetXPath(configuration,
-                "reachablestates/state");
-        this.reachableStates = new ArrayList<String>(nodes.getLength());
-        for (int i = 0; i < nodes.getLength(); i++) {
-            String reachableState = nodes.item(i).getTextContent();
-            log.info("ReachableState ==> " + reachableState);
-            this.reachableStates.add(reachableState);
-
-        }
         
         NodeList inputValuesNodes = Config.getNodeSetXPath(configuration,
                 "inputvalues/inputvalue");
@@ -390,23 +346,6 @@
     }
 
     /**
-     * @see de.intevation.gnv.state.State#isStateReachable(java.lang.String)
-     */
-    public boolean isStateReachable(String stateID) {
-        log.debug("StateBase.isStateReachable");
-        boolean returnValue = false;
-        Iterator<String> states = reachableStates.iterator();
-        while (states.hasNext()) {
-            if (states.next().equals(stateID)) {
-                log.debug("State " + stateID + " wird unterstützt.");
-                returnValue = true;
-                break;
-            }
-        }
-        return returnValue;
-    }
-
-    /**
      * @see de.intevation.gnv.state.State#advance(java.lang.String,
      *      de.intevation.artifacts.CallMeta)
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/DefaultTransition.java	Tue Dec 08 13:38:21 2009 +0000
@@ -0,0 +1,33 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition;
+
+import de.intevation.gnv.state.State;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class DefaultTransition extends TransitionBase {
+
+    /**
+     * The UID of this Class.
+     */
+    private static final long serialVersionUID = -2610338646743984581L;
+
+    /**
+     * Constructor
+     */
+    public DefaultTransition() {
+        super();
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.Transition#isValid(de.intevation.gnv.state.State)
+     */
+    public boolean isValid(State state) {
+        return true;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/Transition.java	Tue Dec 08 13:38:21 2009 +0000
@@ -0,0 +1,41 @@
+package de.intevation.gnv.transition;
+
+import java.io.Serializable;
+
+import org.w3c.dom.Node;
+
+import de.intevation.gnv.state.State;
+
+/**
+ * 
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public interface Transition extends Serializable{
+    
+    /**
+     * Returns the ID of the State from which the Transition could be used
+     * @return the ID of the State from which the Transition could be used
+     */
+    public String getFrom();
+    
+    /**
+     * Returns the ID of the State where it is possible to go as next.
+     * @return the ID of the State where it is possible to go as next.
+     */
+    public String getTo();
+    
+    /**
+     * Determines if it is possible to go along this Transition or not.
+     * @param state the current State
+     * @return
+     */
+    public boolean isValid(State state);
+    
+    /**
+     * Configures the Transition.
+     * @param configuration
+     */
+    public void setup(Node configuration);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Tue Dec 08 13:38:21 2009 +0000
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition;
+
+import org.w3c.dom.Node;
+
+import de.intevation.artifactdatabase.Config;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public abstract class TransitionBase implements Transition {
+
+    /**
+     * The UID of this Class.
+     */
+    private static final long serialVersionUID = -8542097519466477977L;
+
+    private String from = null;
+    
+    private String to = null;
+    /**
+     * Constructor
+     */
+    public TransitionBase() {
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.Transition#getFrom()
+     */
+    public String getFrom() {
+        return this.from;
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.Transition#getTo()
+     */
+    public String getTo() {
+        return this.to;
+    }
+    
+    /**
+     * @see de.intevation.gnv.transition.Transition#setup(org.w3c.dom.Node)
+     */
+    public void setup(Node configuration) {
+      this.from = Config.getStringXPath(configuration,"from/@state");
+      this.to = Config.getStringXPath(configuration,"to/@state");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionFactory.java	Tue Dec 08 13:38:21 2009 +0000
@@ -0,0 +1,55 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Node;
+
+import de.intevation.gnv.artifacts.GNVArtifactBase;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ * 
+ */
+public class TransitionFactory {
+
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = Logger.getLogger(GNVArtifactBase.class);
+
+    private static TransitionFactory instance = null;
+
+    /**
+     * Constructor
+     */
+    public TransitionFactory() {
+        super();
+    }
+
+    public static TransitionFactory getInstance() {
+        if (instance == null) {
+            instance = new TransitionFactory();
+        }
+        return instance;
+    }
+
+    public Transition createTransition(Node configuration) {
+        log.debug("TransitionFactory.createTransition");
+        Transition state = null;
+        try {
+            String classname = ((org.w3c.dom.Element)configuration).getAttribute("transition");
+            state = (Transition) (Class.forName(classname).newInstance());
+            state.setup(configuration);
+        } catch (InstantiationException e) {
+            log.error(e, e);
+        } catch (IllegalAccessException e) {
+            log.error(e, e);
+        } catch (ClassNotFoundException e) {
+            log.error(e, e);
+        }
+        return state;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/ValueCompareTransition.java	Tue Dec 08 13:38:21 2009 +0000
@@ -0,0 +1,82 @@
+/**
+ *
+ */
+package de.intevation.gnv.transition;
+
+import java.util.Iterator;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Node;
+
+import de.intevation.artifactdatabase.Config;
+import de.intevation.gnv.state.InputData;
+import de.intevation.gnv.state.State;
+import de.intevation.gnv.state.exception.StateException;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class ValueCompareTransition extends TransitionBase {
+
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = Logger.getLogger(ValueCompareTransition.class);
+    
+    private String dataName = null;
+    private String dataValue = null;
+    private String operator = null;
+    
+    /**
+     * The UID of this Class.
+     */
+    private static final long serialVersionUID = -7846722158776823205L;
+
+    /**
+     * Constructor
+     */
+    public ValueCompareTransition() {
+        super();
+    }
+
+    /**
+     * @see de.intevation.gnv.transition.Transition#isValid(de.intevation.gnv.state.State)
+     */
+    public boolean isValid(State state) {
+        
+        try {
+            Iterator<InputData> it = state.getInputData().iterator();
+            while (it.hasNext()){
+                InputData inputData = it.next();
+                if (inputData.getName().equals(this.dataName)){
+                    boolean returnValue = false;
+                    if (operator.equals("equal")){
+                        returnValue = this.dataValue.equals(inputData.getValue());
+                    }else if (operator.equals("notequal")){
+                        returnValue = !this.dataValue.equals(inputData.getValue());
+                    }
+                    return returnValue;
+                }
+            }
+            if (operator.equals("notequal")){
+                // data is not given. So the constraint not Equals is fullfilled.
+                return true;
+            }
+        } catch (StateException e) {
+            log.error(e,e);
+            return false;
+        }
+        return false;
+    }
+
+    @Override
+    public void setup(Node configuration) {
+        super.setup(configuration);
+        this.dataName = Config.getStringXPath(configuration,"condition/@inputvalue");
+        this.dataValue = Config.getStringXPath(configuration,"condition/@value");
+        this.operator = Config.getStringXPath(configuration,"condition/@operator");
+    }
+    
+
+}

http://dive4elements.wald.intevation.org