iParagons

IBM FileNet P8 | Case Manager | Content Navigator

Call Complete from In Basket Widget in IBM Case Manager 5.2.x / 5.3.x

IBM Case Manager (ICM)

Call Complete from In Basket Widget in IBM Case Manager 5.2.x / 5.3.x

By Junaid Azam / Jul 30, 2019

There is very good post about how to call complete() from In-Basket widget which illustrate well on developerswork post.

Following are the steps to achieve this requirement:

  • Open Page designer of In-Basket widget in IBM Case Manager Builder.
  • Add custom menu on In-Basket widget settings.
  • Select action type Event Action and name Label Complete(s) Case as described below:
call complete from in basket widget
  • Add the following code in execute section of custom event action.

Code:

var selectedWorkItems = payload.WorkItemReference;
var currentWorkItem;
var CONST_RESPONSE="
Complete";
var processedItems =[];
var currentWIE;

if (dojo.isArray(selectedWorkItems)) {
require(["dojo/_base/array"], function(array) {
try {
array.forEach(selectedWorkItems, function (currentWorkItem, idx) {
currentWorkItem.retrieveAttributes(function (currentWob) {
try {
currentWIE = currentWob.createEditable();
currentWIE.lockStep(function(currentWIE) {
try {
currentWIE.setSelectedResponse(CONST_RESPONSE);
currentWIE.completeStep(function(){
try {
processedItems.push(idx);
if (processedItems.length == selectedWorkItems.length) {
//self.onBroadcastEvent("icm.Refresh", {});
//self.onBroadcastEvent("icm.Refresh", payload);
//this.onRefresh();
}
}
catch (Error) {
alert(Error.name + " - " + Error.description + "\r\n" + Error.message);
}
});
}
catch (Error) {
alert(Error.name + " - " + Error.description + "\r\n" + Error.message);
}
});
}
catch (Error) {
alert(Error.name + " - " + Error.description + "\r\n" + Error.message);
}
});
});
}
catch (Error) {
alert(Error.name + " - " + Error.description + "\r\n" + Error.message);
}
});
}
else {
currentWorkItem = selectedWorkItems;
currentWorkItem.retrieveAttributes(function (currentWob) {
try {
currentWIE = currentWob.createEditable();
currentWIE.lockStep(function(currentWIE) {
try {
currentWIE.setSelectedResponse(CONST_RESPONSE);
currentWIE.completeStep(function(){
try {
//self.onBroadcastEvent("icm.Refresh", {});
//self.onBroadcastEvent("icm.Refresh", payload);
//this.onRefresh();
} catch (Error) { alert(Error.name + " - " + Error.description + "\r\n" + Error.message); } }); } catch (Error) { alert(Error.name + " - " + Error.description + "\r\n" + Error.message); } }); } catch (Error) { alert(Error.name + " - " + Error.description + "\r\n" + Error.message); } });
}

  • Once done, save and close the widget settings.
  • Deploy the solution.
  • Test the custom Call complete from in basket widget in IBM Case Manager Client.
  • Output will be like:
complete multiple cases

Note: Similar requirement can be achieved by change response name and move case(s) step forward as well.

6 Comments

  1. aditya July 5, 2021 at 10:53 AM
    how to save work item on field updated ?
  2. Junaid Azam July 28, 2021 at 11:14 AM
    Hi ADITYA,

    Please refere this link: https://www.ibm.com/docs/en/case-manager/5.2.1?topic=SSCTJ4_5.2.1/com.ibm.casemgmt.development.doc/jsdoc/symbols/icm.model.WorkItem.html
  3. Danushka October 26, 2021 at 5:21 AM
    How to Implement this functionality on IBM BAW?
  4. JayR November 2, 2021 at 4:29 AM
    I also want to Implement on IBM BAW. Please help me
  5. Junaid Azam November 22, 2021 at 4:49 AM
    Hi DANUSHKA,

    Right now, we're upgrading from IBM Case Manager to Business Automation Workflow (BAW). Surely , let you know once done. Thank you.
  6. Junaid Azam November 22, 2021 at 4:50 AM
    Hi JAYR,

    Right now, we're upgrading from IBM Case Manager to Business Automation Workflow (BAW). Surely , let you know once done. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *