Automations with Selenium IDE

ibm_maximo_managed_service_predictive_maintenance_reliability_enhancements_it_support_configuration_maximo_as_a_service_cmms_system_patching_environment_upgrade_troubleshoot_change_management_automation_script_report_software_deployment_integration_data_loading_analysis_bug_fix_enterprise_asset

While automations themselves were developed to mitigate repetitive and time consuming tasks, ironically developing them faces the same challenges. The Selenium IDE web browser plugin, however, makes the process of developing automations significantly easier. The tool simplifies the process of automating tasks in a do it once, repeat forever format. In this fashion Selenium IDE reduces much of the stress and hassle associated with developing automations, providing a user-friendly interface for creating and executing test scripts.

Every element on a webpage has a unique identifier, which is necessary for directing mouse and keyboard events. These identifiers can range from simple, short strings to complex and lengthy strings. In the case of Maximo, the identifiers are typically the later, making manual testing and automation a challenging task. However, with the Selenium IDE, this process is streamlined and simplified.

With the Selenium IDE running, you can provide the application with a start page, such as the Maximo login screen. Then, press the record button and begin performing all the steps required to complete the desired process. The tool will capture all your actions, including mouse and keyboard events, and record them in detail with multiple identifiers for each element. The recorded actions can then be replayed either in Selenium IDE directly or you can use the easy-to-read notation to write your code.

In addition to its automation capabilities, the Selenium IDE also provides a flexible and scalable platform for writing and executing test scripts. The tool supports multiple programming languages, including Java, Python, C#, and Ruby, making it easy to integrate with other development tools and technologies. This allows developers to take advantage of the power of the Selenium IDE, even if they already have existing development tools and processes in place.

In conclusion, the Selenium IDE is a powerful and user-friendly tool that makes the process of developing automations easier, faster, and more efficient. With its ability to automate repetitive tasks, record and replay actions, and support multiple programming languages, the Selenium IDE provides a flexible and scalable platform for automating software testing and development tasks. Whether you are a software developer, tester, or other professional involved in software development, the Selenium IDE is a tool that you should consider using to streamline your work and improve your productivity.

Using a Global System Properties in an Automation Script

Maximo has a neat feature where you can set any value in the global property, and it will default to that value you have entered. In order to use a global property, you first must create one. In our example we created a global property for the person who does the PO Reorder.

After you create the global property, ensure you click on Live Refresh, so you can use the new global property created.

This is helpful because I could now use this global property in my automation script.  In order to get the global property, First must create a variable like down below. “configData = MXServer.getMXServer().getSystemProperties()”

After that create another variable and get the property you have created.

“reorderAgent = configData.getProperty(“POReorderBuyer”)”

Once you completed these steps you can now use the variable “reorderAgent” which is grabbing the system property and you could use in the automation script any where you want. In our case we are setting the “PURCHASEAGENT” to the “reorderAgent” when the po description has reorder in it.

I highly recommend using this as it is helpful because now you don’t have to create a variable with the value hardcoded. So, example if this person ever goes on vacation, we could simply just adjust the global property value and this automation script will adjust the reorderAgent based on the new person we put. Instead of going into the automation script and changing the variable that was hardcoded.

We have a culture of education and paying it forward at A3J Group. Subscribe below to be the first to get the latest releases from our knowledge bank.

A3J Group Launches New Ninja Fix Solution: Approval Summary Tab Creator

A3J Group continues to produce products that can be purchased through our Ninja Fix suite of self-service IBM Maximo configuration options. The Approval Summary Tab solution was released March of 2022 and acts as a one-stop shop for viewing specific records in IBM Maximo.

The A3J Approval Summary solution introduces a new tab, Approval Summary, to the Work Order Tracking, Purchase Requisition, Purchase Order and Invoice applications. The Approval Summary tab is designed to show both the Active Assignee, to whom the record is currently assigned, and a history of approvals. At a glance you will know immediately who is responsible for approving the record as well as where the record is at in the approval chain. Instead of having users navigate the workflow history and assignment applications to determine the approval status for a record you can simply point them to the Approval Summary tab for all the pertinent information.

The Approval Summary solution consists of a tab with two tables. The first table displays the current active assignee(s) for the record.

ibm-maximo-self-service-managed-service-configuration

This table contains the user ID and display name of the active assignee(s). In addition, a description of the assignment is included for easy reference.

The second table lists the approval history of the record. The user can see who previously approved the record, any memo that was included with approval of the record as well as some workflow details.

ibm-maximo-automation-scripts-work-order-tracking-purchase-requistion-purchase-order-invoice-application

The Approval Summary tab focuses only on workflow transactions originating from an Input node and that are either assigned or reassigned in order to reduce clutter and help the user focus solely on the assignment. Additional nodes may be included by simply updating the A3JWFTRANSACTION relationship on the parent object. You can also contact A3J Group for assistance with expanding the Approval Summary design to other use cases.

 

ibm-maximo-configuration-approval-summary-tab-record-approval-status-history-assignment

 

Learn more about the Approval Summary Tab creator and other solutions from Ninja Fix here. If the solution is a fit, purchase, download and experience immediate IBM Maximo enhancements from A3J Group today!

Automatically Email Vendor on Approval of Purchase Order in IBM Maximo

Automate emails to vendors from approved purchase orders in Maximo CMMS

This article will walk an IBM Maximo administrator through the steps necessary to send a purchase order by email to a vendor as an attachment. It is a common requirement by customers to be able to automatically send the purchase order to vendors through email. Some of the benefits of doing this are:

  • Standardize the way that approved purchase orders are communicated to vendors. A common template can be used for the email subject and body, as well as a common workflow for when the communication is sent.
  • Reduce the time taken by procurement agents in generating reports, saving them locally, finding appropriate contact information, and typing up an email.
  • When IBM Maximo sends the email, a copy of the email that was sent is stored in the Communication Log along with the purchase order. If you ever need to know when the email was sent and to whom, the documentation of the email is in IBM Maximo attached directly to the purchase order. No more searching through email to find the communication.

To achieve this, we will deploy an automation script in IBM Maximo that will generate the report and send the email. Before we get to the script, we need to ensure that the following prerequisites are met:

  1. The email address of the vendor should be recorded in the Companies application on the Contacts tab. The script below will use the email address of the Primary Contact (set on the Addresses tab) but can be adjusted to include a larger or more targeted set of email addresses. However, they must be accessible from somewhere in the system by the script.
  2. A Communication Template should be created and activated to be used as the email subject and body of the communication. By default, I’ve named the template POTOVENDOR, but you can name it anything you want and change it in the script.
  3. A BIRT report that represents the purchase order to be sent to vendors. By default, the auto script uses the poprint.rptdesign report that comes with IBM Maximo. This can be changed in the script to a custom report but be sure to match up the report parameters if necessary.

The trigger point for the script below is a status change of the purchase order to APPR. However, this could just as easily be triggered from IBM Maximo workflow, escalations, or other means.

Here is the automation script needed to make this happen:

from com.ibm.tivoli.maximo.report.birt.queue import ReportQueueService
from com.ibm.tivoli.maximo.report.birt.runtime import ReportParameterData
from psdi.mbo import SqlFormat

# Get the current user's information
userInfo = mbo.getUserInfo()
locale = userInfo.getLocale()

# If the PO Vendor does not have a contact with email, then kindly exit
if not mbo.isNull("VENDOR.PRIMARYCONTACT.EMAIL"):
    emailTo = mbo.getString("VENDOR.PRIMARYCONTACT.EMAIL")
    # Append the current user's email address to the chain to ensure delivery
    if userInfo.getEmail() and not userInfo.getEmail() == "":
        emailTo = emailTo + ", " + userInfo.getEmail()
    
    # Create default message subject and body
    # These will be replaced by a communication template if one is found by the code below
    emailSubject = "Purchase Order"
    emailComments = "Please acknowledge receipt of this Purchase Order."
    
    # Change this value to a valid Maximo Communication Template ID
    commTemplateID = "POTOVENDOR"
    
    # Get the communication template
    commTemplateClause = SqlFormat(mbo, "templateid = :1")
    commTemplateClause.setObject(1, "COMMTEMPLATE", "TEMPLATEID", commTemplateID)
    commTemplateSet = mbo.getMboSet("$potovendor", "COMMTEMPLATE", commTemplateClause.format())
    commTemplateMbo = commTemplateSet.getMbo(0)
    if commTemplateMbo:
        # Build the email subject and body from the Communication Template
        sql = SqlFormat(mbo, commTemplateMbo.getString("SUBJECT"))
        sql.setIgnoreUnresolved(True)
        emailSubject = sql.resolveContent()
        sql = SqlFormat(mbo, commTemplateMbo.getString("MESSAGE"))
        sql.setIgnoreUnresolved(True)
        emailComments = sql.resolveContent()
    
    # Build the Report Parameters
    parameterData = ReportParameterData()
    parameterData.addParameter("appname", "PO")
    parameterData.addParameter("paramdelimiter", "")
    parameterData.addParameter("paramstring", "")
    parameterData.addParameter("where", "(po.poid = " + str(mbo.getLong("POID")) + ")")
    
    # Queue the Report to Run
    queueManager = ReportQueueService.getQueueService()
    queueManager.queueReport("poprint.rptdesign", "PO", userInfo.getUserName(), emailTo, emailSubject, emailComments, parameterData, locale.getCountry(), locale.getLanguage(), locale.getVariant(), userInfo.getTimeZone().getID(), userInfo.getLangCode(), long(0), userInfo)