]> 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
FlowNamespace extended (flows in flows, param in arg)
[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 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
4 xmlns:aop="http://www.springframework.org/schema/aop" xmlns:flow="http://www.argeo.org/schema/slc-flow"
5 xsi:schemaLocation="
6 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
8 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
9 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">
10
11 <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />
12 <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />
13
14 <flow:spec id="advanced.spec">
15 <flow:description>spec description</flow:description>
16 <flow:primitive name="param1" isParameter="true"
17 type="integer" />
18 <flow:ref name="param2" targetClass="org.argeo.slc.core.test.BasicTestData"
19 isParameter="true">
20 <flow:value>
21 <bean class="org.argeo.slc.core.test.BasicTestData">
22 <property name="expected" value="tata" />
23 <property name="reached" value="tata" />
24 </bean>
25 </flow:value>
26 </flow:ref>
27 </flow:spec>
28
29
30 <flow:flow id="advanced.flowTemplate" abstract="true" spec="advanced.spec"
31 path="/path">
32 <description>flow description</description>
33 <bean parent="task.echo"
34 scope="execution">
35 <property name="message" value="Advanced: param1=@{param1}" />
36 <aop:scoped-proxy/>
37 </bean>
38 <flow:flow>
39 <bean parent="task.echo" p:message="Flow in Flow - param1=@{param1}" />
40 </flow:flow>
41
42 <bean class="org.argeo.slc.core.test.SimpleTestRun">
43 <property name="testDefinition">
44 <bean class="org.argeo.slc.core.test.BasicTestDefinition" />
45 </property>
46 <property name="testData">
47 <flow:param name="param2" />
48 </property>
49
50 <property name="testResult">
51 <bean parent="slcDefault.test.basicTreeTestResult" scope="execution">
52 <property name="attributes">
53 <map>
54 <entry key="param1" value="@{param1}" />
55 </map>
56 </property>
57 <aop:scoped-proxy />
58 </bean>
59 </property>
60 </bean>
61
62 </flow:flow>
63
64 <flow:flow id="advanced.flowTemplate2" abstract="true" spec="advanced.spec"
65 path="/path">
66 <bean parent="task.echo"
67 scope="execution">
68 <property name="message" value="Advanced2: param1=@{param1}" />
69 <aop:scoped-proxy/>
70 </bean>
71 <flow:flow parent="advanced.flowTemplate">
72 <flow:arg name="param1" value="@{param1}"/>
73 <flow:arg name="param2">
74 <!-- flow:param in flow:arg -->
75 <flow:param name="param2" />
76 </flow:arg>
77 </flow:flow>
78 </flow:flow>
79
80
81 <flow:flow id="flow1" parent="advanced.flowTemplate">
82 <flow:arg name="param1" value="1" />
83 </flow:flow>
84
85 <flow:flow id="flow2">
86 <flow:flow parent="advanced.flowTemplate">
87 <flow:arg name="param1" value="2" />
88 </flow:flow>
89 </flow:flow>
90
91 <flow:flow id="flow3" parent="advanced.flowTemplate2">
92 <flow:arg name="param1" value="3" />
93 <flow:arg name="param2">
94 <bean class="org.argeo.slc.core.test.BasicTestData">
95 <property name="expected" value="tata" />
96 <property name="reached" value="toto" />
97 </bean>
98 </flow:arg>
99 </flow:flow>
100
101 </beans>