Examples of StaticFlowExecutionListenerLoader


Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

        context.getFlowScope().put("testBean", bean);
        return new Event(this, "success");
      }
    });
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(hibernateListener));
    flowExecution = factory.createFlowExecution(flow);
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

        context.getFlowScope().put("testBean", bean);
        return new Event(this, "success");
      }
    });
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(jpaListener));
    flowExecution = factory.createFlowExecution(flow);
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

        assertTrue(context.getFlashScope().contains("rootCauseException"));
        assertTrue(context.getFlashScope().get("rootCauseException") instanceof TestException);
      }
    };
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener));
    FlowExecution execution = factory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertTrue("Should have ended", !execution.isActive());
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

    FlowExecutionListener listener1 = new FlowExecutionListenerAdapter() {
      public void sessionStarting(RequestContext context, FlowSession session, MutableAttributeMap input) {
        starting = true;
      }
    };
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener1));
    FlowExecution execution = factory.createFlowExecution(flowDefinition);
    assertFalse(execution.isActive());
    execution.start(null, new MockExternalContext());
    assertTrue(starting);
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

    FlowExecutionImpl flowExecution = (FlowExecutionImpl) factory.createFlowExecution(flowDefinition);
    LocalAttributeMap executionAttributes = new LocalAttributeMap();
    factory.setExecutionAttributes(executionAttributes);
    FlowExecutionListener listener = new FlowExecutionListenerAdapter() {
    };
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener));
    MockFlowExecutionKeyFactory keyFactory = new MockFlowExecutionKeyFactory();
    factory.setExecutionKeyFactory(keyFactory);
    FlowExecutionKey flowExecutionKey = new MockFlowExecutionKey("e1s1");
    LocalAttributeMap conversationScope = new LocalAttributeMap();
    SimpleFlowDefinitionLocator locator = new SimpleFlowDefinitionLocator();
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

    attributes.add(new FlowElementAttribute("foo", "bar", null));
    factoryBean.setFlowExecutionAttributes(attributes);
    FlowExecutionListener listener = new FlowExecutionListenerAdapter() {

    };
    factoryBean.setFlowExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener));
    factoryBean.setMaxFlowExecutionSnapshots(2);
    factoryBean.setMaxFlowExecutions(1);
    factoryBean.afterPropertiesSet();
    FlowExecutor executor = (FlowExecutor) factoryBean.getObject();
    MockExternalContext context = new MockExternalContext();
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

    DefaultFlowModelHolder holder = new DefaultFlowModelHolder(builder);
    FlowModelFlowBuilder flowBuilder = new FlowModelFlowBuilder(holder);
    FlowAssembler assembler = new FlowAssembler(flowBuilder, new MockFlowBuilderContext("flow"));
    Flow flow = assembler.assembleFlow();
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(new FlowExecutionListenerAdapter() {
      public void viewRendering(RequestContext context, View view, StateDefinition viewState) {
        if (context.getCurrentEvent() != null && context.getCurrentEvent().getId().equals("submit")) {
          BindingResult result = (BindingResult) context.getFlashScope().get(
              "org.springframework.validation.BindingResult.formBean");
          assertEquals(1, result.getErrorCount());
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

   * attaching a listener that does test assertions during the execution of the flow.
   * @param executionListener the listener to attach
   */
  protected void setFlowExecutionListener(FlowExecutionListener executionListener) {
    getFlowExecutionImplFactory().setExecutionListenerLoader(
        new StaticFlowExecutionListenerLoader(executionListener));
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

   * attaching listeners that do test assertions during the execution of the flow.
   * @param executionListeners the listeners to attach
   */
  protected void setFlowExecutionListeners(FlowExecutionListener[] executionListeners) {
    getFlowExecutionImplFactory().setExecutionListenerLoader(
        new StaticFlowExecutionListenerLoader(executionListeners));
  }
View Full Code Here

Examples of org.springframework.webflow.execution.factory.StaticFlowExecutionListenerLoader

        assertTrue(context.getFlashScope().contains("rootCauseException"));
        assertTrue(context.getFlashScope().get("rootCauseException") instanceof TestException);
      }
    };
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener));
    FlowExecution execution = factory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertTrue("Should have ended", !execution.isActive());
  }
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.