case USER_WORKFLOW:
generator = new QueryGenerator(USER_WORKFLOW);
generator.setParameter(UserWorkflowConstants.OWNER, getUser());
generator.setParameter(UserWorkflowConstants.TEMPLATE_NAME, name);
generator.setParameter(UserWorkflowConstants.GATEWAY_NAME, gateway.getGatewayName());
q = generator.deleteQuery(em);
q.executeUpdate();
break;
case EXPERIMENT:
generator = new QueryGenerator(EXPERIMENT);
generator.setParameter(ExperimentConstants.USERNAME, getUser());