As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public static NodeRef getAssociatedSimulationNodeRef(NodeRef sourceNodeRef, NodeService nodeService) throws SimulationFileNotFoundException { // Get the specific association List<AssociationRef> simulationAssociationRefList = nodeService.getTargetAssocs(sourceNodeRef, IFwsModel.PROP_RELATED_SIMULATION); // Check that the association exist if (simulationAssociationRefList.isEmpty() ) { // No association found throw new SimulationFileNotFoundException(); } // Get the associated reference NodeRef simulationNodeRef = simulationAssociationRefList.get(0).getTargetRef(); // Check that the associated file already exist if (! nodeService.exists(simulationNodeRef)) { // The node doesn't exist anymore throw new SimulationFileNotFoundException(); } return simulationNodeRef; }