Results 1 to 1 of 1

Thread: Spring webflow with subflow not working

  1. #1
    Join Date
    Sep 2012
    Posts
    1

    Default Spring webflow unit test with subflow not working

    i am trying to test my web flow which is having subflow.

    i have defined my subflow like below.

    protected final Flow buildSubflow() {
    FlowDefinitionResourceFactory factory = getResourceFactory();
    FlowDefinitionResource resource
    = factory.createFileResource("src/main/webapp/WEB-INF/flows/buynet/payment.xml");
    MockFlowBuilderContext flowBuilderContext = new MockFlowBuilderContext(resource.getId(), resource.getAttributes());
    flowBuilderContext.registerBean("CMCExceptionHandl er", new CMCExceptionHandler());
    flowBuilderContext.registerBean("CMCGlobalExceptio nHandler", new CMCGlobalExceptionHandler());
    flowBuilderContext.registerBean("paymentService", paymentService);
    FlowBuilder builder = createFlowBuilder(resource);
    FlowAssembler assembler = new FlowAssembler(builder, flowBuilderContext);
    return assembler.assembleFlow();
    }


    and add below code in configureFlowBuilderContext override method.

    final Flow subflow = buildSubflow();

    getFlowDefinitionRegistry().registerFlowDefinition (subflow);

    when i testing the my actual flow it doen't seems to be going into sub flow.

    any idea on what went wrong here.
    Last edited by hareeshwar; Sep 21st, 2012 at 04:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •