Embedding document generation in OpenSocial containers such as dashboards

You can use Document Builder to embed document generation capabilities in Open Social containers, such as dashboards for IBM® Engineering Lifecycle Management (ELM).

Before you begin

  • Ensure that Document Builder is running in HTTPS mode. See Enabling HTTPS mode.
  • The administrator might need to set the CORS_DOMAINS (Cross_Origin Resource Sharing) property on the Document Builder server to allow XHR requests from the ELM server. This property is not required if the ELM application and Document Builder are co-hosted on the same server, for example CORS_DOMAINS=https://elm_server:port. To set the CORS_DOMAINS property:
    • For IBM WebSphere® Application Server full profile: Go to Application servers > server1 > Process Definition > Java Virtual Machine > Custom Properties and add the ELM server and port.
      CORS_DOMAIN setting
    • For IBM WebSphere Application Server Liberty Profile: See Configuring Cross Origin Resource Sharing on a Liberty server.

About this task

Document Builder provides an example widget that can access the latest version of a report. After you add the widget to an OpenSocial container, you can generate the document from the embedded widget. You can create any number of widgets by using the REST APIs. The following steps use an ELM dashboard as the container.

Procedure

  1. You can find the sample widget at http://rpe_server:port/widgets/singlereport.xml.
  2. Go to your Open Social container.
  3. From the dashboard, click the Add Widget tab.Add widget
  4. Click Add OpenSocial Gadget.
    Add OpenSocial widget
  5. Enter the URL to the sample widget from step 1.
  6. Click Add widget.
    PUB Document Generation settings
  7. Save your changes. The widget is added to your dashboard.
  8. In the widget menu, click Settings.
  9. In the Report field, enter the link to the report. See Sharing resources through unique URLs to get the link. Specify whether the report is shared. If you want the documents to be shared, the documents are visible to anyone with access to the server.
  10. Log in to Document Builder in the widget.
    Log into Document Builder
  11. Click Refresh in the widget.
  12. Click Generate Document. After the document is generated, you can download the documents and logs.
    Generated documents

Feedback