Resubmit a service NOT in MyWebMethods

I need to resubmit a service, but directly in my flow, not into MWS.

I need to have the same root context id as the original service. How can I do that ?

Are you trying to resubmit data to TN or sort of?

No, that wasn’t related to TN.

I ended doing the resubmit a la WmMonitor :

IDataCursor cursor = pipeline.getCursor();

String cid = IDataUtil.getString(cursor, "context_id");
String serviceName = IDataUtil.getString(cursor, "serviceName");
IData inputPipe = IDataUtil.getIData(cursor, "pipeline");
String userName = com.wm.app.b2b.server.Service.getUser().getName();
String[] idArray = { cid };
IData systemData = null;
ResubmitData resubmitData = new ResubmitData(idArray, userName, serviceName, inputPipe, systemData);
try {
  ResubmitData[] rd = {resubmitData};
  Service.resubmit(rd);
} catch (ResubmitException ex) {
  throw new ServiceException(ex);
}

OK as long you have work around: