Enabling the Timer Servlet

You can configure Quality-based Document Control to send notifications when periodic reviews are pending or overdue using the timer servlet. The timer servlet is also used to promote documents on the effective date. You need to configure the timer servlet to automate this process.

The timer servlet is installed with the Collaboration Server but is commented out. Follow these steps to add this code to the servlet and its parameters, and to add the parameters for specific types of timed actions. If you do not want to enable a specific timed action, do not enter the code listed in that step.

You must also add MX_SMTP_HOST=MAILNAME to the enovia.ini file as described in 3DSpace Simplified Installation: Installing 3DSpace.

  1. Open the web.xml file located in the warutil directory.
  2. To enable the servlet, add this code to the following lines by removing the <!-- and --> from the beginning and end. If these lines are not in the file, add them.

    <servlet id="Servlet_19">
    <servlet-name>TimerServlet</servlet-name>
    <servlet-class>com.matrixone.servlet.TimerServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping id="ServletMapping_16">
    <servlet-name>TimerServlet</servlet-name>
    <url-pattern>/servlet/timer/*</url-pattern>
    </servlet-mapping>
    <context-param id="ContextParam_14">
    <param-name>ematrix.timer.agent</param-name>
    <param-value>creator</param-value>
    </context-param>
    
    <context-param id="ContextParam_15">
    <param-name>ematrix.timer.agent.key</param-name>
    <param-value></param-value>
    </context-param>
    
    Note: If you had to enter the lines manually, make sure there is not already a servlet id="Servlet_19", servlet id="ServletMapping_16", or "ContextParam_n" in the web.xml file. If there are, use the next number available for each ID. These numbers are simply identifiers, so it does not matter what they are, but they cannot be duplicated in the file. The same rule applies for ContextParam IDs in the rest of this procedure.

  3. Enter username, password, and timer interval values between the corresponding <param-value> and </param-value> tags.

    For ematrix.timer.agent, enter the username the servlet should use to set context in MQL. This should be a creator who has privileges to run the program.

    For ematrix.timer.agent.key, enter the password for the username, if there is any. For the creator user, for example, there is no password.

  4. To enable notifications to users when a periodic review is pending, add this code to the web.xml file:

    <context-param id="ContextParam_16">
    <param-name>ematrix.timer.interval1</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_17">
    <param-name>ematrix.timer.command1</param-name>
    <param-value> execute program ENOPeriodicReviewUI -method sendNotifications pending</param-value>
    </context-param>

    The interval value is in seconds. The 1 in the parameter names for interval1 and command1 ties the interval and command together. The web.xml file could contain multiple ematrix.timer.interval and ematrix.timer.command parameters. If these parameter values already exist, use the next available integer.

  5. To enable notifications to users when a periodic review is overdue, add this code to the web.xml file:

    <context-param id="ContextParam_18">
    <param-name>ematrix.timer.interval2</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_19">
    <param-name>ematrix.timer.command2</param-name>
    <param-value> execute program ENOPeriodicReviewUI -method sendNotifications overdue</param-value>
    </context-param>

    As above, the 2 in the parameter names for interval2 and command2 ties the interval and command together. Use the next available integer for these parameter names.

  6. To enable autopromote of documents on the effective date, add this code to the web.xml file:

    <context-param id="ContextParam_20">
    <param-name>ematrix.timer.interval3</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_21">
    <param-name>ematrix.timer.command3</param-name>
    <param-value> execute program ENODCLAdminActions -method completeChangeAction</param-value>
    </context-param>
    As above, the 3 in the parameter names for interval3 and command3 ties the interval and command together. Use the next available integer for these parameter names.

  7. To enable notification spooling, add this code to the web.xml file:

    <context-param id="ContextParam_22">
    <param-name>ematrix.timer.interval4</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_23">
    <param-name>ematrix.timer.command4</param-name>
    <param-value> execute program emxSpool -method processSpool Daily</param-value>
    </context-param>

    As above, the 4 in the parameter names for interval4 and command4 ties the interval and command together. Use the next available integer for these parameter names.

    For notification spooling, you also must run the Activate_Spooling.mql script. See Activating Spooling for Notifications.

  8. To enable notifications to users when training is due, add this code to the web.xml file:

    <context-param id="ContextParam_24">
    <param-name>ematrix.timer.interval5</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_25">
    <param-name>ematrix.timer.command5</param-name>
    <param-value> execute program ENODOCOTraineeUI -method sendNotificationForTrainingDocuments</param-value>
    </context-param>

    As above, the 5 in the parameter names for interval5 and command5 ties the interval and command together. Use the next available integer for these parameter names.

  9. To enable notifications to users who need to implement documents, add this code to the web.xml file:

    <context-param id="ContextParam_26">
    <param-name>ematrix.timer.interval6</param-name>
    <param-value>86400</param-value>
    </context-param>
    
    <context-param id="ContextParam_27">
    <param-name>ematrix.timer.command6</param-name>
    <param-value> execute program ENODCLEffectivityUIBase  -method sendNotificationBasedOnEffectivity</param-value>
    </context-param>

    As above, the 6 in the parameter names for interval6 and command6 ties the interval and command together. Use the next available integer for these parameter names.

  10. Save the web.xml file.
  11. Run the warutil to create the archive files that include the updated web.xml file.
  12. Copy the ematrix folder from distrib to the Application folder.