/** * Removes an incoming rnrm:isFlowingTo edge from the specified element such that a path from the * start element to the specified element still exists. * * @param procElement Element to remove an incoming edge from * @return True if an edge was safely removed. False if no edges could be removed without * eliminating the path. */ public boolean removeNonBreakingIncomingArc(Resource procElement) { boolean foundSafeRemoval = false; if (process.completePathExists()) { List<Statement> incomingArcs = process.getIncomingEdges(procElement); for (Statement stmt : incomingArcs) { process.getModel().remove(stmt); if (process.pathExists(process.getStartElement(), procElement)) { foundSafeRemoval = true; break; } else { process.getModel().add(stmt); } } } return foundSafeRemoval; }