hi minal
Actually I haven't done this type of program which you are doing but what I know is when we use "service task" in process flow to access java class, we have to set Variable using JavaDelegate Interface… and this simple process illustrated below
import org.activiti.engine.delegate.*;
import org.bean.getterSetter;
public class CustomerDetails implements JavaDelegate {
@Override
public void execute(DelegateExecution DE) {
BeanClass bc = new BeanClass(); //this instance is from bean class getterSetter which is imported above
bc.setName((String) DE.getVariable("name"));
bc.setSurname((String) DE.getVariable("surname"));
DE.setVariables("customerDetails", bc); //here we set variable which can be accessed from process "${customerDetails.name}, ${customerDetails.surname}"
}
}