Opqo 23.09.0 adds the ability to add configuration for optional/mandatory conditions that must be satisfied in order to complete a work order.


Available conditions include:

  • Completing all tasks
  • Completing all child work orders
  • Completing all inspections
  • Adding a labor entry for the current user
  • Adding a work log for the current user


To change the available count types, add a configuration map to the moduleconfig section of the STAUTOSCRIPT.STAMCONFIG automation script with the following properties:


Property NameValue
moduleWorkDetailStatusChangeRulesModule
statusRulesA list of status rule configuration maps specifying the statuses and rules that are to be applied



Default Configuration


The default configuration includes the following warning conditions when attempting to change the work order to a status with an internal value of "COMP":

  • All tasks should be completed
  • All child work orders should be completed
  • All inspections should be completed


As these are warning conditions, they are displayed to the user, however they do not prevent the user from continuing to complete the work order.


The default configuration is as follows:


appConfig = {
  ...
  "moduleconfig": [
    ...
    {
      "module": "WorkDetailStatusChangeRulesModule",
      "statusRules": [
        {
          "toMaxStatuses": ["COMP"],
          "ruleModules": [
            {
              "module": "WorkDetailStatusRuleTasksComplete",
              "type": "warning"
            },
            {
              "module": "WorkDetailStatusRuleChildrenComplete",
              "type": "warning"
            },
            {
              "module": "WorkDetailStatusRuleInspectionsComplete",
              "type": "warning"
            }
          ]
        }
      ]
    }
  ]
}



Status Rules Configuration


The statusRules property contains a list of configuration maps, each containing the rules for a defined status change.


Each configuration map can contain the following properties:



Property NameValue
toMaxStatusesA list of Maximo internal statuses, matched against the destination status.  Optional.
toStatusesA list of Maximo statuses, matched against the destination status.  Optional.
fromMaxStatusesA list of Maximo internal statuses, matched against the current internal status of the work order.  Optional.
fromStatusesA list of Maximo statuses, matched against the current status of the work order.  Optional.
ruleModulesA list of status rule module configuration maps, identifying the rule modules to apply to the status change.



When a user selects to change a work order status, the rules to apply are identified by finding the status rule configurations that match, based on the "to" and "from" status lists.


  • "MaxStatuses" and "Statuses" are combined in an OR fashion
  • "to" and "from" are combined in an AND fashion
  • If a rule configuration does not contain any "to" or "from" status lists, it will apply to all status changes.


For example, if a work order is in INPRG status and the user is attempting to change to COMP status, it will match rule configuration where BOTH the following are true:


  • toStatuses contains "COMP" OR toMaxStatuses contains "COMP" OR toStatuses and toMaxStatuses are not defined
  • fromStatuses contains "INPRG" OR fromMaxStatuses contains "INPRG" OR fromStatuses and fromMaxStatuses are not defined



Status Rule Modules


The following status rule modules are available for inclusion. 


WorkDetailStatusRuleTasksComplete


If a work order contains tasks, checks whether all tasks are complete.  "Complete" in this context means the user has selected one of the available task completion options.


The configuration map for this rule module contains the following properties:


Property NameValue
moduleWorkDetailStatusRuleTasksComplete
typeOne of the following:
  • warning: A warning message will be shown to the user, but the user may continue with the status change
  • error: An error message will be shown to the user, and the user cannot continue with the status change



WorkDetailStatusRuleChildrenComplete


If a work order contains child work orders, checks whether all child work orders are complete.  


The configuration map for this rule module contains the following properties:


Property NameValue
moduleWorkDetailStatusRuleChildrenComplete
typeOne of the following:
  • warning: A warning message will be shown to the user, but the user may continue with the status change
  • error: An error message will be shown to the user, and the user cannot continue with the status change



WorkDetailStatusRuleInspectionsComplete


If a work order contains inspections, checks whether all inspections are complete.  


The configuration map for this rule module contains the following properties:


Property NameValue
moduleWorkDetailStatusRuleInspectionsComplete
typeOne of the following:
  • warning: A warning message will be shown to the user, but the user may continue with the status change
  • error: An error message will be shown to the user, and the user cannot continue with the status change



WorkDetailStatusRuleTimeEntryByUser


Checks whether the work order contains a labor time entry for the current user.  


The configuration map for this rule module contains the following properties:


Property NameValue
moduleWorkDetailStatusRuleTimeEntryByUser
typeOne of the following:
  • warning: A warning message will be shown to the user, but the user may continue with the status change
  • error: An error message will be shown to the user, and the user cannot continue with the status change



WorkDetailStatusRuleWorkLogByUser


Checks whether the work order contains a work log entered by the current user.  


The configuration map for this rule module contains the following properties:


Property NameValue
moduleWorkDetailStatusRuleWorkLogByUser
typeOne of the following:
  • warning: A warning message will be shown to the user, but the user may continue with the status change
  • error: An error message will be shown to the user, and the user cannot continue with the status change





If there is a status rule that you would like to use that is not currently available, please do not hesitate to contact us or create a support ticket for more assistance.




Note: For more information on Opqo configuration and the role and contents of the STAUTOSCRIPT.STAMCONFIG script, see the Configuration Overview article.



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