I've been trying to take myself through Keith's (rather nice) video demo to get my feet wet with SwitchYard, and I've run into an interesting hitch. (Actually two, but one was trivial to resolve.)
First, the environment I'm using is:
- SwitchYard 0.3.0.Final installed on AS7 via the installer method
- Seam Forge 1.0.0.Beta3 (reports itself as Forge 1.1)
- Eclipse Indigo + JBoss Tools 3.3.0.M4 (not that this probably matters)
I've followed along with the demo line-by-line. (Sometimes I changed the order just a bit, like including all three project facets—switchyard, switchyard.beans, switchyard.bpm—at the same time before creating the services or the bpm-service.)
I've done this a few times now, although the last two times I did this, I got a new bug which I'll report now: sometimes the switchyard.xml file would get created and Eclipse would report an XML validation error. What happens is that the <service name="Greeting"> line woud get added before the
<implementation.bpm xmlns="urn:switchyard-component-bpm:config:1.0" processDefinition="META-INF/Greeting.bpmn" processDefinitionType="BPMN" processId="Greeting"> line, which apparently conflicts with the Schema. Reversing those sections was pretty trivial, but I figure it was worth mentioning it.
Now the real problem occurred when I tried running the unit test. When I ran it, the two messages that got written were "Hello, null" and "Goodbye, null". So obviously something was not getting the messages passed into the Hello and Goodbye services.
As I said, I tried this a few times from the top, just to see if there was a set I was getting wrong. Then on a hunch, I decided to select the 0.2.0 SwitchYard version during the initial forge switchyard facet definition instead of 0.3.0.Final, and this time the demo worked.
Just for good measure, I edited the POM of the working demo, changed the SwitchYard version from 0.2.0 to 0.3.0.Final again, rebuilt, ran the unit test again, and the demo broke again—HelloBean and GoodbyeBean were getting null once more.
One last note: I tried updating the POM to use 0.4.0-SNAPSHOT and got the same null problem.
Update: I created a SWITCHYARD-589 ticket about the XML error, since I was able to diagnose and reproduce the problem easily enough. Let me know if I should create a JIRA ticket for the overall demo null bug. Since I've got no idea what's going wrong, it's a little harder to describe it, but I'm happy to file this in the system if that's a more appropriate place.