Thanks Guys for the reply.
I found a solution for my query. Its worked for me. Please have a look at the following code.
try
{
IDataCursor pipelineCursor = pipeline.getCursor();
String a = IDataUtil.getString(pipelineCursor,âaâ);
String b = IDataUtil.getString(pipelineCursor,âbâ);
IData results = null;
com.wm.app.b2b.server.ServiceThread svcThread =Service.doThreadInvoke(âVINODPOC.servicesâ,âjavaService_Aâ,results);
IData results1 = null;
com.wm.app.b2b.server.ServiceThread svcThread1 =Service.doThreadInvoke(âVINODPOC.servicesâ,âjavaService_Bâ,results1);
results = svcThread.getIData(); // Getting Results from The Invoked Child Service 1.
results1 = svcThread1.getIData(); // Getting Results from The Invoked Child Service 2.
String c = a + b;
IDataUtil.put( pipelineCursor,âcâ,c);
IDataUtil.put(pipelineCursor, âsvcThreadâ, results );
IDataUtil.put(pipelineCursor, âsvcThread1â, results1 );
pipelineCursor.destroy();
}
catch(Exception e)
{
}
javaService_A:
try
{
IDataCursor pipelineCursor = pipeline.getCursor();
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
"Method in service A before SLEEP" );
Thread.sleep(10000);
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
"Method in service A AFTER SLEEP" );
IDataUtil.put( pipelineCursor,"Result A","Result A");
pipelineCursor.destroy();
}
catch(Exception e)
{
}
javaService_B:
try
{
IDataCursor pipelineCursor = pipeline.getCursor();
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
"Method in service B Before Sleep" );
Thread.sleep(10000);
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
"Method in service B AFTER SLEEP" );
IDataUtil.put( pipelineCursor,"Result B","Result B");
pipelineCursor.destroy();
}
catch(Exception e)
{
}
Both the services will run parallel and we will get the results back to main service.
Please correct me if i am wrong any where.
Thanks & Regards,
vinodkumar v.