]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.core/src/test/resources/org/argeo/slc/core/execution/xml/advanced.xml
Add license headers
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / test / resources / org / argeo / slc / core / execution / xml / advanced.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4 Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18 -->
19
20 <beans xmlns="http://www.springframework.org/schema/beans"
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
22 xmlns:flow="http://www.argeo.org/schema/slc-flow"
23 xsi:schemaLocation="
24 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
25 http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
26 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">
27
28 <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />
29 <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />
30
31 <bean id="testResult" class="org.argeo.slc.core.test.SimpleTestResult" />
32
33 <bean id="testDef" class="org.argeo.slc.core.test.BasicTestDefinition" />
34
35 <bean id="testRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">
36 <property name="testDefinition" ref="testDef" />
37 <property name="testResult" ref="testResult"/>
38 </bean>
39
40 <flow:spec id="advanced.spec">
41 <description>spec description</description>
42 <flow:primitive name="param1" isParameter="true"
43 type="integer" />
44 <flow:primitive name="param2" isParameter="true"
45 type="integer" />
46 </flow:spec>
47
48
49 <flow:flow id="advanced.flowTemplate" abstract="true" spec="advanced.spec"
50 path="/path">
51 <description>flow description</description>
52 <bean parent="task.echo">
53 <property name="message" value="Advanced: param1=@{param1}, param2=@{param2}" />
54 <flow:variable/>
55 </bean>
56 <flow:flow>
57 <bean parent="task.echo" p:message="Flow in Flow - param1=@{param1}, param2=@{param2} [Not variable]" />
58 </flow:flow>
59
60 <bean parent="testRunTemplate">
61 <property name="testData">
62 <bean class="org.argeo.slc.core.test.BasicTestData">
63 <flow:variable/>
64 <property name="expected" value="@{param1}" />
65 <property name="reached" value="@{param2}" />
66 </bean>
67 </property>
68 </bean>
69
70 </flow:flow>
71
72 <flow:flow id="advanced.flowTemplate2" abstract="true" spec="advanced.spec"
73 path="/path">
74 <bean parent="task.echo" p:message="Advanced2: param1=@{param1}, param2=@{param2}">
75 <flow:variable/>
76 </bean>
77 <flow:flow parent="advanced.flowTemplate">
78 <flow:arg name="param1" value="@{param1}"/>
79 <flow:arg name="param2">
80 <!-- flow:param in flow:arg -->
81 <flow:param name="param2" />
82 </flow:arg>
83 </flow:flow>
84 </flow:flow>
85
86
87 <flow:flow id="flow1" parent="advanced.flowTemplate">
88 <flow:arg name="param1" value="1" />
89 <flow:arg name="param2" value="1" />
90 </flow:flow>
91
92 <flow:flow id="flow2">
93 <flow:flow parent="advanced.flowTemplate">
94 <flow:arg name="param1" value="2" />
95 <flow:arg name="param2" value="2" />
96 </flow:flow>
97 </flow:flow>
98
99 <flow:flow id="flow3" parent="advanced.flowTemplate2">
100 <flow:arg name="param1" value="3" />
101 <flow:arg name="param2" value="3" />
102 </flow:flow>
103
104 <flow:flow id="flow4" parent="advanced.flowTemplate">
105 <description>Would fail if param 2 is not changed at execution</description>
106 <flow:arg name="param1" value="4" />
107 <flow:arg name="param2" value="3" />
108 </flow:flow>
109
110
111 </beans>