Hi,
I am using Document WDK 5.3, and facing a problem while deleting a document from my custom application. My custom applicaiton has a create document section and after create it is navigated to the property screen for the document. Now we have a delete link in the property screen which on click should delete the document and shift the control to the home component .
My code is:
// deleteDocumentMethod
ArgumentList argumentlist1 = new ArgumentList();
IDfSession dfSession = getDfSession();
ServletRequest request = getPageContext().getRequest();
String strObjectId = request.getParameter("objectId");
IDfSysObject sysObj = (IDfSysObject)dfSession.getObject(new DfId(strObjectId));
String oldStatus = sysObj.getString("status");
if(!(oldStatus.equals(PHENOMConstants.DOC_STATUS_APPROVED)&& oldStatus.equals(PHENOMConstants.DOC_STATUS_REVIEW))){
//Delete this document from all the inboxes // method to stop all workflow activities releated with the document
deleteAllRouters( dfSession,strObjectId );
String parent = sysObj.getString("i_chronicle_id");
LogWriter writer = LogWriter.getWriter();
writer.documentDeleted( dfSession, strObjectId );
writer = null;
sysObj.destroy();
String loginUserRole = (PhenomRoleService.getUserPhenomRole(dfSession.getLoginUserName())).toString();
if (loginUserRole.trim().equalsIgnoreCase("CDT")) {
setComponentJump("home", argumentlist1, getContext());
}else{
setComponentJump("reviewershome",getContext());
}
}else{
argumentlist1.add("objectId", strObjectId );
argumentlist1.add("confirmMsg", "Cannot delete Approved Documents." );
setComponentJump("properties", argumentlist1, getContext());
}
Now my real problem starts after sysObj.destroy() is executed, the setComponentJump() method to my home component is never executed instead it gives me a blank page and after refreshing the blank page, the home component is shown. The object is destroyed from the server and the document is also deleted. But the blank page should not come.. I am getting a exception in doing this:
Exception[http://properties.jsp|http://properties.jsp/]..[DM_API_E_EXIST]error: "Document/object specified by 0900f3e080102757 does not exist."
error: "Cannot fetch a sysobject - Invalid object ID 0900f3e080102757"
DfIdNotFoundException:: THREAD: ExecuteThread: '23' for queue: 'weblogic.kernel.Default'; MSG: error: "Document/object specified by 0900f3e080102757 does not exist."
error: "Cannot fetch a sysobject - Invalid object ID 0900f3e080102757"
; ERRORCODE: 100; NEXT: null
at com.documentum.fc.client.DfSession.getObjectWithCaching(DfSession.java:1597)
at com.documentum.fc.client.DfSession.getObjectWithType(DfSession.java:1621)
at com.documentum.fc.client.DfSession.getObject(DfSession.java:1418)
at jsp_servlet._phenom._library._properties.__properties._jspService(__properties.java:310)
Please help me in this context.
Thanks in advace
--Manoj