Keith Babo

SwitchYard Tooling Preview

Posted by Keith Babo May 23, 2012

The SwitchYard team has been hard at work in the 0.5 release crafting some cool Eclipse-based tooling for creating SwitchYard applications.  The goal of the tooling is twofold:


  1. Provide a visual representation of a service-oriented application.  Integration and SOA apps can get quite sophisticated and it's easy to lose sight of the composition of your application without a visualization.
  2. Streamline the development process by making it quick and easy to create service-oriented applications from a visual representation.


We still have a ways to go, but I think what's there now is quite impressive.  Here's a quick video I put together showcasing some of the features being worked on.   Do your eyes a favor and watch it expanded in HD and not embedded.




As always, we would love to hear your feedback.  Swing by the forums and let us know what you think.

In SwitchYard 0.5, a new and convenient way to map variables into and out of your jBPM processes has been introduced.  The same goes for mapping variables into Drools globals.  This is done by leveraging the MVEL expression language.  Via XML or Java annotations, you can easily navigate your SwitchYard Exchange, Context or Message objects and pull out the data you want to set into your process or rules.


Here's a quick example using XML (you can also use the @Mapping annotation):


        <mapping expression="context['org.switchyard.messageId']" variable="messageId"/>
        <mapping expression="message.content" variable="payload"/>


And here's one using annotations (you can also use the <mapping/> element):


    @Mapping(expression="exchange.serviceName.localPart", variable="service")


To learn more and see more complete examples, please refer to the Mapping Parameter/Result Variables section of the BPM Services documentation, as well as the Mapping Global Variables section of the Rules Services documentation.



Keith Babo

Forge Updates

Posted by Keith Babo Apr 17, 2012

A few updates on the Forge front.


First, after an overly long stay on Forge Beta 3, we have upgraded our Forge support to 1.0.2.Final.  This also happens to bring us up to the current support level for Forge within JBoss Tools.  If you haven't tried out the Forge Console in JBDS yet, give it a shot.  You get the best of both worlds - quick bootstrap with Forge and powerful edit/build/debug support in Eclipse all in one package.  Forge 1.0.2.Final can be downloaded from the Forge docs page and our latest installer for the SwitchYard plugins can be found in the latest nightly build.


I also wanted to take a moment to thank Mario Antollini for his recent contributions to our Forge tooling.  He added two new commands for creating service references for an existing service implementation - a general command (add-reference) which updates the switchyard.xml and a specific command for CDI bean services (bean-reference).  This comes off pretty nicely considering you can go from nothing to a service implementation with a dependency on another service in two commands:


bean-service create --serviceName OrderService
bean-reference create --beanName OrderService --referenceName InventoryService


Gets you this:


public class OrderServiceBean implements org.example.OrderService {

   public void process(String content) {
        // Add processing logic here

   private @Reference("InventoryService")
   InventoryService inventory;



None too shabby.

If you're interested in learning a bit more about the foundation for our runtime governance support in SwitchYard, check out this video:




This is the first video we've recorded in 1920x1200, so please let us know if there's an issue with the resolution.  As always, viewing the HD version of the video is recommended.

Keith Babo

Design-Time Governance

Posted by Keith Babo Mar 29, 2012

One of the primary themes for our 0.4 release was governance and how we can support common governance capabilities at both design-time and runtime.  Governance is an incredibly broad domain, so we started with the basics.  In the case of design-time governance, this meant exploring the workflow and capabilities a user might want for interacting with a service repository.  The details are covered in the docs, but I find that seeing things in action is the best way to learn.  I have created a screencast based on our Repository Integration example, so if you like to see before you do, then here ya go.


BTW, I recommend watching the video in HD full-screen vs. embedded.  Both flavors included below.




This is just the tip of the iceberg in our overall SOA governance support.  If you want to see where things will go from here, check out the Overlord project.

Keith Babo

SwitchYard 0.4 Released

Posted by Keith Babo Mar 28, 2012

We took a little extra time with this one, but it was worth it.  A primary theme of 0.4 was how the ESB can be used in the context of governance, at design-time and runtime.  We're really happy with the progress we've made there and we're just getting warmed up.  In total, there were 105 JIRAs resolved in 0.4, so there's plenty in there beyond governance as well.  The juicy details can be found in the SwitchYard 0.4 Release Overview, which contains a list of all the new features with pointers to examples and documentation on each.


We have a sizeable backlog of videos we've been planning on everything from getting stuff installed, to feature profiles, to exploration of the more obscure aspects of the project.  So stay tuned and let us know what you think!



The SwitchYard Team

SwitchYard 0.4 is almost out the door, and with it comes a brand-spankin' new API for BPM task integration!


Whereas the underlying BPM implementation is jBPM 5.2.0.Final, the API wraps it with SwitchYard interfaces.  How easy is it to use these interfaces?


Here's the minimal code for starting a TaskServer (host/port is overridable):

TaskServer server = TaskService.instance().newTaskServer();



And the minimal code for connecting a TaskClient (host/port is overridable):

TaskClient client = TaskService.instance().newTaskClient();



How about getting, claiming, starting and completing a Task?

String userId = "david";

List<String> groupIds = Arrays.asList(new String[]{"users"});

Task task = client.getTasksAssignedAsPotentialOwner(userId, gropuIds).iterator().next();

client.claim(task.getId(), userId, groupIds);

client.start(task.getId(), userId);

client.complete(task.getId(), userId, null);


Make sure you check out the links below for more detailed information:


And of course we are always available in the SwitchYard Forums or #switchyard on freenode.



The good folks at have put up a brief interview with the SwitchYard team here:


Expect to see a lot more content rolling out as we are wrapping up 0.4.  We dropped CR1 last week and Final will be out next week.

Keith Babo

JUDCon India 2012

Posted by Keith Babo Jan 27, 2012

Just got back home from JUDCon India 2012 and all I can say is "Wow!".  Magesh and I gave a talk on SwitchYard and I also had a chance to participate in the developer panel at the end of day 1.  The entire trip was a fantastic experience, albeit a bit short.  I just checked and I spent about 49 hours traveling to and from India and only 72 hours in the country itself!  Here are my highlights of the trip:


  • This was my first time in India and I was really impressed by both the people and the fusion of culture and technology in the city of Bangalore.  Taxi rides were .. ehm ... exciting! ;-)
  • The conference itself was huge!  Huge venue, huge turnout.  Great to see that level of interest in JBoss technologies.  Conference producers (Saltmarch Media) did an excellent job.
  • Man, we (JBoss) are working on a lot of cool and diverse stuff.  It's tough to pay attention to everything we are doing in the community, so this was a great chance to get a quick rundown of what a lot of other projects are up to.  I was surprised to see how well Spring and CDI can integrate in Ray's talk.  The CapeDwarf work that Ales has been doing was completely new to me and very cool.
  • On the Monday before the conference, Magesh and I met to run through our presentation and we both came to the realization that there's too much stuff to talk about in a single presentation.  This is really a testament to how much our contributors have been able to create in SwitchYard in a relatively short period of time.  The upshot here is that you can expect us to grow Infinispan-style in future conferences, with multiple focused presentations on cool bits of SwitchYard.


All of the talks will be available for download and video will be available as well.

Is it auspicious to say that SwitchYard now uses "Flux Capacitor"? Well, yes! Because that is the code name of JBoss AS 7.1.0.CR1. The nightly builds of SwitchYard now uses Flux Capacitor. How cool is that? You can download the nightlies from here:


SwitchYard Runtime


SwitchYard Team!

Keith Babo

SwitchYard 0.3 Released

Posted by Keith Babo Dec 8, 2011

The JIRAs are closed, the bits are hosted, and the docs are ready to go.  SwitchYard 0.3.0 Final is ready to rock!  As always, we've created a summary of what's in this release with pointers to more info.  Check out the 0.3 Release Overview, take SwitchYard for a spin, and please let us know what you think!



The SwitchYard Team

A quick heads up that I have posted the presentations and lab materials from our recent SwitchYard workshops to our community space.  So if you want to learn a bit more about SwitchYard or just really like to review presentation slides, head on over and check it out.

The SwitchYard 0.2 release contained full JBoss AS6 and JBoss AS7 distributions i.e. modified AS6 and AS7 distributions containing the "bits" to allow it run SwitchYard applications.  SwitchYard 0.3 will also contain a JBoss AS7 Installer, which will allow you to install SwitchYard into an existing JBoss AS7 instance.


This installer is a simple .zip file containing an Ant script plus all the components for AS7.  It reduces the download binary size quite a bit - 40M Vs 120M (for the full distribution), and we'll be reducing it more.


The nightly builds can be found here.  Just download the "" file, unzip it and follow the instructions in the README.txt file.

As Keith mentioned in his postSwitchYard Plugin for Eclipse, we have some initial Eclipse based tooling for SwitchYard (prototype may be a better word as the tooling is likely to evolve rapidly in the next few months).


The tooling may be installed atop any standard Eclipse IDE for JEE distribution version 3.6 or later.  You may use another type of distribution, but you will need to figure out which features need to be installed; at a minumum you will need XML tools and JEE project facets.


In addition to the basic Eclipse platform, you will also need to install m2eclipse version 1.0 or later.  (Note, for those of you using an older version of m2eclipse, this version is more tightly integrated and may require you to install additional Eclipse plugins to support specific Maven plugin executions.  If you're not already using m2eclipse 1.0, you may want to use a separate Eclipse install until you are sure the latest version supports all the Maven plugins you are using.)  If an update site for m2eclipse is not already configured in your Eclipse install, here's the URL:


Keith did a great job describing the installation steps, so I won't rehash them here.

** The SwitchYard tooling is now available from the JBoss SOA Tools update site:


This initial version of the tooling provides the following features:

  • Creation of SwitchYard projects.
  • Creation of SwitchYard bean service classes.
  • Creation of SwitchYard service unit test classes.
  • XML catalog entries for all SwitchYard project schema.
  • m2eclipse support for the SwitchYard Maven plugin.
  • Support for workspace deployment of SwitchYard projects.

New Wizards

All SwitchYard wizards are accessible from the SwitchYard category in the standard Eclipse new wizard:


New SwitchYard Project Wizard

The new project wizard creates a new maven project in your workspace whose pom contains the basic SwitchYard dependencies and build configuration.  To create a new SwitchYard project, select SwitchYard Project.


The first screen is a basic new project screen, allowing you to specify the name and location of the new project:



The second page allows you to specify some basic project details, including the SwitchYard runtime version:


Press Finish and you'll have a new project ready for you to create some services.


New Bean Service Wizard

This wizard creates a new Java class with SwitchYard annotations that mark it as a bean service.  In addition to creating the class, the pom may be updated to ensure the necessary dependencies are included in the project definition and to ensure that the SwitchYard Maven plugin is configured to scan for bean services.


Before opening the wizard, you should create a Java interface on which your service will be based.  For best results, open the new wizard by right-clicking the interface file. selecting New, Other..., then select Bean Service under the SwitchYard category.  The first page looks similar to the standard new class wizard.  The main differences are the Service Interface field, which allows you to specify the interface on which the implementation will be based, and the Create test class option, which allows you to create a service test class, in addition to the implementation class.  Here's a screenshot:


Press Finish and you should have a new Java class with a @Service annotation ready for coding.  If you selected Create test class, you will also have a unit test ready to be implemented as well.


New Service Test Wizard

This wizard creates a new service test class.  The class is created from Java interface used to define a service interface.  The class that is created contains stub methods for each operation in the interface.  The method stubs include code for passing a message to the operation and processing the result.  You only need to initialize the message data and validate the results.  The following illustrates the stubs that are created by the wizard:


@SwitchYardTestCaseConfig(mixins = CDIMixIn.class, config = SwitchYardTestCaseConfig.SWITCHYARD_XML)
public class ExampleServiceTest {

    private Invoker service;

    public void testSomeInOnlyOperation() throws Exception {
        // TODO Auto-generated method stub
        // initialize your test message
        Object message = null;

        // validate the results
        Assert.assertTrue("Implement me", false);

    public void testSomeInOutOperation() throws Exception {
        // TODO Auto-generated method stub
        // initialize your test message
        Object message = null;
        String result = service.operation("someInOutOperation")

        // validate the results
        Assert.assertTrue("Implement me", false);



As with the new bean service wizard, best results are obtained by opening the wizard via a right-click on the interface file.  The wizard is a slimmed down version of the standard new class wizard, which only allows you to specify the service interface which you are testing.  Here's a screenshot:



The Browse... button will allow you to browse all Java interfaces used by any SwitchYard services within the project.  Here's a screenshot:


Press Finish on the wizard and you've got a unit test ready to be implemented.  Just initialize the test messages and add some validation and you're off!

XSD Catalog

The tooling provides an XML catalog for resolving all namespaces declared within SwitchYard.  For best results, uncheck Honour all XML schema locations in the XML file validation preferences.  If you're seeing bizarre XML validation errors, you probably haven't unchecked this option.  Here's a screenshot to help:


m2eclipse Support

The tools provide support for using the SwitchYard Maven plugin within Eclipse.  The SwitchYard plugin will be invoked during an Eclipse build and supports auto/incremental builds.  (Note, incremental builds may produce a switchyard.xml file that contains phantom elements.  If you remove or rename services, i.e. @Service, you should run a clean build for best results.)

Workspace Deployment

The tools provide very crude support for workspace deployments.  SwitchYard projects created through the new wizard are created as faceted projects, configured as Utility Modules.  This will allow you to mark the project for deployment to a JEE server.  That said, it's up to you to ensure the server configured to deploy and run SwitchYard applications.  At some point, we will have proper integration with the Eclipse Servers, allowing deployment only to servers supporting SwitchYard deployments.


Here's a list of issues you should be aware of:

  • If you do not have the JBoss Maven repository configured in your workspace, you may not get a list of SwitchYard runtime versions in the new project wizard.  The tools now configure a custom repository pointing to JBoss public.  This will not alter the behavior of project poms, but will allow the JBoss repository to be scanned by tooling components.
  • The generated switchyard.xml file may contain phantom elements. Perform a clean build, Project, Clean..., to completely regenerate the fiile.  (See m2eclipse Support above.) This has been fixed as part of
  • Make sure you disable Honour all XML schema locations in the XML validation preferences.  (See XSD Catalog above.)
  • There is currently an NPE in the new bean service wizard.  The workaround is to make sure Create test class is checked in the wizard (luckily, that's the default).  Hopefully, this is fixed by the time you read this.  This has been addressed.http://
  • There is a bug in the new Service Test wizard that prevents its use when installed atop Eclipse 3.6.  Make sure you uncheck "Create test class" in the new Bean Service wizard until this is fixed.  (This is not an issue when using Eclipse 3.7.)

As with anything, if you find a bug or have a feature request, please file a JIRA:

Rob has created an initial version of a SwitchYard plugin for Eclipse.  Please note the emphasis on initial, since this thing is just getting started.  That said, I think it's already super valuable for SwitchYard developers because it wires us into the Eclipse build cycle via m2eclipse.  This means auto-builds and unit tests can be run directly inside of Eclipse and you still get the benefit our our service scanners and config generation (which are implemented as Maven plugins).  This feature alone is worth your time to install another plugin.  Read on if you want to give it a try ....


The plugin is currently available through the SwitchYard-Tools Jenkins build here : .  From this link you can download the offline site archive ( or you can point directly at the following URL as an Eclipse update site:


That looks a little something like the following:




Rob has added a couple more features beyond the build lifecycle integration, so hopefully this will serve as bait for him to discuss them in greater detail. :-)  Between Forge and JBDS, I think we have the foundation for a great tooling story in SwitchYard.  Stay tuned.

Filter Blog

By date:
By tag: