Opqo is designed to be process oriented, using standard Maximo functionality.  However, we recognize that everybody uses Maximo a little differently, and so Opqo is designed to be configurable based on the Maximo environment it connects to.


Opqo contains a base configuration that is designed to work with standard Maximo.  One of the automation scripts Opqo installs is STAUTOSCRIPT.STAMCONFIG.  This script is responsible for defining and delivering the Opqo configuration changes for that particular Maximo environment.  


When Opqo connects to a Maximo environment, it retrieves the changes in Opqo configuration delivered by STAUTOSCRIPT.STAMCONFIG and applies them as overrides to the base configuration.  Hence, configuration changes can be made by modifying this script.


Currently, making configuration changes is a manual process, and this Configuration section describes the available configuration options.  We are, however, working to make this process easier and more accessible!



Basic STAMCONFIG Script


When you installed Opqo, it prompted you to answer a few simple questions about work assignment: How you assign work orders to technicians, and how you assign work orders to supervisors.   The answers to these questions are stored in the basic STAMCONFIG script that is installed into the environment.


It looks like this:


appConfig = {
  "general": {
    "assignment": {
      "technician": {
        "strategy": "LeadAssignmentStrategy"
      },
      "manager": {
        "strategy": "SupervisorAssignmentStrategy"
      }
    }
  }
}

handleRequest();

function handleRequest() {
    var result = {}
    
    // If true, this config script will be updated by application updates.
    // If false or not present, this config script will no longer be
    // modified by application updates, and must be manually maintained.
    result.allowAppUpdates = true

    // If true, this contains a partial configuration that will be
    // overlaid over the default configuration.
    // If false, this will be treated as a complete configuration
    result.isDeltaConfig = true

    // additional configuration logic
    ...
}

The top part of the script defines a variable appConfig, which is a JSON map containing the configuration changes.  The remainder of the script delivers the contents of appConfig as JSON when the script is executed.


Our focus is on the contents of the appConfig map.  The map contains a general section that contains configuration that is applicable to the application as a whole.  This is distinct to individual widget configuration, which is described in the next section.


The map in this example reflects an installation process that chose assignment to technicians via the LEAD field on the work order, and assignment to supervisors using the SUPERVISOR field.


appConfig = {
  "general": {
    "assignment": {
      "technician": {
        "strategy": "LeadAssignmentStrategy"
      },
      "manager": {
        "strategy": "SupervisorAssignmentStrategy"
      }
    }
  }

Modifying the assignment strategies is covered in the KB article: Changing work assignment options.


The KB articles in the General Configuration section includes articles that further cover the general section.



Widget Configuration


Screens in Opqo are built by assembling a layout of widgets.  For example, on the work order detail screen, each tile is a separate widget.


Many of these widgets have configuration options, and these can be specified by adding a moduleconfig array to the appConfig.  The array will contain a map for each module to be configured.


For example, the following adds configuration to specify the Maximo field to store task notes (as described in the KB article Work order tasks: Adding task notes), and disables the ability for technicians to issue materials from the Materials widget (as described in the KB article Work order materials: Enabling/disabling issue):


appConfig = {
  "general": {
    "assignment": {
      "technician": {
        "strategy": "LeadAssignmentStrategy"
      },
      "manager": {
        "strategy": "SupervisorAssignmentStrategy"
      }
    },
  "moduleconfig": [
    {
      "module": "WorkDetailTasksListModule",
      "notesField": "description_longdescription"
    },
    {
      "module": "WorkDetailMaterialsTileModule",
      "allowIssue": false
    }
  ]
}


The articles in the Widget Configuration section provide details of the widget configurations that are available.



Dynamic/Programmatic Configuration


Modifying the basic STAMCONFIG script provides a way to make changes for all Opqo users, however it may be desirable to deliver different configurations to different user communities.


Custom logic can be introduced to the STAMCONFIG process by created an automation script named STAUTOSCRIPT.STAMCONFIG.EXT that contains a method with the following signature (example in the nashorn script language):


function processAppConfig(service, userInfo, appConfig) {
    // implement custom logic for creating/modifying appConfig

    // must return the desired configuration, even if it simply modifies
    // the one passed in
    return appConfig;
}


This method receives the following parameters:


Parameter
Description
service
The implicit service parameter provided to the original STAUTOSCRIPT.STAMCONFIG script
userInfo
The userInfo for the user logged into Opqo.   This information can be used to implement Maximo user/group specific Opqo configuration.
appConfig
The appConfig produced by the STAUTOSCRIPT.STAMCONFIG script.  This includes static configuration as well as any standard programmatic configuration, such as GIS configuration.



This method must return the modified configuration, even if it simply modifies the one that is passed in.



If you have questions please do not hesitate to contact us or create a support ticket for more assistance.