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();

server.start();

 

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

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

client.connect();

 

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.

 

Enjoy!