if (configuration.getAiravataAPI() == null && airavataAPI == null) {
try {
airavataAPI = AiravataAPIFactory.getAPI(configuration.getRegistryURL(),
configuration.getDefaultGateway(), configuration.getRegistryUserName(),
new PasswordCallbackImpl(configuration.getRegistryUserName(), configuration.getRegistryPassphrase()));
configuration.setAiravataAPI(airavataAPI);
} catch (AiravataAPIInvocationException e) {
logger.error("Unable to instantiate airavata api instance", e);
}