Hi Team,
I have created a graph file, I can i able to call the graph, through java by using following code
EngineInitializer.initEngine(“C:\\cloverETL.rel-3-0-0\\cloverETL\\plugins”, null, null);
String graphPath = “c:\\cloverETL.rel-3-0-0\\cloverETL\\bin\\graph\\test.grf”;
InputStream is = new BufferedInputStream(new FileInputStream(graphPath));
TransformationGraph graph = null;
// engine customizationnm
GraphRuntimeContext runtimeContext = new GraphRuntimeContext();
// graph loading
graph = TransformationGraphXMLReaderWriter.loadGraph(is,runtimeContext);
// engine initialization
EngineInitializer.initGraph(graph, runtimeContext);
// graph running
IThreadManager threadManager = new SimpleThreadManager();
WatchDog watchDog = new WatchDog(graph, runtimeContext);
threadManager.executeWatchDog(watchDog);
while executing the graph, i am creating the IThreadManager object.
ThreadManager is creating new thread and running it Separately.
I have a problem here, after calling the graph, i am excepting the result from the same thread(where i am executing the above code). Since graph execution is happening in new thread, I am not able to trace when the graph execution is completed.
Here my requirement is like this, once graph after the execution of the graph, i have to proceed the another process.
When i am calling the threadManager.executeWatchDog(watchDog) , the main thread is initiating other thread to execute the graph, once the new thread starts executing then main thread is call the next process in the flow. But the actual requirement is needed to wait till the graph execution complete and then has to proceed for others.
My problem in one line:-
Is it possible to execute the graph, with out creating the ThreadManager object.
Thank you
VENKAT