IBM Case Manager (ICM), IBM Case Manager Client

Validate Response Button on Work Details Page in IBM ICM 5.2

July 11, 2018

Sometimes there is a requirement to validate response name or response button on ICM Work Details Page. Once user clicks on complete response name than a popup window will open and will ask for confirmation. In case of yes, work item will be dispatched/forwarded to next node and if selection is no work item remains open there and will not be dispatched. Do the following to achieve this requirement:

  • Add a hidden script adaptor on Work Details Page.
  • Rename script adaptor according to yours, edit settings, and paste the following code

var coord = payload.coordination;
var workitemEdit = payload.workItemEditable;
var solution = this.solution;
var prefix = solution.getPrefix();
var currentCase = workitemEdit.getCase();
var selectedResponse = workitemEdit.getSelectedResponse();

_self = this;

require([“icm/base/Constants”, “icm/model/properties/controller/ControllerManager”,
“icm/model/properties/controller/types/AttachmentPropertyController”,”dojo/_base/lang”,”ecm/widget/dialog/ConfirmationDialog”], function(Constants, ControllerManager,AttPropCont,lang,Dialog){

if(coord){
coord.participate(Constants.CoordTopic.VALIDATE, function(context, complete, abort){

if(context[Constants.CoordContext.WKITEMRESPONSE] === “Complete” ||
context[Constants.CoordContext.WKITEMRESPONSE] === “Forward”)
{
var dia = new Dialog({title: “Confirmation Required”,
cancelButtonLabel: “No”,
text: “Are You Sure to ” +context[Constants.CoordContext.WKITEMRESPONSE],
onExecute: function() {
complete();
},
onCancel : function(){
abort({‘silent’:true});
}
});
dia.show();
}else{

complete();
}
});
}
});

  • Edit hidden script adaptor widget’s wiring with Page Container’s to Send work item.

  • Save and close widget settings, save and deploy solution. Test the solution. Results will be like below:

validate response name in icm

You Might Also Like

No Comments

Leave a Reply

error

Subscribe