Examples of FlowExecutionKey


Examples of org.springframework.webflow.execution.FlowExecutionKey

        execution.start(null, new MockExternalContext());

        // Flow state: rendered subflow view
        assertTrue(execution.isActive());
        assertEquals("view", execution.getActiveSession().getScope().get("renderCalled"));
        final FlowExecutionKey key1 = execution.getKey();
        assertNotNull(key1);
        assertEquals(key1, keyFactory.parseFlowExecutionKey(key1.toString()));
      
        final MockExternalContext context1 = new MockExternalContext();
        context1.setEventId("submit");
        execution.resume(context1);

        // Flow state: rendered parent view (following subflow termination)
        assertTrue(execution.isActive());
        assertEquals("parentview", execution.getActiveSession().getScope().get("renderCalled"));
        final FlowExecutionKey key2 = execution.getKey();
        assertNotNull(key2);
        assertFalse(key1.equals(key2));
        assertEquals(key2, keyFactory.parseFlowExecutionKey(key2.toString()));

        final MockExternalContext context2 = new MockExternalContext();
        context2.setEventId("submit");
        execution.resume(context2);
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

    public void testNoSuchFlowExecutionException() {
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setRequestURI("test");
        ModelAndView model = (this.resolver.resolveException(request,
            new MockHttpServletResponse(), null,
            new NoSuchFlowExecutionException(new FlowExecutionKey(){
           
                private static final long serialVersionUID = 1443616250214416520L;

                public String toString() {
                    return "test";
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setRequestURI("test");
        request.setQueryString("test=test");
        ModelAndView model = (this.resolver.resolveException(request,
            new MockHttpServletResponse(), null,
            new NoSuchFlowExecutionException(new FlowExecutionKey(){
               
                private static final long serialVersionUID = -4750073902540974152L;

                public String toString() {
                    return "test";
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

  public void render() throws IOException {
    Map model = new HashMap();
    model.putAll(flowScopes());
    exposeBindingModel(model);
    model.put("flowRequestContext", requestContext);
    FlowExecutionKey key = requestContext.getFlowExecutionContext().getKey();
    if (key != null) {
      model.put("flowExecutionKey", requestContext.getFlowExecutionContext().getKey().toString());
      model.put("flowExecutionUrl", requestContext.getFlowExecutionUrl());
    }
    model.put("currentUser", requestContext.getExternalContext().getCurrentUser());
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

  public void putFlowExecution(FlowExecution flowExecution) {
    assertKeySet(flowExecution);
    if (logger.isDebugEnabled()) {
      logger.debug("Putting flow execution '" + flowExecution + "' into repository");
    }
    FlowExecutionKey key = flowExecution.getKey();
    Conversation conversation = getConversation(key);
    FlowExecutionSnapshotGroup snapshotGroup = getSnapshotGroup(conversation);
    FlowExecutionSnapshot snapshot = snapshot(flowExecution);
    if (logger.isDebugEnabled()) {
      logger.debug("Adding new snapshot to group with id " + getSnapshotId(key));
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

  }

  // implementing flow execution key factory

  public void updateFlowExecutionSnapshot(FlowExecution execution) {
    FlowExecutionKey key = execution.getKey();
    Conversation conversation = getConversation(key);
    getSnapshotGroup(conversation).updateSnapshot(getSnapshotId(key), snapshot(execution));
  }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

    Conversation conversation = getConversation(key);
    getSnapshotGroup(conversation).updateSnapshot(getSnapshotId(key), snapshot(execution));
  }

  public void removeFlowExecutionSnapshot(FlowExecution execution) {
    FlowExecutionKey key = execution.getKey();
    Conversation conversation = getConversation(key);
    getSnapshotGroup(conversation).removeSnapshot(getSnapshotId(key));
  }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

    try {
      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);
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

  }

  public void testResumeFlowExecution() {
    String flowExecutionKey = "12345";
    MockExternalContext context = new MockExternalContext();
    FlowExecutionKey key = new GeneratedFlowExecutionKey();

    EasyMock.expect(repository.parseFlowExecutionKey(flowExecutionKey)).andReturn(key);
    EasyMock.expect(repository.getLock(key)).andReturn(lock);

    lock.lock();
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionKey

  }

  public void testResumeFlowExecutionEndsAfterProcessing() {
    String flowExecutionKey = "12345";
    MockExternalContext context = new MockExternalContext();
    FlowExecutionKey key = new MockFlowExecutionKey("12345");

    EasyMock.expect(repository.parseFlowExecutionKey(flowExecutionKey)).andReturn(key);
    EasyMock.expect(repository.getLock(key)).andReturn(lock);

    lock.lock();
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.