public Boolean apply(AppMds mds) throws Exception {
ApplicationSpecification appSpec = getApplicationSpec(mds, id.getApplication());
if (appSpec == null) {
return false;
}
ProgramSpecification programSpecification = null;
try {
if (type == ProgramType.FLOW) {
programSpecification = getFlowSpecOrFail(id, appSpec);
} else if (type == ProgramType.PROCEDURE) {
programSpecification = getProcedureSpecOrFail(id, appSpec);