source: raptor-distribution/MSIs/raptor-web/tags/v1.2.1/source/web/webapp/raptor-web/WEB-INF/flows/reports/graph-wizard-subflow.xml @ 1748

Revision 1748, 11.7 KB checked in by rhyssmith, 5 years ago (diff)

Tagging raptor-web v1.2.1-1 release of Raptor Web MSI

  • Property svn:executable set to *
Line 
1<!--
2
3    Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9            http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17-->
18<flow parent="reports" start-state="editRunDecision" xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19    xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
20
21    <!-- <var name="graphWizardModel" class="uk.ac.cardiff.raptorweb.model.wizard.GraphWizardModel" /> -->
22   
23    <input name="savedGraphWizardModel"/>
24   
25    <on-start>
26        <evaluate expression="savedGraphWizardModel.graphWizardModel.setStatisticFunctionTypes(graphService.getStatisticFunctionTypeUnits())" />
27        <evaluate expression="graphWizardService.populateSuggestionValues(savedGraphWizardModel.graphWizardModel)" />
28    </on-start>
29   
30    <decision-state id="editRunDecision">
31        <if test="savedGraphWizardModel.graphWizardModel.runImmediatly==true" then="compileAndInvokeStatisticalUnit" else="dateSelector" />
32    </decision-state>
33   
34
35    <view-state id="dateSelector" view="wizard/date-selector.xhtml" model="savedGraphWizardModel">
36        <on-entry>
37            <evaluate expression="graphWizardService.computeCurrentTimeRange(savedGraphWizardModel.graphWizardModel)" />
38        </on-entry>
39        <transition on="computeCurrentTimeRange">
40            <evaluate expression="graphWizardService.computeCurrentTimeRange(savedGraphWizardModel.graphWizardModel)" />
41        </transition>
42
43        <transition on="next" to="eventTypeSelector" />
44        <transition on="back" to="cancelWizard" />
45        <transition on="finish" to="layoutNeeded" />
46        <transition on="cancel" to="cancelWizard" />
47    </view-state>
48
49    <view-state id="eventTypeSelector" view="wizard/event-types-selector.xhtml" model="savedGraphWizardModel">
50   
51   
52        <transition on="addEventType" validate="false">
53            <evaluate expression="savedGraphWizardModel.graphWizardModel.saveEventType()" />
54        </transition>
55
56        <transition on="removeEventType" validate="false">
57            <evaluate expression="savedGraphWizardModel.graphWizardModel.removeEventType()" />
58        </transition>
59
60        <transition on="next" to="graphTypeSelector"/>
61        <transition on="back" to="dateSelector"  validate="false"/>
62        <transition on="cancel" to="cancelWizard" validate="false"/>
63       
64        <transition on="date-selector" to="dateSelector" validate="false"/>
65        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
66        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
67        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
68        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
69        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
70    </view-state>
71
72    <view-state id="graphTypeSelector" view="wizard/graph-type-selector.xhtml" model="savedGraphWizardModel">
73   
74         <on-entry>
75            <evaluate expression="graphWizardService.setDefaultGraphFunctions(savedGraphWizardModel.graphWizardModel)" />
76        </on-entry>
77
78        <transition on="lookupStatistic" validate="false">
79            <evaluate expression="graphWizardService.lookupStatisticalUnitInformation(savedGraphWizardModel.graphWizardModel)" />
80        </transition>
81        <transition on="next" to="graphSeriesSelector" />
82        <transition on="finish" to="layoutNeeded" />
83        <transition on="back" to="eventTypeSelector" validate="false"/>
84        <transition on="cancel" to="cancelWizard" validate="false"/>
85       
86        <transition on="date-selector" to="dateSelector" />
87        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
88        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
89        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
90        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
91        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
92    </view-state>
93
94    <view-state id="graphSeriesSelector" view="wizard/graph-series-selector.xhtml" model="savedGraphWizardModel">
95        <transition on="addSeriesToSelectedStatistic" validate="false">
96            <evaluate expression="graphWizardService.addSeriesToSelectedStatistic(savedGraphWizardModel.graphWizardModel)"></evaluate>
97        </transition>
98        <transition on="addFilterToSelectedSeries" validate="false">
99            <evaluate expression="graphWizardService.addFilterToSelectedSeries(savedGraphWizardModel.graphWizardModel)"></evaluate>
100        </transition>
101        <transition on="removeSeriesFromSelectedStatistic" validate="false">
102            <evaluate expression="graphWizardService.removeSeriesFromSelectedStatistic(savedGraphWizardModel.graphWizardModel)" />
103        </transition>
104        <transition on="removeSelectedFilterFromSelectedStatistic" validate="false">
105            <evaluate expression="graphWizardService.removeSelectedFilterFromSelectedStatistic(savedGraphWizardModel.graphWizardModel)" />
106        </transition>
107
108        <transition on="next" to="graphOptionsSelector" />
109        <transition on="finish" to="layoutNeeded" />
110        <transition on="back" to="graphTypeSelector" validate="false" />
111        <transition on="cancel" to="cancelWizard" validate="false"/>
112       
113        <transition on="date-selector" to="dateSelector" validate="false"/>
114        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
115        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
116        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
117        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
118        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
119    </view-state>
120
121
122    <view-state id="graphProcessorSelector" view="wizard/graph-processor-selector.xhtml">
123
124        <transition on="removePostProcessorFromSelectedStatistic">
125            <evaluate expression="graphWizardService.removePostProcessorFromSelectedStatistic(savedGraphWizardModel.graphWizardModel)"></evaluate>
126        </transition>
127
128        <transition on="addProcessorToSelectedStatistic">
129            <evaluate expression="graphWizardService.addProcessorToSelectedStatistic(savedGraphWizardModel.graphWizardModel)"></evaluate>
130        </transition>
131
132        <transition on="initialiseNewProcessorAdd">
133            <evaluate expression="savedGraphWizardModel.graphWizardModel.initialiseNewProcessorAdd()" />
134        </transition>
135
136        <transition on="setupProcessorToAdd">
137            <evaluate expression="savedGraphWizardModel.graphWizardModel.setupProcessorToAdd()" />
138        </transition>
139
140        <transition on="next" to="layoutNeeded" />
141        <transition on="back" to="graphOptionsSelector" />
142        <transition on="cancel" to="cancelWizard" />
143       
144        <transition on="date-selector" to="dateSelector" validate="false"/>
145        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
146        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
147        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
148        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
149        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
150    </view-state>
151
152
153    <view-state id="graphOptionsSelector" view="wizard/graph-options-selector.xhtml" model="savedGraphWizardModel">
154        <transition on="next" to="graphProcessorSelector" />
155        <transition on="finish" to="layoutNeeded" />
156        <transition on="back" to="graphSeriesSelector" validate="false" />
157        <transition on="cancel" to="cancelWizard" validate="false"/>
158       
159        <transition on="date-selector" to="dateSelector" validate="false"/>
160        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
161        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
162        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
163        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
164        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
165    </view-state>
166
167
168    <decision-state id="layoutNeeded">
169        <if test="savedGraphWizardModel.graphWizardModel.graphSets.size()>1" then="graphLayoutSelector" else="compileAndInvokeStatisticalUnit" />
170    </decision-state>
171
172    <view-state id="graphLayoutSelector" view="wizard/page-layout-selector.xhtml">
173        <transition on="next" to="compileAndInvokeStatisticalUnit" />
174        <transition on="back" to="graphOptionsSelector" />
175        <transition on="cancel" to="cancelWizard" />
176       
177       
178    </view-state>
179
180    <action-state id="compileAndInvokeStatisticalUnit">
181        <evaluate expression="graphWizardService.compileStatisticalUnitInformation(savedGraphWizardModel.graphWizardModel)" />
182        <transition to="graphResultsSelector">
183            <evaluate expression="graphWizardService.invokeStatisticalUnitInformationDynamic(savedGraphWizardModel.graphWizardModel)" />
184        </transition>
185    </action-state>
186
187    <decision-state id="layoutNeededBack">
188        <if test="savedGraphWizardModel.graphWizardModel.graphSets.size()>1" then="graphLayoutSelector" else="graphProcessorSelector" />
189    </decision-state>
190
191    <view-state id="graphResultsSelector" view="wizard/graph-wizard-results.xhtml">
192        <on-entry>
193            <evaluate expression="savedGraphWizardModel.setFinishedReport(true)" />
194        </on-entry>   
195   
196        <transition on="generateExcelReport">
197            <evaluate expression="graphWizardService.generateExcelReport(savedGraphWizardModel.graphWizardModel)" />
198        </transition>
199
200        <transition on="generateCSVReport">
201            <evaluate expression="graphWizardService.generateCSVReport(savedGraphWizardModel.graphWizardModel)" />
202        </transition>
203
204        <transition on="generatePDFReport">
205            <evaluate expression="graphWizardService.generatePDFReport(savedGraphWizardModel.graphWizardModel)" />
206        </transition>
207
208        <transition on="save">
209            <evaluate expression="savedWizardReportsService.save(savedGraphWizardModel,flowScope.websession.user.name)" />
210            <evaluate expression="savedGraphWizardModel.setEdittingReport(true)" />
211        </transition>
212
213        <transition on="date-selector" to="dateSelector" />
214        <transition on="event-type-selector" to="eventTypeSelector" validate="false"/>
215        <transition on="graph-type-selector" to="graphTypeSelector" validate="false"/>
216        <transition on="graph-series-selector" to="graphSeriesSelector" validate="false"/>
217        <transition on="graph-options-selector" to="graphOptionsSelector" validate="false"/>
218        <transition on="graph-post-processors" to="graphProcessorSelector" validate="false"/>
219
220        <transition on="back" to="layoutNeededBack" />
221        <transition on="done" to="cancelWizard" />
222    </view-state>
223
224
225    <end-state id="cancelWizard" />
226
227</flow>
Note: See TracBrowser for help on using the repository browser.