Lines beginning w/ # are notes. Any other line represents a command.
# update installer.properties:
# if using Java 7, remove child notes of <fileset dir="${java.share.dir}"> in build.xml
ant install-forge
new-project --named greeting --topLevelPackage org.example.greeting
project install-facet switchyard
? Application name (e.g. myApp) greeting
project install-facet switchyard.bpm
bpm-service create --serviceName Greeting
project install-facet switchyard.bean
bean-service create --serviceName Hello
bean-service create --serviceName Goodbye
switchyard create-service-test --serviceName Greeting
# copy file Greeting.bpmn to src/main/resources/META-INF/
# replace contents of HelloBean.java and GoodbyeBean.java process method w/ System.out.println("Hello, " + content); and System.out.println("Goodbye, " + content); respectively
# change signature of method on Greeting to void greet(String name);
# change message in GreetingTest to service.sendInOnly("JAX");
# add <component name="Hello"></component> and <component name="Goodbye"></component> nodes as children of the <composite> node in switchyard.xml
switchyard add-reference --referenceName Hello --interfaceType java --interface org.example.greeting.Hello --componentName Hello
switchyard add-reference --referenceName Goodbye --interfaceType java --interface org.example.greeting.Goodbye --componentName Goodbye
test
switchyard promote-service --serviceName Greeting
camel-binding bind-service --serviceName Greeting --configURI file:///tmp/input
build
mkdir /tmp/input
echo "SwitchYard" > /tmp/input/message.txt
# Observe the following output in the AS 7 console:
# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Hello, SwitchYard
# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)
# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Goodbye, SwitchYard
# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)
Good luck!
-Dan