IBM Support

Solution to add case with documents

Technical Blog Post


Abstract

Solution to add case with documents

Body

Solution to add case with documents:
Author: Gai Li(
ligai@cn.ibm.com)
During BPF to ICM transition project, we got some best practices for operating case document, this document introduced how to create a case and add document to the new case at a time.

In ICM Case client, it needs to develop a customer widget to add documents to CE 1st and get the Doc GUIDs in order to fill them when create case.

The following is a guide about how 3rd widget to combine documents info to Case Data payload. Command widget will get the Case Data payload with documents info and post it to Create Case REST request. Case REST API handles the request to create new case and add documents to the new case. As follows I use the ScriptAdapter widget instead of the real custom widget to demo.

Steps:
1. In the Add Case page, add a "Script Adapter" widget.

image 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

2. Disable the broadcasting event "Respond poll work item data update" of Case Data widget.

image 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

3. Wire the Case Data widget's "Respond poll work item data update" event to Script Adapter. Script Adapter wire to  Command widget's "Respond poll work item data update" event.

image  

 
 
 
 
 
 
 
 
 
 
The codes in ScriptAdapter widget edit setting:

payload.caseInfo.caseData.CmAcmDocumentFilingInstruction = {
                "value": [
   "/={214E6B42-AFF9-4EED-BB2A-D51DD14FA29B}",
   "/NewFolder/={A601EC96-3B1C-4B93-B9E8-72C7A07CAB22}"
   ],
                "isValid": true,
                "isModified": true
            };  
return payload;

These codes means to add the needed filing document GUIDs list.

4. Click Add button in the Case Toolbar widget, then case was added and documents are filing to the new created case.

The snapshot is the payload of CASE REST post request. Two documents will be added to new case. /={214E6B42-AFF9-4EED-BB2A-D51DD14FA29B} means to add document to Case root folder. "/NewFolder/={A601EC96-3B1C-4B93-B9E8-72C7A07CAB22}" means to add document to the NewFolder folder in Case root folder.
image

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

UID

ibm11281778