//Get the requested ProcedureService from Spring
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("procedures-beans.xml");
ProcedureService procedureService = (ProcedureService) context.getBean(procedureName);
//Store the procedure so it has a valid id
persistenceService.storeProcedure(newProcedure);
//Configure the ProcedureService
procedureService.configure(emergencyId, newProcedure, parameters);
//Update the procedure.