IBM Support

Open Case Details from its In-basket Work Item

Technical Blog Post


Open Case Details from its In-basket Work Item


After conquering the challenge of adding a context sensitive Case Info widget to the Work page in a previous article, I wanted to see if I could use the In-basket's custom menu events to add an Open Case menu that displayed the case details page for the case associated with the work item.

The first step in this is adding your menu item to the In-basket's right-click context menu. Go into page edit mode and add your item using the In-basket widget's setting dialog. The event name you specify for your menu item, in this example I used doOpenCase, will appear as another choice in the In-basket's outbound wiring events.

Next, I added two Script Adapter widgets to the hidden widget area of the page. To keep things clear, I renamed one Handle Menu SA and the other Open Case SA.

The job of the Handle Menu SA is to transform the payload sent by the custom menu event into the payload expected by the Command widget's retrieve case information event. This event looks for the case ID information in the payload and tells the Command widget to load some of the information for the specified case. Wire your Handle Menu SA between the In-basket and the Command widget as shown below.

Now that the Command widget has loaded some of the case information, we need to tell it to open the case details. To do this, we use the Open Case SA grab the required parameters from the send case information event (the event you can wire to that tells you a new case has been loaded), format them into the payload required by the Command widget's open case details page event and wire the result back to the command widget as shown below. Note that the same Open Case SA is wired as both an input and an output to the Command widget.

The script in the Handle Menu SA that creates the required event payload looks like this:

return {"systemProperties":{"caseFolderId":payload.dataFields[0].caseFolderId,"caseTaskId":payload.dataFields[0].caseTaskId}};

The script in the Open Case SA looks like this:

return {"caseId":payload.caseId,"caseType": payload.caseType};


[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCTJ4","label":"Case Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]