I'm trying to implement a SWF action like this:
@Component(value = "initializeProjectsTestingFormAction")
public class InitializeProjectsTestingFormAction implements Action {
@Autowired
private ProjectsBo projectsBo;
@Override
public Event execute(RequestContext requestContext) throws Exception {
ProjectsTestingForm projectsTestingForm = (ProjectsTestingForm) requestContext.getFlowScope().get("projectsTestingForm");
EndUse selectedEndUse = (EndUse) requestContext.getFlowScope().get("selectedEndUse");
projectsTestingForm.setProjects(projectsBo.findImplementableProjectsForTesting(selectedEndUse));
return new Event("", "initializeProjectsTestingFormAction");
}
}
It currently works fine when the flow invokes the action, but I feel slightly unsettled about the Event that the action have to return. Does anybody knows what the Event is and what could affect to the flow behavior depending on its values (source and id)?
I was reading the documentation but I'm not able to understand at all and answer myself the question:
http://static.springsource.org/spring-webflow/docs/2.3.x/javadoc-api/index.html http://static.springsource.org/spring-webflow/docs/2.3.x/javadoc-api/org/springframework/webflow/execution/Event.html
Thanks in advance.