SetComponentJump Problem while destroying sysObject
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
Comments
-
Hi Manoj,
Is the Home component that you're referring to what calls your custom component in the first place? If so, have you tried to call SetComponentReturn instead of the SetComponentJump? Also, is there a chance that the destroy() method is throwing an exception that you're not catching properly? Finally, you're probably seeing the "document/object specified by" error because you're refreshing the page, which is likely re-executing the method that attempts to destroy the object (and since you've just deleted it, you can't delete it again ).
Also, Manoj, this type of question should probably be asked in the PowerLink forums as those are geared more towards technical support. This particular forum is for the recently announced Documentum Solution Exchange.
Terence
0 -
Good catch Terence.
I've moved the thread to the documentum community
Aashish
0
Categories
- All Categories
- 108 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management