0

I'm testing web-flow, and i need to found xml file that contains application's flow. But I really don't understand why is necessary put file: before the path, why is this necessary?

declaration path:

protected static final String ARREL_FLOWS = "file:src/main/webapp/WEB-INF/flow/";
protected static final String FLOW_CONSULTA_DEUTE = ARREL_FLOWS +"consultaDeutes/consultaDeutes.xml";

Code to test the path flow:

@Test
    @Override
    protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
         FlowDefinitionResource resource = resourceFactory.createResource(FLOW_CONSULTA_DEUTE);
         Assert.assertNotNull(resource);
         return resource;
     }

this is py project estrucuture: enter image description here

ty.

ZaoTaoBao
  • 2,567
  • 2
  • 20
  • 28
  • You will find an explanation of `file://` in http://stackoverflow.com/questions/11961975/what-does-file-android-assets-www-index-html-mean – Qben Sep 19 '13 at 07:26
  • it's not really the same issue but ty, my problem is that in another project a don't need put the word file:..i just wanna know to understand. – ZaoTaoBao Sep 19 '13 at 07:36

1 Answers1

0

OK I find out why! i feel like a monkey.. well:

If don't wanna put the word file: i necessary use the method:

  resource = resourceFactory.createFileResource(getPathRecursFlowProvatura());

not

FlowDefinitionResource resource = resourceFactory.createResource(FLOW_CONSULTA_DEUTE);
ZaoTaoBao
  • 2,567
  • 2
  • 20
  • 28
  • http://forum.spring.io/forum/spring-projects/web/web-flow/65371-class-path-resource-file-not-found-error-while-running-junit – ZaoTaoBao Sep 19 '13 at 07:50