//Add Case Comments in Case Client (IBM Case Manager API)
public void addCaseCommentInHistory() throws Exception {
String caseFolderGUID = //GUID of Case Folder
String comment = "Hi"
CaseMgmtContext oldCmc = null;
log.info("Inside [WorkFlowHoldUnholdServices]addCaseComment():.............");
ICMManager icmManager=new ICMManager();
Connection conn=null;
DomainReference domainRef=null;
ObjectStoreReference osRef=null;
Folder folder=null;
try{
conn=// Establish Connection
if(conn!=null){
domainRef=ICMManager.getDomainReference(conn);
if(domainRef!=null){
osRef=ICMManager.getTargetOSReference(domainRef, fnObjectStoreName);
if(osRef!=null){
// retrieve case folder
folder = Factory.Folder.fetchInstance(osRef.getFetchlessCEObject(), caseFolderGUID, null);
// retrieve case using GUID
Id folderGUID = folder.get_Id();
Case cs = Case.getFetchlessInstance(osRef, folderGUID);
cs.addCaseComment(CommentContext.CASE, comment);
cs.save(RefreshMode.REFRESH, null, ModificationIntent.MODIFY);
log.info("History updated in Case");
}else{
log.info("History Not updated As Target OS Ref is NULL");
}
}
}
}catch (Exception e) {
log.error("addCaseCommentInHistory(String, String) - exception:"+ e,e); //$NON-NLS-1$
e.printStackTrace();
}
}
//for connection please click on below link
public void addCaseCommentInHistory() throws Exception {
String caseFolderGUID = //GUID of Case Folder
String comment = "Hi"
CaseMgmtContext oldCmc = null;
log.info("Inside [WorkFlowHoldUnholdServices]addCaseComment():.............");
ICMManager icmManager=new ICMManager();
Connection conn=null;
DomainReference domainRef=null;
ObjectStoreReference osRef=null;
Folder folder=null;
try{
conn=// Establish Connection
if(conn!=null){
domainRef=ICMManager.getDomainReference(conn);
if(domainRef!=null){
osRef=ICMManager.getTargetOSReference(domainRef, fnObjectStoreName);
if(osRef!=null){
// retrieve case folder
folder = Factory.Folder.fetchInstance(osRef.getFetchlessCEObject(), caseFolderGUID, null);
// retrieve case using GUID
Id folderGUID = folder.get_Id();
Case cs = Case.getFetchlessInstance(osRef, folderGUID);
cs.addCaseComment(CommentContext.CASE, comment);
cs.save(RefreshMode.REFRESH, null, ModificationIntent.MODIFY);
log.info("History updated in Case");
}else{
log.info("History Not updated As Target OS Ref is NULL");
}
}
}
}catch (Exception e) {
log.error("addCaseCommentInHistory(String, String) - exception:"+ e,e); //$NON-NLS-1$
e.printStackTrace();
}
}
//for connection please click on below link
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Kopar at Newton Chip Eng Seng
ReplyDeleteThis is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this.. lenzuola matrimoniali
ReplyDeleteI am jovial you take pride in what you write. It makes you stand way out from many other writers that can not push high-quality content like you. nemzetközi szállítmányozás Europa-Road Kft.
ReplyDelete