Passing a parameter file to a graph running from java

Discussion on developing CloverETL engine, transformation components etc.

tpdi
Posts: 5
Joined: Tue Nov 16, 2010 5:40 pm

Passing a parameter file to a graph running from java

Postby tpdi » Wed Aug 10, 2011 5:06 am

I'm running some graphs from java.

How can I add or override the values in the graph's parameters (workspace.prm or internal parameters)?

Is the answer to call GraphRuntimeContext.setAdditionalProperties()?

Thanks.

avackova
Posts: 841
Joined: Fri Jul 20, 2007 9:28 am

Re: Passing a parameter file to a graph running from java

Postby avackova » Wed Aug 10, 2011 3:51 pm

Hello,
method org.jetel.graph.runtime.GraphRuntimeContext.setAdditionalProperties(Properties) clears all parameters and sets the new ones, method org.jetel.graph.runtime.GraphRuntimeContext.addAdditionalProperties(Properties) adds new parameters to the existing ones (if the name of a new parameter is the same as the existing one, it will be replaced by the new value).
Agata Vackova
Javlin a.s.
agata.vackova@javlin.eu