With the out of the box IBM Case Manager Cases page, the Case List is displayed initially empty, waiting for the user to perform a search. Wouldn't it be nice to pre-fill the case list with items of interest to the user? Here are a few examples how to do that in ICM 5.2.0.1 (These examples require Fix Pack 1)

Automatically “Get Next” is a common feature in business process, IBM Case Manager (ICM) as an application which can conveniently unites content, process and people, certainly it has this feature to provide flexible process controls, this blog entry will show you how “Get Next” works in ICM 5.2 and how to customize it to get next without showing the work items list.

Difference between ICM 5.1.1 and ICM 5.2

Assume you open a work item which is not the first one in In-basket, in ICM 5.1.1, after all the following work item has been processed, it can go back to the first one to process the rest; But from ICM 5.2, if a case worker doesn’t choose the first one to start, we think he doesn’t want to process the first one, so “Get Next” won’t go back to work items which are above the one just he opened. This means in ICM 5.2, “Get Next” will only handle the work items which are sequenced following the one you opened, after all done, even there are still some work items in In-basket (which above the one you opened), it will pop up a dialog says no more work items to deal with.

Enable Get Next feature in ICM 5.2

By default, get next feature is not enabled; this means when you complete a current work item, it will automatically close the work detail page. There are two ways to enable get next by the following steps:

1. Open Work Details page in Page Designer.

2. Open Edit Setting window of work item toolbar, switch to Toolbars tab.

3. The first way is to double click to edit “Complete” button, you should be able to see the selection “Automatically get the next work item”. If you select it, every time a case worker clicks Complete button in Work Detail page during runtime, it will automatically retrieve the next work item until all the following work items in In-basket has been processed.

4. Another way is to add a separate “Open Next Work Item” action.

In this way, it will add a check box with label “Get Next” to work item toolbar. If you mark “Automatically get the next work item” when adding this action, the checkbox will be selected by default, and vice versa.

The second way is suggested since it more intuition, and you can decide whether to get next in runtime, not to speak this setting can overwrite the setting in “Complete” button.

Other notable features about Get Next

1. Get Next won’t deal with locked work item which is locked by other users, but if the next work item is locked by current user himself, it will directly open the work item in edit mode.

2. Get Next will always open the next work item in current work detail page, even the next work item is from different task type with different work detail page.

Customize Get Next feature to support the push-only mode

By default, you will see all the work item list and can choose anyone to process, but under some circumstance, user is expected not to see the whole list, every time he login the application, there is only one work item displays and he can only process by sequence. This is push-only mode, like custom service in bank or insurance company. Customer supporters are not expected to choose a favorite custom to service; they just service for any custom the system push to them.

To achieve this, first, we need to hidden In-basket, which can be easily done by hidden default Work page.

Open target solution, switch to Roles tab, click to open target role, then on Pages tab, remove Work page.

Second, we need to customize the Work Detail page to retrieve the first work item when work details page loaded. This can be done by the following steps:

1. Open Work Details page in Page Designer.
2. Add a Script Adapter widget to page then click the little black triangle on the top right, select Hide Widget to hide it. Open hidden area, you can see the hidden widget you just added. There is another default Script Adatper1 by default, ignore it since we won’t use it.

3. Click the Edit Settings icon on the Script Adapter widget and insert the script below into the JavaScript text area.

When opening the link, it looks like the picture as below. No Work page and In-basket shown, and directly displays a work item.

Select Get Next checkbox and process the work item, it will automatically push next work item, when all done, the dialog “There are no more work items to be processed in this in-basket or the work item that you handled is at the end of this in-basket.” displays.

Summary

This blog entry introduces Get Next feature in ICM 5.2 and give an example on how to customize it to push only mode, hope this can give you as a reference when you using this feature.

The Case Information widget has an option for its Case Document view where you can specify whether to view documents in the Viewer widget or always view them in a popup window and don't send the document event to the viewer.

In this use case, we want to support both; a normal view displays the document in the Viewer widget, but an alternate "open in popup" command from the More Actions menu or right-click menu allows the user to pop up a new window and leave it around for reference.

The first step for this is adding a custom menu to the Case Information Documents panel.

Go into Edit Page mode

Edit the Case Information widget's setting by selecting the Edit Settings item from the widget's menu.

Click to the Documents tab

Add a custom menu item like "Open in Popup" and give it an event name like "doOpenDoc"

Add a hidden Script Adapter widget and wire its inbound event to your new doOpenDoc event which now shows up as an available wiring option

Enter the following JavaScript into the Script Adapter, replacing the "myServer" and "TOS01" with you server name and target object store name (note: you can prevent hard-coding of this by using some of the client Javasript APIs

Discretionary tasks allow case workers to add additional tasks to a case on the fly. In the standard Case Client user interface, an Add Task button displays a dialog that allows the end user to select one of the case's discretionary tasks from a menu, give it a unique name if desired, and click OK.

For discretionary tasks that are commonly added to a case, a more direct approach with less clicks might be more appropriate.

Here is how you can add a new toolbar button to a case details page that does just that.

On the case details page, add a new Script Action toolbar button to the toolbar widget by clicking its settings icon

Name the button with the name of the discretionary task

Enter the following script, modifying the name of the task to match a discretionary task in the solution

IBM Case Manager already provides several ways of associating choice lists with case properties. This includes directly assigning them in case builder or indirectly adding them using ICM's External Data Services (EDS).

If you like doing client-side scripting, here is another way to leverage ICM 5.2's new JavaScript model. You can also assign choice lists to workflow data fields using this technique (just use the data field name without appending the solution prefix).

Wire a Script Adaptor to the icm.SendNewTaskInfo event from container.

A long while ago, I added a blog entry that described how to use widget wiring and a script adapter to do quick data lookups in IBM Case Manager 5.0. One of our readers asked how you do a similar thing in ICM 5.2. Although very similar, the format of the payload for the event has changed.

Add a Script Adapter to a page that has the Properties Widget

Wire the inbound event of the Script Adapter to the Field Updated outbound event of the Properties Widget

Wire the outbound event of the Script Adapter back to the Properties Widget's Update Field event

In a case solution, document types defined in Case Builder may share some properties with the case type. When adding a case document to a case, you may want to carry the shared property values from the case to the case document, saving the user time and potential errors. Here is a sample that shows how this can be done.

1. In Case Manager Builder, create a Case Document Type which shares several properties with a case type.

2. Find the Case Information widget in the "Case Details" page and/or Work Details page, and edit its toolbar configuration.

3. Highlight the “Add” menu and click the button “Add Menu Item” in order to create a new menu item.

4. Add script action with the label of "Add Document with updated properties". See AddDocCopyProps highlighted below as an example.

5. In the script action's configuration, put the following script in the "Execute" section.

6. In Case Client, in the case document list inside Case Information widget, choose the "Add Document with updated properties" action for adding case document, select a matched case document type which share properties with the case. You will see that the document properties will be filled with the values from the properties from the case to which the document was added.

Yi Duan is an ECM Advisory Software Engineer in IBM Software Group, China. He has over 11 years of experience in software engineering. Yi joined IBM Content Navigator Quality Assurance team since its first release in 2011. He has extensive experience with IBM Content Navigator, especially in EDS. Prior to that, Yi worked in IBM Document Manager team for 6 years. Yi holds a Master degree in Computer Science from Beijing University of Posts and Telecommunications.

IBM Content Navigator has an extensible and pluggable framework that is based on the tier architecture and the usage of open standards such as JavaScript, HTML, CSS, and Java. It has powerful expandability. For a quick overview of the various options and framework, check out ONE UI - IBM Content Navigator as an application framework.

External data services (EDS)

EDS is an interface that IBM Content Navigator provides to access data from separate data sources. With EDS implementation, it is very easy for you to control the property dada and customize the behavior of the property. EDS is powerful. But in many scenarios, such as change properties order in the add dialog, you should implement request and response filter instead of using EDS.

Request and response filters

The request and response filters are parts of IBM Content Navigator extension points. In some instances, you might want to modify requests and responses so that you can modify the data that is being sent to or returned from the service. To accomplish this, you can create a plug-in to filter a request that is made to a service or to filter a response that is received from a service. EDS is a plug-in in IBM Content Navigator that is implemented by request and response filters. Often time, you would want to implement your own request and response filters. Other time, EDS can simplify your implementation.

When to use EDS and when to implement request and response filters?

Use EDS if you want to do some of the following tasks. Otherwise you probably need to implement a request or response filter:

Prefilling properties with values

Looking up the choice list values for a property or dependent property

Setting minimum, maximum values and length

Setting formats for properties

Setting property status, such as read-only, required or hidden

Implementing property validation and error checking

Where to use EDS?

According to the EDS implemented request and response filters, the following actions in IBM Content Navigator can be implemented:

Adding documents and folders

Checking documents in to the repository

Editing properties for one or multiple items

Editing item properties in the viewer

Using entry templates

Setting workflow step properties and workflow filter criteria fields

Creating or using searches

Controlling IBM Content Manager OnDemand search folders

If you want it in other actions, you probably need to implement a custom request or response filter.

For more information on EDS, response and request filters, check out the corresponding chapter in the new IBM Redbooks publication on IBM Content Navigator. In the book, we provide multiple examples of how to do these.

With ICM 5.1 a new feature 'Split Case' was introduced. This feature allows you to create a new case while working on a case and copy any case properties and documents from the existing case to the new case. There are several use cases where you would want to be able to split a case into multiple cases, e.g.:

A claim that appears to have sub-claims that need to be investigated by different specialists

A request that consists of multiple components, with different resolution time lines

etc.

Of course we want ICM to support such use cases. The ICM documentation explains how to configure the client to allow these split cases to be created:

Edit the toolbar widget on the out-of-the-box Case Details page

Add a new button with action="Split a Case" and give it a name

Clicking this new button will open a new page that allows you to select what case properties and what documents should be copied from the existing case to the new case.

Now when you have created some new cases this way, then you want to see in your solution that your original case has some related cases. Also, when you select one of the cases created this way, then you want to see the parent case from which the case was "split off". That's not well documented, so it's time to solve that problem. I'm assuming here that you want the related cases to show up in a list box under your In-basket and that selecting a work item will display any related cases in the list box.

Dave Perman's tips and tricks came in handy here, and a lot of what you find here was posted by Dave before.

Here we go:

1. Add a new 'Case List' widget to your 'Work' page, and give it a proper name (e.g. "Related Cases")

2. Also add a new 'Script Adapter' widget and give that a name, if you already have one or more of those on your page..

3. Wire your 'In-basket' widget to the new Script Adapter widget, using the 'Row Selected' event.

4. Wire the new Case List widget to the Script Adapter using the 'Search cases' event.

5. Edit the Script Adapter widget and paste the following code in there:

6. Save it and you're ready to go. Now when you select a work item that has one or more "split-off" cases, then those cases should show up in the 'Related Cases' list box. When you select a case that was split off from another case, then the original case should show up in the 'Related Cases' list box.

In one of his Tips and Tricks submissions, Dave Perman explained how you can show related cases based on an identical case property. Decide for yourself what best fits your use case.

Summary
Download sample code that can be used to build a sample external data service to use with IBM Case Manager, Version 5.1. External data integration is a feature of IBM Case Manager, V5.1 that allows certain information about case properties, such as choice lists, to come from an external data source.

The sample external data service is distributed as a self-contained ZIP file. Extract the ZIP file to a location of your choice. The expanded file structure includes JAVA source files, configuration files, and an Apache Ant script to build the application. The expanded structure also includes two technical documents that describe how to build and use the sample.

The sample can be downloaded and expanded to any machine. However, by default, the build files are configured to reference JAR files that are located on a machine where IBM Case Manager is installed. The build files can be modified to match your particular environment.

After you download the sample, see the included document UsingSampleExternalDataService.pdf for more information about building and using the sample service. The sample is a Java servlet-based web application that must be deployed to a WebSphere Application Server environment. After the application is deployed, a URI to the service must also be registered to a solution in IBM Case Manager.