try {
_userList.checkConnection(sessionHandle);
} catch (YAuthenticationException e) {
return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
}
YAWLServiceReference service = YAWLServiceReference.unmarshal(serviceStr);
if (null != service) {
if (null == _engine.getRegisteredYawlService(service.getURI())) {
try {
_engine.addYawlService(service);
return SUCCESS;
} catch (YPersistenceException e) {
enginePersistenceFailure = true;
return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
}
} else {
return OPEN_FAILURE + "Engine has already registered a service with " +
"the same URI [" +
service.toXML() + "]" + ".</reason></failure>";
}
} else {
return OPEN_FAILURE + "Failed to parse yawl service from [" +
serviceStr + "]" + ".</reason></failure>";
}