/** * Submit the job to a shared launch.queue accross multiple gfac instances * * @param experimentId * @param processId * @param tokenId * @return * @throws OrchestratorException */ public boolean submit(String experimentId, String processId, String tokenId) throws OrchestratorException { try { String gatewayId = null; CredentialReader credentialReader = GFacUtils.getCredentialReader(); if (credentialReader != null) { try { gatewayId = credentialReader.getGatewayID(tokenId); } catch (Exception e) { logger.error(e.getLocalizedMessage()); } } if (gatewayId == null || gatewayId.isEmpty()) { gatewayId = ServerSettings.getDefaultUserGateway(); } ProcessSubmitEvent processSubmitEvent = new ProcessSubmitEvent(processId, gatewayId, experimentId, tokenId); MessageContext messageContext = new MessageContext( processSubmitEvent, MessageType.LAUNCHPROCESS, "LAUNCH" + ".TASK-" + UUID.randomUUID().toString(), gatewayId); messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp()); publisher.publish(messageContext); } catch (Exception e) { logger.error(e.getMessage(), e); throw new OrchestratorException(e); } return true; }