Hi,
Ya, i had to write the Java Service to get the list of tid and their status to submit them again…
its not the 100% efficient but i have to polish it up to make better…
but here is the code…
mike, is your query thing works fine? it never worked for me… as i wont even able to see in the table the info about the tids. i m really curious about it… i guess i am doing something wrong…
// get IDataCursor to manipulate pipeline
IDataHashCursor idhc = pipeline.getHashCursor();
idhc.first(“input”) ;
IData input = (IData)idhc.getValue();
Values result = null ;
TContext tc = null;
//---Initialization----------------------------------------------------
// Initialize TContext and establish connection attributes
try {
int i = 0 , j = 0 ;
String arrTid, arrStatus ;
arrTid = new String[50] ;
arrStatus = new String[50] ;
tc = new TContext();
String hostname = ServerAPI.getServerName() ;
String port = “” + ServerAPI.getCurrentPort() ;
tc.connect(hostname + “:” + port, “Administrator”, “manage”);
Enumeration enum = tc.getTxIds() ;
while (enum.hasMoreElements() )
{
arrTid[i] = (String)enum.nextElement() ;
arrStatus[j] = (String)tc.getTxStatus(arrTid[i]) ;
//System.out.println( “” + tc.getTxStatusVal(arrTid[i]) + “<\n” ) ;
//if ( (String)tc.getTxStatus(arrTid[i]) == "FAILED" || (String)tc.getTxStatus(arrTid[i]) == "ERROR" )
// { //tc.restartTx(arrTid[i]) ;
// result = tc.invokeTx(arrTid[i], "EGMSagePP.Inbound", "retrievePOFromHub", (Values)input) ;
// }
i++ ; j++ ;
}
idhc.insertAfter(“result”, result) ;
idhc.insertAfter(“tidList”, arrTid) ;
idhc.insertAfter(“statusList”, arrStatus) ;
idhc.destroy();
} catch (Exception e) {
// System.err.println("Error: "+e.getMessage());
// System.exit(-1);
throw new ServiceException(e.toString() ) ;
}
tc.disconnect();
// TContext.shutdown();
i guess still have to add the checks and retry using the
isExceededRetries() and isHeuristicFailure() and all those sort of things to restart the and execute the service…
Does anyone has idea how can i add timer to this code?
Thanks,
AS