Sorry but You have not seen the attachment code.. the problem exist because at HT2 i have null variable aldow it have been set at HT1.. full code of getProcessParameter is:
public Object getProcessParameter(StatefulKnowledgeSession ksession, Long processInstanceId, Long taskId, String key) { String paramInfo = "getProcessParameter sessionid: " + ksession.getId() + "," + ksession.hashCode() + " processInstanceId: " + processInstanceId + " taskId: "+taskId; WorkflowProcessInstance workflowProcessInstance = (WorkflowProcessInstance) ksession .getProcessInstance(processInstanceId); Object retObj = null; if (workflowProcessInstance == null || workflowProcessInstance.getVariable(key) == null) { TaskService taskService = getLocalTaskService(); Task task = taskService.getTask(taskId); TaskData taskData = task.getTaskData(); Long documentContentId = taskData.getDocumentContentId(); Content content = taskService.getContent(documentContentId); Map variableMap = ((Map) ContentMarshallerHelper .unmarshall(content.getContent(), null)); retObj = variableMap.get(key); paramInfo=paramInfo+" From documentContent "; } else { paramInfo=paramInfo+" From workflowProcessInstance "; retObj = workflowProcessInstance.getVariable(key); } paramInfo=paramInfo+" <" + key + "," + retObj + ">"; log.info(paramInfo); return retObj; }