Deploying POM widgets

Last Updated : Oct 18, 2023 |

About this task

Use this procedure to deploy POM widgets on the web server.

Before you begin

Log in to Avaya Workspaces with administrator credentials and download the Avaya Workspaces Widget Framework document. Widget Framework is a feature that extends the customization capabilities of Avaya Workspaces.

With this feature, contact centers can:

  • Customize the layout and behavior of Avaya Workspaces for an entire contact center

  • Access Widget API so that developers can create custom widgets that can be configured and deployed in Avaya Workspaces

Choose the web server to deploy the widgets and ensure:
  • The web server is hosted on the same network as Avaya Oceana®.

  • The web server has a network RTT of less than 120 milliseconds.

  • The web server is configured for CORS.

  • If you host the library on POM Tomcat server, edit the file:

    For example: /opt/AppServer/Tomcat/apache-tomcat-8.5.15/webapps/conf/web.xml and add the following content to the configuration within the </web-app> tag.

    <filter>

    <filter-name>CorsFilter</filter-name>

    <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

    <init-param>

    <param-name>cors.allowed.origins</param-name>

    <param-value>*</param-value></init-param>

    <init-param>

    <param-name>cors.allowed.methods</param-name>

    <param-value>GET,POST,PUT,DELETE,HEAD,OPTIONS</param-value>

    </init-param>

    <init-param>

    <param-name>cors.exposed.headers</param-name>

    <param-value>Access-Control-Allow-Origin</param-value>

    </init-param>

    </filter>

    <filter-mapping>

    <filter-name>CorsFilter</filter-name>

    <url-pattern>/*</url-pattern>

    </filter-mapping>

  • Change the cors.allowed.origins value to the *.

  • For IIS Server version 7.0, merge the following into the web.config file at the root of your application or site:

    <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>

    The Access-Control-Allow-Origin value is the Workspaces FQDN URL.

  • The web server is configured in HTTPS mode.

    You can use the POM tomcat server to deploy the widgets, which is available at the following location:

    /opt/AppServer/Tomcat/apache-tomcat-8.5.15/webapps/widgets

    Note:
    • The web server supports a maximum of 1000 POM agents.

    • The web server will not have overload issues because the server hosts only the static version of files.

Procedure

  1. Ensure that all agents are logged out.
  2. Stop or pause all running campaigns.
  3. Stop the web server.
  4. Download the widget from the download location.
  5. Unzip the widget file into a folder on the web server.

    All files are unzipped in the current directory.

    Note:

    Modify the permission of the folder pom-connectorwidget which got created after unzipping the widgets by using the following command:

    chmod -R 755 pom-connectorwidget

  6. Delete the old widget directory from the main widget directory.
  7. Copy unzipped files to the main widget directory for example “widget-library” and maintain the structure names as present in the zip file.
  8. Restore the configurations:
    1. Make changes to the parameters in the properties.json looking at the backup file from the pom-connectorwidget\conf\properties.json if there were any changes.
    2. Restore reasonCode.json if you are using the file based not ready reason codes.
  9. After installing the widgets on the web server, restart the web server.

Next Steps

Verify the widget version:

Use the following link from the Workspace client to verify the version of the JSON:

https://<widgetserver-baseURL>/pom-connectorwidget/pom-connector.json

The widget version is displayed in the JSON format. For example: "version": "3.7-3.1.3.1.2-4.0.0.0.47"