We are using restful api to access Activiti Process as webservices.We are sending parameters (including objects) to workflow serviceTask.But when we try to retrieve the object in JavaDelegate using "execution.getVariable("objectName")" ,its return String object byDefault which cannot be cast to specific bean object which it belongs.the exception —–> java.lang.ClassCastException: java.lang.String cannot be cast to net.simplyfiIT.dto.UserBean
here how I send parameters to the workflow——–> param.put("processDefinitionId", processDefinitionId);
param.put("beanObject",user);
param.put("screenName", screenName);
param.put("action","Initiate Create User");
param.put("object", object);
//Call activiti api
processInstanceId=HandleActivitiProcess.startRequestedProcess(param);
here how I get variable in JavaDelegate——>Object obj = execution.getVariable("beanObject"); //this is the object
String scName = (String) execution.getVariable("screenName");