]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.core/src/test/resources/org/argeo/slc/core/execution/xml/containers.xml
slc flow namespace extended (flow:variables, list, map, etc. in flow:arg and spec...
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / test / resources / org / argeo / slc / core / execution / xml / containers.xml
diff --git a/runtime/org.argeo.slc.core/src/test/resources/org/argeo/slc/core/execution/xml/containers.xml b/runtime/org.argeo.slc.core/src/test/resources/org/argeo/slc/core/execution/xml/containers.xml
new file mode 100644 (file)
index 0000000..d727508
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"\r
+       xmlns:flow="http://www.argeo.org/schema/slc-flow" xmlns:aop="http://www.springframework.org/schema/aop"\r
+       xsi:schemaLocation="\r
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd\r
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd\r
+       http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">\r
+\r
+       <import resource="classpath:org/argeo/slc/core/execution/spring.xml" />\r
+       <import resource="classpath:/org/argeo/slc/core/test/spring.xml" />\r
+\r
+       <bean id="testResult" class="org.argeo.slc.core.test.SimpleTestResult" />\r
+\r
+       <bean id="testDef" class="org.argeo.slc.core.test.BasicTestDefinition" />\r
+\r
+       <bean id="testRunTemplate" class="org.argeo.slc.core.test.SimpleTestRun" abstract="true">\r
+               <property name="testDefinition" ref="testDef" />\r
+               <property name="testResult" ref="testResult"/>\r
+       </bean> \r
+\r
+       <flow:spec id="test.list.spec">\r
+               <flow:ref name="list1" targetClass="java.util.List">\r
+                       <flow:value>\r
+                               <!-- a list element can be used directly as default value-->\r
+                               <list>\r
+                                       <value>val1</value>\r
+                               </list>\r
+                       </flow:value>\r
+               </flow:ref>\r
+               <flow:ref name="list2" targetClass="java.util.List" />\r
+               <!-- following parameters are not used in flow -->\r
+               <flow:ref name="dummyMap" targetClass="java.util.Map">\r
+                       <flow:value>\r
+                               <map></map>\r
+                       </flow:value>\r
+               </flow:ref>\r
+               <flow:ref name="dummySet" targetClass="java.util.Set">\r
+                       <flow:value>\r
+                               <set></set>\r
+                       </flow:value>\r
+               </flow:ref>\r
+               <flow:ref name="dummyProperties" targetClass="java.util.Properties">\r
+                       <flow:value>\r
+                               <props></props>\r
+                       </flow:value>\r
+               </flow:ref>\r
+               \r
+       </flow:spec>\r
+\r
+\r
+       <flow:flow id="test.list.flowTemplate" abstract="true" spec="test.list.spec"\r
+               path="/path">\r
+               <bean parent="task.echo">\r
+                       <property name="message" value="list1=@{list1}, list2=@{list2}" />\r
+                       <flow:variable/>\r
+               </bean> \r
+\r
+               <bean parent="testRunTemplate">\r
+                       <property name="testData">\r
+                               <bean class="org.argeo.slc.core.test.BasicTestData">\r
+                                       <property name="expected">\r
+                                               <flow:param name="list1"/>\r
+                                       </property>\r
+                                       <property name="reached">\r
+                                               <flow:param name="list2"/>\r
+                                       </property>\r
+                               </bean>\r
+                       </property>                                     \r
+               </bean>\r
\r
+       </flow:flow>\r
+\r
+       <flow:flow id="test.list.flow1" parent="test.list.flowTemplate">\r
+               <flow:arg name="list1">\r
+                       <list>\r
+                               <value>val1</value>\r
+                               <value>val2</value>                     \r
+                       </list>\r
+               </flow:arg>\r
+               <flow:arg name="list2">\r
+                       <list>\r
+                               <value>val1</value>\r
+                               <value>val2</value>                     \r
+                       </list>\r
+               </flow:arg>\r
+               \r
+               <!-- not used in flow (just to test that the syntax is accepted): -->\r
+               <flow:arg name="dummyMap">\r
+                       <map></map>\r
+               </flow:arg>\r
+               <flow:arg name="dummySet">\r
+                       <set></set>\r
+               </flow:arg>\r
+               <flow:arg name="dummyProperties">\r
+                       <props></props>\r
+               </flow:arg>             \r
+               \r
+       </flow:flow>\r
+       \r
+       <flow:flow id="test.list.flow2" parent="test.list.flowTemplate">\r
+               <description>use default value for parameter "list1"</description>\r
+               <flow:arg name="list2">\r
+                       <list>\r
+                               <value>val1</value>\r
+                       </list>\r
+               </flow:arg>\r
+       </flow:flow>\r
+\r
+\r
+</beans>
\ No newline at end of file