I believe you have the process instance ID. So you can find the process definition id using the instance id first.
Using the process def id, you will need to find the Process object to get the node related information.
Here is what you can do,
String strProcessDefId = JPAProcessInstanceDbLog.findProcessInstance(intProcessInstId).getProcessId(); // Get process def id.
readKnowledgeBase(); // Get the knowledge base by feeding it the process name.
Process objProcess = objKBase.getProcess(strProcessDefId); // Process object.
List<NodeInstanceLog> arlNodeInstanceLogList;
for (Node objNode : ((WorkflowProcessImpl) objProcess).getNodes())
{
Map<String, Object> hshMetaData = objNode.getMetaData();
System.out.println(hshMetaData.get("UniqueId"));
}
Regards.