我试图从 OA Framework 调用并发程序。这是代码。但我收到以下错误:
错误::
cannot find symbol symbol : method getDBTransaction() location: class _myclass OADBTransaction tx = (OADBTransaction)getDBTransaction();
这是方法:
public int submitCPRequest(String headerId) {
try {
OADBTransaction tx = (OADBTransaction)getOADBTransaction();
java.sql.Connection pConncection = tx.getJdbcConnection();
ConcurrentRequest cr = new ConcurrentRequest(pConncection);
String applnName = "PO"; //Application that contains the concurrent program
String cpName = "XXMY Concurrent program name "; //Concurrent program name
String cpDesc = "Concurrent Program Description"; // concurrent Program description
// Pass the Arguments using vector
// Here i have added my parameter headerId to the vector and passed the vector to the concurrent program
Vector cpArgs = new Vector();
cpArgs.addElement(headerId);
// Calling the Concurrent Program
int requestId = cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
tx.commit();
return requestId;
} catch (RequestSubmissionException e) {
OAException oe = new OAException(e.getMessage());
//oe.setApplicationModule(this);
throw oe;
}
}