Look at chapter 13 of the docs - http://docs.jboss.org/jbpm/v5.1/userguide/ch13.html. Specifically 13.2.4 Executing Service Nodes.
Also looking at the workitem handler example in 13.2.4 when your process reaches the workitem node, the handler's executeWorkItem method gets called. This is all java code, so as long as you have your specific classes you want to call methods upon on the classpath, you can do whatever you want.