The IBM® FileNet® BPF Web Application provides two out-of-the-box tabs that you can invoke on any Case object: Case and Audit. The Case tab layout differs based on the Case type and could also be extended with custom code or a modified XSL stylesheet. The Audit tab is not customizable.
BPF provides the facility to allow you to plug in your own tabs that can extend the Case data model, display data from external systems, or accommodate any special business requirements that cannot be easily met by the out-of-the-box tabs. This facility will be referred to as Tab Plug-in Interface. In addition to the Case and Audit tabs, two more tab plug-ins come as part of BPF: Attachments and Table. Refer to the Attachment and Table tabs help topic for details about those tabs.
This help topic describes the Tab Plug-In Interface in detail, including steps to develop a simple tab.
The BPF web application uses a CSI (Client Side Include) approach instead of SSI (Server Side Include) to allow dynamic HTML in plug-in tabs. SSI is static; once the page is loaded, SSI cannot do anything more to change the page. With CSI, developers can make the page fully dynamic. BPF uses an iFrame container to render and display plug-in tab content. As long as the tab handler is deployed within the same application, tab content can access data available via BPF JavaScript Business Object or data on other tabs. URL parameters could be used to pass data to the plug-in page itself.
After creating a custom tab, you must register it, setting its location and configuration in the BPF Metastore. Once you register the tab, you can expose it on the Inbaskets as required.
At the present time, BFP Explorer does not allow registering new parameters for (or modifying existing parameters on) the existing tabs. New plug-in tab registration or modification of the existing tab needs to be done directly in the BPF Metastore using SQL or Oracle client. The tab URL handler is registered in the TAB table, TAB_CONTENT column. The Tab Plug-in Interface supports absolute and relative paths to the tab page. The following table describes the URL formats supported.
URL Type | Identifier | Description |
---|---|---|
Absolute |
Value starts with http:// or https:// |
A fully-qualified URL of the page to which the Tab Plug-in Interface redirects after the command executes. The tab code must handle the command information passed in the URL. The following example shows a sample URL using an absolute path.
|
Relative to BPF root |
Value starts with the / |
A relative URL of the page to which the Tab Plug-in Interface redirects after the command executes. This URL is relative to the root of the web application. The tab code must handle the command information passed in the URL.
|
Relative to tool root |
None of the above |
A relative URL of the page to which the Tab Plug-in Interface redirects after the command executes. This URL is relative to the root of the tabs folder (/plugin/tabs/{tab_name}). The tab code must handle the command information passed in the URL.
|
The following table describes the parameters passed to the Tab Interface. Note
that some parameters must be URL-encoded with the Java™ API method URLEncoder.encode
.
Parameter | Value | Required/Optional | Description | Requires Encoding |
---|---|---|---|---|
{case_field_name} | {CFNAME} | optional |
The Example: |
no |
iid | {IID} | optional |
The Example: |
no |
iname | {INAME} | optional |
The Example: |
no |
tname | {TABNAME} | optional |
The Example: |
no |
_showatt | 1 or 0 | optional |
The
NOTE If the attachments list is disabled on the application or Inbasket level, this setting will be ignored. |
no |
_cache | 1 or 0 | optional |
The
onBeforePluginTabLoad event handler defined in EventHandler.js . |
no |
In addition to the parameters listed above, you can also include any optional parameters required by your plug-in tab.
Since plug-in tab content is loaded into an iFrame element on the BPF Main page as an independent HTML document, the plug-in tab design may follow any design pattern desired assuming it is compatible with BPF. There are certain design considerations you must follow in order to make BPF aware of your plug-in tab.
Plugin tab behaviors could be customized via the JavaScript Business Object
Interface, utilizing the tab
object methods and functions. The
tab
object prototype is defined the in Bp8BusinessObjects.js and
is detailed in the IBM FileNet Business Process Framework Developer Guide. The following table provides some details
on the most commonly used features.
Object Name | Description |
---|---|
tab.dirty |
If plug-in tab custom code sets the
The following JavaScript™ code sample is executed from the plug-in tab
and resets the |
tab.save() prototype |
If a plug-in custom tab exposes a user interface where data could be changed,
it may expose a If a |
tab.refresh() |
If a plug-in custom tab calls the refresh() method to reload the tab content. The following JavaScript code sample is executed from the plug-in tab, refreshing the tab content:
|
You can also plug in custom code that will execute when a user clicks the tab.
When a plug-in tab is loaded, the onBeforePluginTabLoad
event will
be raised. Custom code could be added to the EventHandler.js
to
intercept the onBeforePluginTabLoad
event, execute any business
logic, and then continue or cancel the tab loading. For example, you can create
custom code that would implement a custom caching algorithm, determining whether
the tab should be loaded or not. Refer to IBM FileNet Business Process Framework Developer Guide for on details
on using EventHandler.js.
Creating a custom tab to plug into the BPF Web Application requires an understanding of the FileNet P8 Platform Web Application Toolkit framework and BPF base modules. This section outlines the general steps you would take to create a new plug-in tab.
To create a custom plug-in tab:
Refer to IBM FileNet Business Process Framework Developer Guide for plug-in tab samples.
If you change the plug-in tab definition in the TABS table in BPF Metastore while the BPF Web Application is running, you must restart the application using the Web server administration console.
The dropdown list of available tabs that appears on the Preferences dialog in the BPF Web Application
for setting the Default tab is hard-coded (static) in the user-preferences.xml
file located
in the \WEB-INF\
directory. To add or remove your custom plug-in tab to make it available
in this list, open the user-preferences.xml
file, edit the section at the bottom (shown in the
example below), and then save the file. In addition, if you want to localize the display value for your
plug-in tab, you will need to add a key to the strings-custom.en.txt
file inside the
bpfCustomLangResources.jar
file in the \WEB-INF\lib
directory, such as
bp8.custom.server.inbasket.tabs.YOUR_TAB_NAME=MY_TAB_NAME
Otherwise, just leave the string value for the label in the section of user-preferences.xml
shown below blank (""). You will then need to restart the web service in order to see your changes take effect.
The added entry for a new plug-in tab is shown in the example below as item id="4":
<option-list id="ol-tab-list">
<option id="1" label="bp8.server.inbasket.tabs.Case">Case</option>
<option id="2" label="bp8.server.inbasket.tabs.Audit">Audit</option>
<option id="3" label="bp8.server.inbasket.tabs.attachment">Attachment</option
<option id="4" label="bp8.custom.server.inbasket.tabs.YOUR_TAB_NAME">{YOUR TAB NAME}</option>
</option-list>
Please note that the tab list in User Preferences is static and does not change based on the tabs configured in the current Inbasket or user role.