WorkflowNodeDetails details = (WorkflowNodeDetails)airavataRegistry.get(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNodeId);
if(details == null) {
details = new WorkflowNodeDetails();
details.setNodeInstanceId(workflowNodeId);
}
WorkflowNodeStatus status = new WorkflowNodeStatus();
status.setWorkflowNodeState(state);
status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
details.setWorkflowNodeStatus(status);
airavataRegistry.update(RegistryModelType.WORKFLOW_NODE_DETAIL, details, workflowNodeId);
}