And my simple controller is
<code>
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
private String filename = "NewProcess.bpmn20.bpmn";
//@Rule
//public ActivitiRule activitiRule = new ActivitiRule();
/**
* Simply selects the home view to render by returning its name.
* @throws FileNotFoundException
*/
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model) throws FileNotFoundException {
logger.info("Welcome home! The client locale is {}.", locale);
ApplicationContext context = new ClassPathXmlApplicationContext("activiti.cfg.xml");
context.getAutowireCapableBeanFactory().autowireBean(this);
ProcessEngine processEngine1 = (ProcessEngine)context.getBean("processEngine");
List<Task> userAssignedTasks1 = processEngine1.getTaskService().createTaskQuery().list();
model.addAttribute("per1", userAssignedTasks1);
return "home";
}
}
</code>