Package org.springframework.webflow.execution.repository

Examples of org.springframework.webflow.execution.repository.FlowExecutionLock


    }
  }

  public void testGetLock() {
    FlowExecutionKey key = repository.parseFlowExecutionKey("e12345s54321");
    FlowExecutionLock lock = repository.getLock(key);
    assertNotNull(lock);
    lock.unlock();
  }
View Full Code Here


      if (logger.isDebugEnabled()) {
        logger.debug("Resuming flow execution with key '" + flowExecutionKey);
      }
      ExternalContextHolder.setExternalContext(context);
      FlowExecutionKey key = executionRepository.parseFlowExecutionKey(flowExecutionKey);
      FlowExecutionLock lock = executionRepository.getLock(key);
      lock.lock();
      try {
        FlowExecution flowExecution = executionRepository.getFlowExecution(key);
        flowExecution.resume(context);
        if (!flowExecution.hasEnded()) {
          executionRepository.putFlowExecution(flowExecution);
          return createPausedResult(flowExecution);
        } else {
          executionRepository.removeFlowExecution(flowExecution);
          return createEndResult(flowExecution);
        }
      } finally {
        lock.unlock();
      }
    } finally {
      ExternalContextHolder.setExternalContext(null);
    }
  }
View Full Code Here

    }
  }

  public void testGetLock() {
    FlowExecutionKey key = repository.parseFlowExecutionKey("e12345s54321");
    FlowExecutionLock lock = repository.getLock(key);
    assertNotNull(lock);
    lock.unlock();
  }
View Full Code Here

      ExternalContextHolder.setExternalContext(context);
      FlowDefinition flowDefinition = definitionLocator.getFlowDefinition(flowId);
      FlowExecution flowExecution = executionFactory.createFlowExecution(flowDefinition);
      flowExecution.start(input, context);
      if (!flowExecution.hasEnded()) {
        FlowExecutionLock lock = executionRepository.getLock(flowExecution.getKey());
        lock.lock();
        try {
          executionRepository.putFlowExecution(flowExecution);
        } finally {
          lock.unlock();
        }
        return createPausedResult(flowExecution);
      } else {
        return createEndResult(flowExecution);
      }
View Full Code Here

      if (logger.isDebugEnabled()) {
        logger.debug("Resuming flow execution with key '" + flowExecutionKey);
      }
      ExternalContextHolder.setExternalContext(context);
      FlowExecutionKey key = executionRepository.parseFlowExecutionKey(flowExecutionKey);
      FlowExecutionLock lock = executionRepository.getLock(key);
      lock.lock();
      try {
        FlowExecution flowExecution = executionRepository.getFlowExecution(key);
        flowExecution.resume(context);
        if (!flowExecution.hasEnded()) {
          executionRepository.putFlowExecution(flowExecution);
          return createPausedResult(flowExecution);
        } else {
          executionRepository.removeFlowExecution(flowExecution);
          return createEndResult(flowExecution);
        }
      } finally {
        lock.unlock();
      }
    } finally {
      ExternalContextHolder.setExternalContext(null);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.repository.FlowExecutionLock

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.