]> git.argeo.org Git - gpl/argeo-slc.git/blob - demo/modules/org.argeo.slc.demo.basic/META-INF/spring/namespace.xml
Refactor demo
[gpl/argeo-slc.git] / demo / modules / org.argeo.slc.demo.basic / META-INF / spring / namespace.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/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
8 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-0.12.xsd">
9
10 <!-- Flow definition is simplified thanks to the 'flow:flow' element -->
11 <flow:flow id="flow" path="/namespace">
12 <bean p:message="TEST in flow" class="org.argeo.slc.core.execution.tasks.Echo" />
13 <ref bean="referencedRunnable" />
14 </flow:flow>
15
16 <bean id="referencedRunnable" p:message="TEST in referenced Runnable"
17 class="org.argeo.slc.core.execution.tasks.Echo" />
18
19 <!--
20 Standalone beans implementing Runnable can be exposed as flows via the
21 'flow:as-flow' attribute
22 -->
23 <bean id="standaloneRunnable" flow:as-flow="implicitFlow"
24 p:message="TEST in implicit flow" class="org.argeo.slc.core.execution.tasks.Echo" />
25
26 <!-- Specs definition is also simplified -->
27 <flow:spec id="namespaceSpec">
28 <flow:primitive name="primitive" value="100"
29 isParameter="true" type="integer" />
30 </flow:spec>
31
32 <flow:flow id="flowSpec" spec="namespaceSpec" path="/namespace">
33 <bean p:message="TEST in flow @{primitive}" class="org.argeo.slc.core.execution.tasks.Echo"
34 scope="execution">
35 <aop:scoped-proxy />
36 </bean>
37 <ref bean="referencedRunnable" />
38 </flow:flow>
39
40 </beans>