Enabling widgets to work with multiple endpoints

If you have one dashboard instance configured and you have a need to create another instance of the service endpoints in your environment, you must configure IBM® Business Monitor so that the widgets can display data from the multiple service endpoints. You must edit two files: the endpoints file, which registers endpoints with the Business Space component, and the widget catalog file, which contains definitions of widgets.

Before you begin

Before you complete this task, you must have completed the following tasks:
  • Installed Business Monitor.
  • Created a server or cluster and configured it for Business Space.
  • Configured the database tables (if you are using a remote database or deployment environment).
  • Configured the additional Representational State Transfer (REST) services for your additional widgets.

About this task

In a deployment environment, you can have partitioning of work. For example, you can have two clusters, one that processes accounting data and one that processes insurance data. However, a service endpoint serves only one cluster. To access both partitions of work from dashboard, you must register two separate widgets, one for each partition of work, so you can access them both from dashboard. For example, you could have an Account Human Task List widget and an Insurance Task List widget in the catalog (both with the same actual human task list code).

You must manually edit the endpoints file and the widget catalog file.

Widget service endpoint files are bundled with each product and are added during the installation of the product. You must edit one or more Business Monitor service endpoint files and the Business Monitor widgets you are using with IBM Business Monitor. The following list includes IBM Business Process Manager examples of widget service endpoint files:
  • IBM Business Monitor: monitorEndpoints.xml
  • IBM Business Monitor with IBM Cognos Business Intelligence: cognosEndpoints.xml
  • wsumEndpoint.xml (for user membership)
Widget catalog files contain the definition of widgets for your product. You must edit one or more of the following Business Monitor widget files and the Business Monitor widgets you are using with Business Space. The following list includes IBM business process management examples of widget catalog files:
  • catalog_WBMonitor.xml

Both the service endpoint files and the widget catalog files are located at install_root\BusinessSpace\registryData\product_name\. The endpoints files are located in the endpoints subdirectory, and the catalog files are located in the catalogs subdirectory.

The install_root\BusinessSpace\registryData\product_name\ directory contains service endpoint and widget catalog template files for Business Monitor. You can copy the files that you need to use as a template and add your changes.

Procedure

  1. In order to have multiple instances of a widget, you must install the applications that provide widgets with a unique application name and context root for each widget instance.
    1. Deploy the widget application on the Business Space deployment target (the same server or cluster on which the BSpaceEAR_server_node application is running) for each widget instance. The following list includes IBM business process management examples of widget Enterprise Archive (EAR) files:
      • HumanTaskManagementWidgets_nodename_servername
      • WBMDashboardWeb_nodename_servername
    2. When deploying, update the application name and the web module context root names to a unique name. Take note of the context root names that you use.
  2. Edit the new REST service endpoints for the additional application deployment targets (the server or cluster where the REST services application is deployed). Create a service endpoints file to add service endpoints.
    1. Locate the endpoint files in the install_root\BusinessSpace\registryData\product_name\endpoints directory. Copy the endpoints template file, and remove all the endpoints that you do not intend to change.
    2. Edit the endpoints file and add an additional service endpoint starting with <tns:Endpoint>, with a unique ID (<tns:id>) and the URL for the new endpoint (<tns:url>), but with the same version, and optionally all the locales as the original endpoint. The type (<tns:type>) must have the same value as the ID (<tns:id>). You can change the name and description, for example, My team's insurance task list.
    3. When adding endpoints, pay attention to the following information:
      • <tns:id>: The ID can be any string but must be unique for all registered endpoints. Ensure that this ID is unique when you are adding additional endpoints.
      • <tns:type>: The type must have the same value as <tns:id>.
      • <tns:url>: For the service endpoint, if the URL is relative, then it is assumed that the REST service endpoint is co-located with the Business Space server. If the URL is relative, make sure the URL is same as the context root you deployed, but with beginning and end directory indications, for example, <tns:url>/REST_Endpoint_for_server2/</tns:url>. If your endpoint is on a remote system, update this field with an absolute URL, but with an end directory indication.
      • <tns:description>: Type a meaningful description that further details the nature of the data set that this endpoint is working on. It could either be based on the cluster that is working on the data set or the nature of the data set, for example, insurance claim human tasks or accounting data human tasks.
    4. Save your changes.
  3. In the service endpoints file, add a widget endpoint for each widget instance.
    1. Edit the endpoints file that you created in step 2. Add an additional widget endpoint starting with <tns:Endpoint> and with a unique ID (<tns:id>). The type (<tns:type>) must have the same value as the ID (<tns:id>). The URL for the new endpoint (<tns:url>) should be the same as the context root you deployed in step 1., but with beginning and end directory indications, for example, <tns:url>/BSpaceWidgetsWPS2/</tns:url>. The widget endpoint you add should contain the same version and can optionally contain all the locales as the original endpoint. You can change the name and description.
    2. When adding endpoints, pay attention to the following information:
      • <tns:id>: The ID can be any string but must be unique for all registered endpoints. Ensure that this ID is unique when you are adding additional endpoints.
      • <tns:type>: The type must have the same value as <tns:id>.
      • <tns:url>: For the widget endpoint, make sure the URL is same as the context root you deployed, but with beginning and end directory indications, for example, <tns:url>/BSpaceWidgetsWPS2/</tns:url>.
      • <tns:description>: Type a meaningful description that further details the nature of the data set that this endpoint is working on. It could either be based on the cluster that is working on the data set or the nature of the data set, for example, insurance claim human tasks or accounting data human tasks.
    3. Save your changes.
  4. Create a widget catalog file to add new widget definitions.
    1. Locate the widget catalog file in the install_root\BusinessSpace\registryData\product_name\catalogs directory. Copy the catalog template file. For the new file name, use the following standard: catalog_widget.xml (with no spaces in the file name), where widget is the same as the ID value of the <catalog> element in the file. Remove all the <category> elements that you do not intend to change. For the category that you are working with, remove all the <entry> elements that you do not intend to change.
    2. Add an <entry> with a unique ID, for example, id="{com.ibm.bspace.widget}widget_id and a unique name, for example, unique-name="{com.ibm.bspace.widget}widget_name. You can keep all the other definitions.
    3. Change the title and description to make the new widget available as a distinct widget in Business Space that outlines the nature of the new endpoint. For example, you could name your widget My team's insurance task list in the <title>. The title should help the business users choose the right widget. The description should help the business users understand the nature of the data and the functionality of the widget that they are selecting.
    4. Edit the new widget catalog XML file to reference the new widget endpoint: Change the definition to match the <tns:id> of the widget endpoint you added in step 3.a.

      For example, change it to: ...

      <definition>endpoint://{com.ibm.wbimonitor}monitorWidgetRootId2/com/ibm/wbimonitor/common/iWidgets/instances_iWidget.xml</definition>

      ...

    5. In the <metadata> of the catalog file, make sure the endpoint:// matches the type and the ID in the endpoint file (<tns:type> and <tns:id>).
    6. In the <metadata> of the catalog file, make sure the "refVersion" : matches the version in the endpoint file (<tns:version>).
    7. Save your changes.
  5. Place the new service endpoint file and the new widget catalog file in a compressed file, and run the updateBusinessSpaceWidgets command, using the -widgets parameter to specify the compressed file location.

What to do next

  • After running the updateBusinessSpaceWidgets command, you must perform manual steps to update dashboards templates and spaces. For more information, see Updating templates and spaces after installing or updating widgets.
  • If dashboards are running on a different cell than where the REST services are running, you must manually edit the endpoints files.
  • If you have enabled security for your environment, you must make sure that it is set up properly to work with dashboards.