}
return service;
}
protected TaskDefinitionService createTaskService(HttpServletRequest request, String usr, String pwd) {
GuvnorTaskDefinitionService service = (GuvnorTaskDefinitionService) WebApplicationContextUtils.
getWebApplicationContext(request.getSession().getServletContext()).getBean("guvnorTaskService");
if (usr != null && pwd != null) {
service.setUser(usr);
service.setPassword(pwd);
try {
service.afterPropertiesSet();
} catch (Exception e) { }
}
return service;
}