IBM Support

Defining registry files for custom actions, properties, page widgets, and events in IBM Case Manager V5.2

Question & Answer


Question

What properties can I include in the registry files for my custom action, properties, page widget, or event?

Answer

Contents

Defining the widget package catalog file

The widget package catalog file is a JSON file that identifies the custom page widgets that are contained in your widget package. This file, which must be named Catalog.JSON, is located in the ICMRegistry or ICMRegistry/nls folder of your widget package.

The following example shows the structure of the Catalog.json file:

  {      "Name":"IBM Case Manager Widget package",      "Description":"Description of package",      "Locale":"",      "Version":"5.2",      "Categories":[                      {              "id":"EducationWidgets",              "title":"Education Widgets"          }       ],      "Widgets":[         {  		    "id":"CustomInbasket",  		    "title":"Custom Inbasket",  		    "category":"EducationWidgets",  		    "description":"EN description of Custom Inbasket",  		    "definition":"CustomInbasket.json",  		    "preview":"images/custom/custominbasket_preview.gif",  		    "icon":"images/custom/custominbasket_icon.gif",  		    "runtimeClassName":"icm.pgwidget.inbasket.CustomInbasket",  		    "previewThumbnail":"images/custom/custominbasket_thumb.gif"  		} ,      ],  ]    

The following table describes the properties that are supported for the Catalog.json file:

Property Required or
Optional
Type Description
Name Required String A name for the custom page widget package. You must specify a unique name for the package to avoid overriding an existing page widget package.
Description Required String

A description of the custom page widget package.

Locale Required String

The 2-character locale code for the current catalog. For example, "zh" is the locale code for simple Chinese.

The code is added as a subfolder name when the widget definition file is retrieved.

By default value, the locale is set to “”.

Version Optional String The version number that is assigned to the widget package.
Categories Optional String

The categories in Case Manager Builder in which the custom page widgets in this package are listed.

You can choose to list the page widgets in one of the following categories, which are provided by IBM Case Manager:

  • CaseWidgets
  • GenericWidgets

For each category, you must provide an identifier and title.

Categories/id Required String A unique identifier for the widget category.
Categories/title Required String The name that is to be displayed in Case Manager Builder for the widget category.
Widgets Required JSON array

An array that identifies the custom page widgets in this package.

For each page widget, you must provide the following information.

Widgets/id Required String A unique identifier for the page widget.
Widgets/category Required String The identifier of the category in which the page widget is to be listed in Case Manager Builder.
Widgets/title Required String The name to be displayed for the page widget in Case Manager Builder.
Widgets/description Required String A description of the page widget. This text is used as hover help for the widget in Case Manager Builder.
Widgets/definition Required String The full path and name of the definition file for the page widget.
Widgets/preview Required String The relative path and name of the resource file that contains the preview image for the page widget. For example, the value might be images/myWidget_prv.png.

The image can be a .png file or a .gif file.

This image is not used in IBM Case Manager V5.2.

Widgets/icon Required String The relative path and name of the resource file that contains the icon image for the page widget. For example, the value might be images/myWidget_icon.png.

The image can be a .png file or a .gif file.

This image represents the page widget in the Case Manager Builder palette.

Widgets/runtimeClassName Required String The class name for the page widget as specified in the run-time plugin for the widget package.
Widgets/previewThumbnail Required String The relative path and name of the resource file that contains the thumbnail image for the page widget. For example, the value might be images/myWidget_thnl.png.

The image can be a .png file or a .gif file.

This image is not used in IBM Case Manager V5.2.

Defining a page widget definition file

The page widget definition file is a JSON file that provides detailed information about a custom page widget. You must provide a definition file for each page widget in your custom widget package.

The following table describes the properties that are supported for a page widget definition file:

Property Required or
Optional
Type Description
id Required String A unique identifier for the page widget.
category Required String The identifier of the category in which the page widget is to be listed in Case Manager Builder.
title Required String The name to be displayed for the page widget in Case Manager Builder.
description Required String A description of the page widget.
definition Required String The full path and name of the definition file for the page widget.
preview Required String The relative path and name of the resource file that contains the preview image for the page widget. For example, the value might be images/myWidget_prv.png.

The image can be a .png file or a .gif file.

This image is not used in IBM Case Manager V5.2.

icon Required String The relative path and name of the resource file that contains the icon image for the page widget. For example, the value might be images/myWidget_icon.png.

The image can be a .png file or a .gif file.

This image represents the page widget in the Case Manager Builder palette..

runtimeClassName Required String The class name for the page widget as specified in the run-time plugin for the widget package.
previewThumbnail Required String The relative path and name of the resource file that contains the thumbnail image for the page widget. For example, the value might be images/myWidget_thnl.png.

The image can be a .png file or a .gif file.

This image is not used in IBM Case Manager V5.2.

properties Required Array An array that defines the properties that can be set for the page widget in Case Manager Builder.
events Required Array An array that identifies the events that the page widget publishes and subscribes to.

The following example shows the structure of a page widget definition file. For examples of page widget properties, see "Defining a property." For examples of page widget events, see "Defining an event>"

  {      "id":"CustomInbasket",      "title":"Custom Inbasket",      "category":"EducationWidgets",      "description":"EN description of Custom Inbasket",      "definition":"CustomInbasket.json",      "preview":"images/custom/custominbasket_preview.gif",      "icon":"images/custom/custominbasket_icon.gif",      "runtimeClassName":"icm.pgwidget.inbasket.CustomInbasket",      "previewThumbnail":"images/custom/custominbasket_thumb.gif",        "properties":[        ],        "events":[         ]  }    

Defining an action definition file

The action definition file is a JSON file that provides detailed information about a custom action that is used for page widgets. You must provide a definition file for each custom action in your custom widget package.

When you develop an action, you should create a Java class that inherits from the com.ibm.ecm.extension.PluginAction class. In your class, override getAdditionalConfiguration() method to return a JSON object.

The following example shows a JSON object:

  {"ICM_ACTION_COMPATIBLE": true,      "context": null,      "name": "Custom Add Case Action",      "description": "An action to add cases from other solution",      "properties": [         {            "id": "label",            "title": "Add a custom Case",            "defaultValue": "Custom Add Case",            "type": "string",            "isLocalized":false         },         {            "id": "solution",            "title": "Solution",            "type": "string",            "isLocalized":false         },         {            "id": "caseType",            "title": "Case Type",            "defaultValue": "",            "type": "string",            "isLocalized":false         }      ],      "events":[         {            "id":"icm.OpenAddCasePage",            "title":"Open Add custom Case Page",            "direction":"published",            "type":"broadcast",            "description":"Open Add Custom Case Page"         }      ]  };  

The following table describes the properties that are supported for an action definition file:

Property Required or
Optional
Type Description
ICM_ACTION_COMPATIBLE Required Boolean A Boolean value that is set to true if the action can be used in the IBM Case Manager action framework. This framework extends the IBM Content Navigator action framework to provide case-related functions.

This property should always be set to true for IBM Case Manager.

type Optional String A string that indicates special processing for the action. The following values are valid for the type property:
  • iterator

    Specify this value if the action is defined using a method such as getIterator(). The method returns a series of items which are rendered as buttons or menu items.

  • checkbox

    The action is rendered as a checkbox in the toolbar or pop-up menu. If you sent the type property to this value, you must also set the fieldname property to checkbox.

fieldname Required String If the type property is set to checkbox, you must set this property to the identifier of a property that is defined in the properties array.

If type property is not set to checkbox, omit the fieldname property.

description Required String A string that provides a brief description of the action.
context Required Array An array that indicates the contexts in which the action can be used. The array elements can take the following formats:
  • [["Context 1", "Context 2"]]

    The action requires both Context 1 and Context 2 to run.

  • ["Context 1", "Context 2"]

    The action requires either Context 1 or Context 2 to run.

  • [[“Context 1”, “Context 2”],[“Context 1”, “Context 3”], “Context 4”]

    The action requires Context 1 and Context 2 or Context 1 and Context 2 or Context 4 to run.

  • []

    The action does not require a context to run.

name Required String The name that is displayed in the user interface for the action.
properties Required Array An array that defines the properties that a user can configure an action in a toolbar or menu for a page widget or that is used internally by the action at run time.
events Required Array An array that defines the events that are published by the action. This array can be empty if the event does not publish any events.

Defining a property for a page widget or an action

You can define a property in the definition file for a custom page widget or a custom action. The property is used to configure the page widget or action in Case Manager Builder.

The following table describes the properties that are supported for page widgets and actions:

Property Required or
Optional
Type Description
propertyType Required String A value that indicates whether the property is a single property or a property group.
  • property

    Specify this value if the property object contains a single property.

  • group

    Specify this value if the property object contains a group of properties.

type Required string A value that indicates the type of the property. For more information, see Defining property types.
id Required string A unique identifier for the property.
defaultValue Optional Depends on the property type The default value for the property.
required Required Boolean A Boolean value that is set to true if the property is required. By default, the required property is set to false.
visibility Optional Boolean A Boolean value that is set to true if the property is visible. By default, the required property is set to true.
title Required String The label that is displayed for the property in Case Manager Builder.
remapNeeded Optional Boolean A Boolean value that is set to true if the property value needs to be updated when the solution is imported and deployed to a production environment.

This property applies only to a string property.

propertiesMember Optional Array An array that defines the properties within a property of type group.

Defining a property type

You set the type property for a page widget property or an action property to one of the following values.

Group property types

Property type Description
Tab Defines a new tab in the Edit Settings dialog box.
Section Defines a section group that can be expanded and collapsed.
Dropdown Defines a drop down list that is used to select a value from a group of properties.
propertyPanel Defines a content panel in which a group of properties are displayed.

Generic property types

Property type Description
Boolean Defines property that has a Boolean value.
Datetime Defines property that has a datetime value.
Float Defines property that has a Float value.
Integer Defines property that has an integer value.
String Defines property that has a string value.

The following graphic shows Boolean, float, integer, and string properties for a custom widget:


These properties are defined in the properties section of the page widget definition file as follows:

    {     "propertyType":"property",     "type":"integer",     "id":"integer1",     "defaultValue":20,     "required":false,     "visibility":true,     "title":"Integer property 1"  },  {     "propertyType":"property",     "type":"float",     "id":"float1",     "defaultValue":12.34,     "required":false,     "visibility":true,     "title":"Float property 1"  },  {     "propertyType":"property",     "type":"boolean",     "id":"boolean1",     "defaultValue":false,     "required":false,     "visibility":true,     "title":"Boolean property 1"  },  {     "propertyType":"property",     "type":"string",     "id":"string1",     "defaultValue":"default string",     "required":false,     "visibility":true,     "title":"String property 1"  },    

The following graphics show a datetime property for a custom page widget:




This property is defined in the properties section of the page widget definition file as follows:

    {     "propertyType":"property",     "type":"datetime",     "id":"datetime1",     "defaultValue":"2013-05-01T03:00:00Z",     "required":false,     "visibility":true,     "title":"Date Time 1	"  },    

IBM Case Manager property types

Property type Description
caseType Displays an editor to enable users to select a case type in Case Manager Builder.
Choicelist Displays a choice list for the property. This value can be used with other property types such as String.
contextualMenu Displays an editor to enable users to edit a pop-up menufor a page widget in Case Manager Builder
Label Provides a read-only label that is displayed for the property. This value must be set to label for an action.
Order Displays an editor that enables users to configure the order of the tabs in the Case Information widget.
Role Displays a list roles that are available in the solution from which the user can select to configure the property.
Task Displays a list of tasks that are available in the solution from which the user can select to configure the property.
Textarea Displays a text input field for widget to input a piece of text.
Toolbar Displays an editor that enables users to edit a toolbar for a page widget in Case Manager Builder.
View Displays a selection list that contains all the views that are available for the case types in a solution.
viewList Displays a list of case type-view pairs that enables the user to select a view. This property enables the user to add multiple views into the list. The output is a list of view identifiers.

Defining widget an event

You can define events as part of the page widget definition. You can define incoming events that provide handlers for events that are received by the page widget. You can also define outgoing events that published by the page widget. Outgoing events can be either broadcast or wired.

The following table lists the properties you define for an event:

Property Required or
Optional
Type Description
id Required String The unique identifier for the event.
title Required String The title of the event or event handler.
functionName Required String For an incoming event, the name of the function that handles the event. This property is not used for outgoing events.
direction Required String Indicates whether the event is incoming or outgoing. Set to subscribed for and incoming event and to published for an outgoing event.
type Required String For an outgoing event, indicates whether the event is broadcast or wired. Set to broadcast for an event that is broadcast and to wiring for an event that must be wired.
Optional String A description of the event. This text is used as hover help for the event in the Wiring dialog box.

The following code shows how events are defined in the page widget definition file:

  "events":[                       {                           "id":"icm.RoleChanged",                           "title":"Role selected",                           "functionName":"handleReceiveRole",                           "direction":"subscribed",                           "description":"Update the In-baskets widget to display the in-baskets that are associated with the specified role."                       },                       {                           "id":"icm.SelectRow",                           "title":"Row selected",                           "direction":"published",                           "type":"wiring",                           "description":"The user clicked a row or pressed enter in the in-basket to select the work item."                       },                       {                           "id":"icm.OpenCase",                           "title":"Open Case",                           "direction":"published",                           "type":"broadcast",                           "description":"Open a case object."                       }  ]  

[{"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"5.2.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21648524