Hi ABIDI,
The easy way to deploy all classes and xml is using the zip, you can put all classes and xml files into a zip file, and deploy it together.
processEngine.createDeployment().addResourcesFromZipInputStream(zis).deploy;
When you do that, please make sure putting the class file on the right place, you could see more information in the User Guide.
http://docs.jboss.com/jbpm/v4/userguide/html_single/#deployingclasses