* @param processJaxb the process jaxb
* @return the process node
*/
private ProcessNode createRunningProcessNode(String clientId, ClientNode clientNode, TProcess processJaxb) {
// create the running node
RunningNode runningNode = runningNodeRepositoryService
.getOrCreateRunningNode(clientId);
clientNode.addRelationshipToRunningProcessNode(runningNode);
clientNodeRepositoryService.save(clientNode);
LOG.debug(String.format("Added %s with grapId: %s to neo4j db",
runningNode, runningNode.getGraphId()));
// create the running process node or get it from the db (eg. restart of
// the process engine)
ProcessNode runningProcess = processRepositoryService
.getOrCreateProcessNode(new ProcessNode(
IdService.getUniqueProcessId(clientId, processJaxb),
processJaxb.getId(),
processJaxb.getName(),
ExtensionService.getTVersion(processJaxb).getVersion()));
runningNode.addRelationshipToProcessNode(runningProcess);
runningNodeRepositoryService.save(runningNode);
LOG.debug(String.format("Added %s with grapId: %s to neo4j db",
runningProcess, runningProcess.getGraphId()));