IBM Case Manager (ICM), IBM Case Manager Client

Work Details Custom History Event in IBM Advanced Case Manager

April 16, 2019

IBM Advanced Case Manager: In some cases, there is requirement that when user clicks a particular response button on Work Details Page in IBM advanced case manager Client a custom audit history has to be created along with time stamp and user’s name in the history tab. Following are steps to achieve this:

Environment: ICM 5.2.x / ICM 5.3.x

  • Edit specific Work Details Page in IBM Case Manager Builder.
  • Add a new hidden script adaptor and named it uniquely.
  • Edit script adaptor setting and put the following code:

Note: Please change Response Button and Case Properties according to your own environment.

var currentWorkitem = payload.workItemEditable;
var currentCase = currentWorkitem.getCase();
var selectedResponse = currentWorkitem.getSelectedResponse();
if (selectedResponse == “Forward”)
{
addCommentToCase(currentCase,”Selected response:”+selectedResponse);
showPrintPopup(currentCase,selectedResponse,[“CmAcmCaseIdentifier”,
“JNP_SampleProperty”,”JNP_OtherProperty”,”Creator”,”DateCreated”]);
}
else
{
var a;
a = alert(“You Pressed: “+selectedResponse);
addCommentToCase(currentCase,”Selected response:”+selectedResponse);
}
function addCommentToCase(currentCase,text){
currentCase.addCaseComment(102,text,function onReady(){
console.log(“comment was set!”);
},function onFailure(){
console.error(“could not create case comment”)
},true);
}

new_window.document.write(‘
‘); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(‘Date: ‘+DateC+’
‘);
new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(‘CSO ID: ‘+CreatedBy+’
Case Type: Test Case
‘);
new_window.document.write(‘
‘);
new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”); new_window.document.write(”+CaseID+’
‘+SampleProp+’
‘+OtherProp+’
‘);
new_window.document.write(‘
‘);
}
return payload;

  • Edit script adaptor wiring ad described here:
ibm advanced case manager
  • Once done, save and deploy solution.
  • Test custom history event audit on that specific work details page.
  • An example is attached here in which clearly mentioned when user clicks on Forward response button, it will be automatically captured in history tab on work details page in ibm case manager client.
icm_case_management_history_tab

You Might Also Like

4 Comments

  • Reply Jyothi October 4, 2021 at 12:31 pm

    Hi Zunaid,

    This is so useful information. I am new to this technology and need one help. Is there any way to show the Transactions and/or actions taken on a case and user Role changes into SystemOut.log file or ICM logs?

  • Reply Junaid Azam October 4, 2021 at 5:00 pm

    Hi JYOTHI,

    IBM Case Manager Installation and configuration messages are logged into systemOut.log and SystemErr.log files by defauly. However, all the transactions and action performed by user(s) are stored in database in target object store events and container tables. You can get all these information from there.
    Secondly, Information related to user roles, you can get from PE schema or using vwtool parameters. There, you can also performed multiple queires to get the infromation about the roles, queues, and spaces, and work items.
    Morever, you can also configure code module to captrure or store information for the documents that are ingested, deleted, and removed from these case(s). Again, these all information you also ger from docversion and events table too. Thirldy, you can also create a package (in pdf) on any of case page which is available in ICM 5.2.x to further releases by default. Simply, you can generate pdf for all the documents in icm client.
    Any errors, warning related to ICM like, users password expired, user unable to login into system already stored into systemout.log, p8_server_error.log, and p8_server_trace.log files.
    Let me know if anything further i can help you! Thank you.

  • Reply Jyothi October 5, 2021 at 10:23 am

    Thank you so much for your time on this reply. So as per this all case transaction details I can get from DB using the code with proper search query. Same with roles as well. Very useful information. Thanks again.

  • Leave a Reply

    error

    Subscribe