Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.FlowSession


    @SuppressWarnings("unchecked")
    public Object getReferenceInFlowScope(String flowExecutionKey, String referenceName, HttpServletRequest request) {
        ExternalContextHolder.setExternalContext(new ServletExternalContext(servletContext, request, null));
        FlowExecutionRepository executionRepository =  ((FlowExecutorImpl) flowExecutor).getExecutionRepository();
        FlowExecution flowExecution = executionRepository.getFlowExecution(executionRepository.parseFlowExecutionKey(flowExecutionKey));
        FlowSession flowSession = flowExecution.getActiveSession();
        return flowSession.getScope().get(referenceName);
    }
View Full Code Here


   * @param context the control context for the currently executing flow, used by this state to manipulate the flow
   * execution
   * @throws FlowExecutionException if an exception occurs in this state
   */
  protected void doEnter(final RequestControlContext context) throws FlowExecutionException {
    FlowSession activeSession = context.getFlowExecutionContext().getActiveSession();
    if (activeSession.isRoot()) {
      // entire flow execution is ending; issue the final response
      if (finalResponseAction != null && context.getExternalContext().isResponseAllowed()) {
        ActionExecutor.execute(finalResponseAction, context);
        context.getExternalContext().recordResponseComplete();
      }
View Full Code Here

  // package private request control context callbacks

  void start(Flow flow, MutableAttributeMap input, RequestControlContext context) {
    listeners.fireSessionCreating(context, flow);
    FlowSession session = activateSession(flow);
    if (input == null) {
      input = new LocalAttributeMap();
    }
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    messageContext.setMessageSource(flow.getApplicationContext());
View Full Code Here

    return (FlowSessionImpl) flowSessions.getLast();
  }

  private FlowExecutionException wrap(Exception e) {
    if (isActive()) {
      FlowSession session = getActiveSession();
      String flowId = session.getDefinition().getId();
      String stateId = session.getState() != null ? session.getState().getId() : null;
      return new FlowExecutionException(flowId, stateId, "Exception thrown in state '" + stateId + "' of flow '"
          + flowId + "'", e);
    } else {
      return new FlowExecutionException(flow.getId(), null, "Exception thrown within inactive flow '"
          + flow.getId() + "'", e);
View Full Code Here

    this.transactionTemplate = new TransactionTemplate(transactionManager);
  }

  public void sessionStarting(RequestContext context, FlowSession session, MutableAttributeMap input) {
    if (!session.isRoot()) {
      FlowSession parent = session.getParent();
      if (isPersistenceContext(parent.getDefinition())) {
        unbind(getEntityManager(parent));
      }
    }
    if (isPersistenceContext(session.getDefinition())) {
      EntityManager em = entityManagerFactory.createEntityManager();
View Full Code Here

      }
      unbind(em);
      em.close();
    }
    if (!session.isRoot()) {
      FlowSession parent = session.getParent();
      if (isPersistenceContext(parent.getDefinition())) {
        bind(getEntityManager(parent));
      }
    }
  }
View Full Code Here

    this.entityInterceptor = entityInterceptor;
  }

  public void sessionStarting(RequestContext context, FlowSession session, MutableAttributeMap input) {
    if (!session.isRoot()) {
      FlowSession parent = session.getParent();
      if (isPersistenceContext(parent.getDefinition())) {
        unbind(getHibernateSession(parent));
      }
    }
    if (isPersistenceContext(session.getDefinition())) {
      Session hibernateSession = createSession(context);
View Full Code Here

      }
      unbind(hibernateSession);
      hibernateSession.close();
    }
    if (!session.isRoot()) {
      FlowSession parent = session.getParent();
      if (isPersistenceContext(parent.getDefinition())) {
        bind(getHibernateSession(parent));
      }
    }
  }
View Full Code Here

   * @param context the control context for the currently executing flow, used by this state to manipulate the flow
   * execution
   * @throws FlowExecutionException if an exception occurs in this state
   */
  protected void doEnter(final RequestControlContext context) throws FlowExecutionException {
    FlowSession activeSession = context.getFlowExecutionContext().getActiveSession();
    if (activeSession.isRoot()) {
      // entire flow execution is ending; issue the final response
      if (finalResponseAction != null && !context.getExternalContext().isResponseComplete()) {
        ActionExecutor.execute(finalResponseAction, context);
        context.getExternalContext().recordResponseComplete();
      }
View Full Code Here

    getFlashScope().put("messagesMemento", messagesMemento);
  }

  private FlowExecutionException wrap(Exception e) {
    if (isActive()) {
      FlowSession session = getActiveSession();
      String flowId = session.getDefinition().getId();
      String stateId = session.getState() != null ? session.getState().getId() : null;
      return new FlowExecutionException(flowId, stateId, "Exception thrown in state '" + stateId + "' of flow '"
          + flowId + "'", e);
    } else {
      return new FlowExecutionException(flow.getId(), null, "Exception thrown within inactive flow '"
          + flow.getId() + "'", e);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.FlowSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.