I hope, Business processes in an application are defined as work flow and executed by work flow engine.
If a java based application uses work flow engine, then what stuff will be written using java code. Java code just used to invoke work flow engine??
Note: for business validation I use rule and its engine
I imagine the engines would work by your code calling methods on them. i.e. you would use a library, then import the classes and call methods on them.
I had a little experience with jBPM. You defined your processes in an xml file (which was uploaded to the db). The engine then gave you TaskInstances, ProcessInstances, etc. and had support for JAAS (to manage authentication).
Perhaps look it up and see if it will meet your needs?