Examples of OsWorkflowContext


Examples of org.springmodules.workflow.osworkflow.OsWorkflowContext

  }

  public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
      throws Exception {

    OsWorkflowContext context = OsWorkflowContextHolder.getWorkflowContext();
    context.setCaller(getCaller(request));

    if (isAllowOverrideWithRequestParameter()) {
      long instanceIdFromRequest = RequestUtils.getLongParameter(request, getOverrideRequestParameterKey(), Long.MIN_VALUE);
      if (instanceIdFromRequest != Long.MIN_VALUE) {
        System.out.println("Setting instance id");
        context.setInstanceId(instanceIdFromRequest);
      }
      else if (isSessionStorageEnabled()) {
        HttpSession session = request.getSession();

        Object instanceId = session.getAttribute(SESSION_KEY_INSTANCE_ID);

        if ((instanceId != null) && (instanceId instanceof Long)) {
          context.setInstanceId(((Long) instanceId).longValue());
        }
      }
    }

View Full Code Here

Examples of org.springmodules.workflow.osworkflow.OsWorkflowContext

   * @see #setSessionStorageEnabled(boolean)
   */
  public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView)
      throws Exception {

    OsWorkflowContext context = OsWorkflowContextHolder.getWorkflowContext();

    if (isSessionStorageEnabled() && context.hasInstanceId()) {

      HttpSession session = request.getSession();

      session.setAttribute(SESSION_KEY_INSTANCE_ID, new Long(context.getInstanceId()));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.