Send parameters to a graph

I may have found the problem :

Indeed in the runGraph class we load properties after reading it :

***************************************
graphReader.read(in);

//graph parameters defined on command line are applied after composing of graph from xml file
graph.loadGraphProperties(properties);
***************************************

I don’t understand why ?! Could I say that it is absurd !

In the previous release (2.0) we did on the contrary. We loaded properties before we read it. I think this way is more logical, isn’t it ?

Can someone explain me the reason developers made that ?
Is there a way to send parameters on command line now ?

Thanks again.

That’s OK !

I’m gonna wait for this patch.
For the moment I’ve modified my proper runGraph.java.

I have to say thank you because you answer me each time and very quickly.

I’ve another question.

I would like to use several times the runGraph class.
Indeed I would like to use this class with several metadata files in a loop in which I send the metadata file as a parameter to the graph.

The first problem is that if there’s an error you make a “System.exit(-1)” or a “System.exit(0)” if it is OK. So the program exits and do not continues with the next metadata file.

The second problem is that you load the plugins each time at the beginning of the main() procedure. Of course there’s an error when I try to load the plugins the second time.

To conclude I would say that it would be great if we could use the runGraph class in a loop or several times in a same java program.

I hope you understand me.

Thank you.

Hello !

Unfortunately you are right ! It is a to-the-sky-calling-mistake behind which was a good intention to make command-line defined parameters/properties having higher priority than those defined within graph.

We will release a patch - 2.0.2 version which will fix this problem - should be a matter of day or two.

For now, you can make the suggested change - that should fix the issue.

David.