}else {
if (!isWorkflowInstanceNodePresent(workflowNodeGramData.getWorkflowInstanceId(),workflowNodeGramData.getNodeID(), true)){
throw new WorkflowInstanceNodeDoesNotExistsException(workflowNodeGramData.getWorkflowInstanceId(),workflowNodeGramData.getNodeID());
}
WorkflowDataResource workflowInstance = jpa.getWorker().getWorkflowInstance(workflowNodeGramData.getWorkflowInstanceId());
GramDataResource gramData;
if (workflowInstance.isGramDataExists(workflowNodeGramData.getNodeID())){
gramData = workflowInstance.getGramData(workflowNodeGramData.getNodeID());
}else{
gramData = workflowInstance.createGramData(workflowNodeGramData.getNodeID());
}
gramData.setInvokedHost(workflowNodeGramData.getInvokedHost());
gramData.setLocalJobID(workflowNodeGramData.getGramJobID());
gramData.setRsl(workflowNodeGramData.getRsl());
gramData.save();
}
}