String nodeId) throws RegistryException {
if (provenanceRegistry != null){
provenanceRegistry.addWorkflowInstanceNode(workflowInstanceId, nodeId);
}else {
if (isWorkflowInstanceNodePresent(workflowInstanceId, nodeId)){
throw new WorkflowInstanceNodeAlreadyExistsException(workflowInstanceId, nodeId);
}
NodeDataResource nodeData = jpa.getWorker().getWorkflowInstance(workflowInstanceId).createNodeData(nodeId);
nodeData.save();
}