Callout Interface Methods
The callout interface methods allow you to callout, or inject, custom specifications in WCC applications, including the Workspace application.
The callout interface methods can be used to do the following:
- Define custom filters, sorts, filter attributes, sort attributes, and display columns on various lists.
- Restrict the list of processes that are available to a user when creating a process view or starting a process instance.
- Restrict the list of business services or business service categories that are available to a user when starting a business service.
- Specify characteristics of lists displayed in the application, for example, font color, alignment, etc. (This is accomplished using the modifyMatrix method.)
These methods can be used in conjunction with user access profile settings to control filter, sort, and attribute display for various entities in the organizational model. The content and characteristics of lists may be managed by invoking these methods when the list initially loads, or when the user modifies filter, sort, or column definitions.
The following summarizes some example use cases for the methods in the callout interface. Note that this is not an exhaustive list; the callout methods can be used for additional uses case beyond those listed here.
- When the application initially starts (that is, the very first time), apply a default filter or sort to a list that varies depending on the organizational group to which the logged-in user belongs. However, allow the user to modify the default filter and sorting settings, which will apply in future sessions.
To implement this use case, use the following methods:
- Prohibit all members of a particular organizational position from filtering, sorting, or displaying a certain set of attributes.
To implement this use case, use the following methods:
- Apply an undisclosed filter to a list to restrict access to sensitive data (although users can still apply additional filters).
To implement this use case, use the following method:
- Display, for each list type, a default set of columns, which varies depending on the organizational group to which the logged-in user belongs. Users may modify the default columns, but regardless of the columns chosen by the user, a certain attribute must always be displayed in the first column and the list must be sorted on this attribute at all times.
To implement this use case, use the following methods:
- overrideColumnsOnLoad (for the initial default columns)
- overrideColumnsOnRefresh (to force the first column and sort on attribute)
- Apply a particular filter and sort order to each list type, which may
not be modified by the user, that is, the user is denied access to the tools for filtering and sorting.
To implement this use case, use the following methods:
- overrideFilterOnLoad
- overrideSortOnLoad
- “Filter” and “Sort” removed from userAccess.xml to deny access to filter and sort tools.
- Display a label (for example, “SSN”) for a particular work item attribute in the user’s Inbox work view, but display a different label (for example, “Customer ID”) for the same attribute in other work views.
To implement this use case, use the following method:
- Display values in a particular list column in a larger, bolder font with a different color than other columns in the list.
To implement this use case, use the following method:
- Localize or customize the names of work views, process views, and event views, as well as specify the order of the views in the views list.
To implement this use case, use the following method:
In order to implement the callout interface, a callout controller class is provided in the WCC base application (com.tibco.wcc.base) and a customized callout handler class (com.tibco.wcc.appName.CalloutHandler) is loaded by the WCC application.
The callout handler contains the business-specific logic to control filters, sorts and attributes. This logic is contained in "override" callout methods, which are registered with the callout controller when the handler class is loaded. The controller maintains a list of the available callout methods and invokes the appropriate method as application events occur (such as creating a list or applying a filter).
Some of the callout interface methods require information that is not readily available, such as user details, or the XML that represents the graphical representation of a filter expression. Some “helper” methods are provided that can be used to obtain this type of information. These are described in Callout Utilities.
Some of the callout methods can be used to filter and sort the attributes that are shown on work item, process instance, and event lists. However, only some attributes are filterable and sortable. For more information, see Workspace Attributes.