Preventing fields from Editing Once Record is in Workflow

Preventing fields from Editing Once Record is in Workflow

I like this problem because it involves a few components to make it work.

The business problem that is being solved here is if the user would like a field or fields to not be editable once the work order, in this case, enters workflow.  This example focuses on the WORKTYPE field, but this script could easily be expanded to include other fields.

The components you will need for a successful script are:

  • A list of fields that will be made read only once record is in workflow.
  • A list of viable statuses for the workflow to know when the records should be evaluated.
  • A SQL query to determine if record is on workflow.
  • Setting fields to be read only if evaluation is true.

Creating a list of fields to be made read only

You can create a list of fields to be read only by using an array.  Here I only have one field but using an array gives you the flexibility to quickly add additional fields.

#List of fields that will be read only
readOnlyFields = ['WORKTYPE']
#Example with additional fields
readOnlyFields = ['WORKTYPE', 'DESCRIPTION']

Obtain list of viable workflow statuses

In this scenario we care about records that are actively in workflow.  So we get a list of statuses using the workflow status domain.

# Get a list of valid workflow assignment statuses
statusList = mbo.getTranslator().toExternalList("WFASGNSTATUS", "ACTIVE")

Query to determine if record Is actively in workflow

Construct a query to determine if the record is in workflow.

# Construct a where clause to find the existing workflow assignment 
# for this work order. Ensure that one exists before proceeding. 
whereClause = SqlFormat(mbo.getUserInfo(), "ownertable = :1 and ownerid = " + woId + " and assignstatus in (" + statusList + ")")
whereClause.setObject(1, "WFASSIGNMENT", "OWNERTABLE", "WORKORDER")

Setting field(s) flag to read only

If it is determined that the record is in workflow then we set the fields listed in the array, readOnlyFields to read only.

if not wfAssignmentSet.isEmpty():
    logger.error("WF Assignments assignments for this work order")
    # Make fields read only if the work order is in workflow
 	# There will be more read only fields.  Fields can also be made
    # required using the same principle.
 	mbo.setFieldFlag(readOnlyFields, MboConstants.READONLY, True)

Steps to create automation script

Create a new automation script with Object Launch Point. We called it WOPREVEDIT in this example.

Create a launch point with Initialize Value selected.

Here is the full automation script.

#Script: WORKORDER.INIT
#Make fields read only if record is in workflow
#Launch Point: WORKORDER.INIT
#Launch Point Type: OBJECT
#Launch Point Object: WORKORDER
#Language: Python
#Author: A3J Group
  
  
from psdi.mbo import SqlFormat
from psdi.server import MXServer
from psdi.util.logging import MXLoggerFactory
from psdi.mbo import MboConstants
  
logger = MXLoggerFactory.getLogger("maximo.script.woinit")
  
# Get the associated work order
wo = mbo.getString("WONUM")
woId = mbo.getLong("WORKORDERID")
#woId = str(woId)
#woId = woId.replace(',','')
  
#Logging
logger.info("Value for woId is " + str(woId))
  
#List of fields that will be read only. Add additional fields with a comma.
readOnlyFields = ['WORKTYPE']
  
# Get a list of valid workflow assignment statuses
statusList = mbo.getTranslator().toExternalList("WFASGNSTATUS", "ACTIVE")
  
# Construct a where clause to find the existing workflow assignment 
# for this work order. Ensure that one exists before proceeding. 
whereClause = SqlFormat(mbo.getUserInfo(), "ownertable = :1 and ownerid = " + str(woId) + " and assignstatus in (" + statusList + ")")
whereClause.setObject(1, "WFASSIGNMENT", "OWNERTABLE", "WORKORDER")
  
# Get record set and filter it by the where clause
wfAssignmentSet = mbo.getMboSet("$WOAPPR", "WFASSIGNMENT", whereClause.format())
wfAssignmentSet.reset()
  
if not wfAssignmentSet.isEmpty():
 	logger.info("Found WF Assignments for this WO – settings fields readonly")
 	# Make fields read only if the work order is in workflow
 	# There will be more read only fields.  Fields can also be made
    # required using the same principle.
 	mbo.setFieldFlag(readOnlyFields, MboConstants.READONLY, True)
 	
if mbo.getThisMboSet().getParentApp() == "WOTRACK":
 	woOwner = mbo.getOwner()

 

One of our missions A3J Group is to share knowledge whenever we can. We hope this helps you in your day!

Renewing SSL Certificates for IBM WebSphere and Apache Tomcat

Renewing a certificate for IBM WebSphere or Apache Tomcat is a relatively straightforward process.  There are, however, some subtle differences between renewing and installing a fresh certificate that I would like to document here primarily so I make it easier on myself the next time I need to simply renew a certificate.  If you are looking for more advanced information please consider these articles on configuring IBM WebSphere for SSL and installing or importing certificates into a WebSphere Trust Store.

If an IBM WebSphere or Apache Tomcat application server is nearing the validation end of their SSL certificates you can follow these steps to ensure that your servers remain secure and your user’s experiences are not interrupted.

IBM WebSphere

Step 1: Backup the existing certificate in case you need to revert.

  • Connect to the server where IBM WebSphere HTTP Server is installed. Navigate to the folder [IBM_HTTPServer_Home]\.
  • Backup or move the existing SSL certificate to an expired_certs folder Ex: C:\IBM\HTTPServer

renewing_ssl_certificate_websphere_apache_tomcat_ibm_maximo_update_ugrade_support_blog_help_tip_troubleshoot

Step 2: Copy the new certificate to IBM WebSphere HTTP Server home folder.

  • Copy the new Maximo SSL certificate to the [IBM_HTTPServer_Home]\ folder. If you need help requesting a new certificate, please refer to our article configuring IBM WebSphere for SSL.

Step 3: Launch IBM Key Management application to import new certificate

  • Launch the IBM Key Management application.
  • Click Export/Import button from the right-side button menu.
  • Select the Import Key radio button.
  • Change the Key file type to PKCS S12 using the drop-down menu.
  • Browser to the file name of the certificate that was copied in Step 3

ibm_maximo_blog_updating_ssl_certificate_websphere_server_security_renew_maximosecrets

  • Click the OK button. Supply the password associated with this certificate.

ibm_maximo_blog_renew_ssl_certificate_security_update_credentials_managed_service_self_help_how to

  • Click the OK button.
  • Select the label under Select a label to change. In the Enter a new label textbox provide a new label for this certificate.

  • Click the OK button.
  • Double-click the certificate that was just added with the new label.

ibm_maximo_blog_supprt_troubleshoot_fix_security_renew_ssl_certificate_update_websphere_apache_tomcat

  • Click the Set the certificate as the default checkbox at the bottom left.

ibm_maximo_blog_validation_of_ssl_certificate_update_websphere_apache_tomcat_troubleshoot_security

  • Click the OK button.
  • The certificate that was just added with the new label should now have an * next to its name.

ibm_maximo_websphere_update_apache_tomcat_renew_ssl_certificate_blog_troubleshoot_support

  • Click the OK button.
  • The certificate that was just added with the new label should now have an * next to its name.

 

Apache Tomcat

Step 1: Backup the existing certificate in case you need to revert.

  • Connect to the server where Apache Tomcat server is installed. Navigate to the folder [Apache_Tomcat_Home]\conf. Ex: C:\Apache\Tomcat\conf
  • Backup or move the existing SSL certificate to a certs folder.
  • Open the server xml file using a text editor.

ibm_maximo_suppprt_renew_new_ssl_cerificate_server_security_validation_websphere_apache_tomcat_blog

 

Step 2: Edit the server.xml file.

  • Locate the section <Connector port=”443” scheme=”https” . Change the name of the certificate if necessary.  Update the keystorePass value to the new password for the certificate.
  • NOTE: This is an XML document. Consequently, any ampersand or quote characters will need to be replaced.  For example, if your password is 1234”& then the value for keystorePass would be keystorePass=”1234&quot;&amp;”

How_to_renew_ssl_certificate_websphere_apache_tomcat_ibm_maximo

  • Save the server xml document and restart the Apache Tomcat service.

MxMobile Update September 2022 Release

A3J Group is #AlwaysInnovating in order to bring state-of-the-art enhancements to the IBM Maximo community. Our 20+ years of experience in Maximo allows us to deliver end users the proper support and solutions needed to maximize efficiency. We strive to remain thought leaders in the community and we face common issues and challenges head-on. Our suite of mobile apps for IBM Maximo, MxMobile, gives users access to IBM Maximo in the palm of their hand. Our apps allow Maximo users the ability to create and edit work orders, generate meter readings, manage inventory, and more.

As an IBM Maximo mobile solution provider, A3J Group consistently improves the functionality and features of MxMobile. Enriching the experience of MxMobile users is not only our passion, but necessary. Our users enjoy the freedom of Maximo mobility and are happy to report bugs and request interface features, and our team actively delivers on those requests. You can download MxMobile apps from the Apple App or Google Play store.

A3J Group is happy to announce the latest MxMobile news below. The releases will be available on Monday, September 5, 2022.

Policy Update

We have a new MxMobile support ticket policy! Going forward we ask that all MxMobile support tickets be submitted the following way: 

By doing this we hope to expedite support issues and requests providing the highest level of customer satisfaction. As always, you can also email support@a3jgroup.com or call 877-235-4774 ext 1 with any questions regarding the new process. 

September Release Updates

MxApprove 

  • Push notifications are enabled in MxApprove, allowing proactive notifications when a new workflow assignment is received.
    • Please note this requires some Maximo components, such as an automation script, to be installed. The solution also comes with minor additional cost.
  • MxApprove is now available within the MxMobile app
  • General bug fixes and performance improvements

MxAsset 

  • Filter for historical work orders
  • Create a new asset
  • General bug fixes and performance improvements

MxWork 

  • Ability to create meter readings from a work order
  • Bug fix for Dark Mode on Android
  • General bug fixes and performance improvements

MxTicket 

  • New app available within MxMobile
  • This is a ticket management app for interacting with Service Requests and other ticket types

MxCount

  • General bug fixes and performance improvements

What do you need to do?

  • Updates are available to current clients automatically by updating your apps via the appropriate app store.  
  • If you would like to request a new feature or report a bug, please follow our new support ticket guidelines by submitting a video and a support form describing the request. 

We hope that you enjoy the new updates of A3J Group’s MxMobile suite of IBM Maximo mobile apps. If you have any suggestions, feature requests or need to report a bug, please contact support@a3jgroup.com. If you would like to be notified via email when A3J Group posts a new blog sign up in the form below.

MxMobile Update April 2022 Release

A3J Group is #AlwaysInnovating in order to bring state-of-the-art enhancements to the IBM Maximo community. Our 20+ years of experience in Maximo allows us to deliver end users the proper support and solutions needed to maximize efficiency. We strive to remain thought leaders in the community and we face common issues and challenges head-on. Our suite of mobile apps for IBM Maximo, MxMobile, gives users access to IBM Maximo from their mobile device. Our apps allow Maximo users the ability to create and edit work orders, generate meter readings, manage inventory and more.

As an IBM Maximo mobile solution provider, A3J Group consistently improves the functionality and features of MxMobile. Enriching the experience of MxMobile users is not only our passion, but necessary. Our users enjoy the freedom of Maximo mobility and are happy to report bugs and request interface features, and our team actively delivers on those requests. You can download MxMobile apps from the Apple App or Google Play store and enjoy a 30-day trial.

Here are the improvements that the A3J Group developers have made to MxMobile as of Monday, April 4, 2022:

 MxReceive:

  • Print labels online or offline via a Bluetooth connected printer! Stay tuned for a video demonstration from the team…

MxWork:

  • Show data from the multiple assets, locations and CIs table on the work order.
  • Better handling of session token expiration.
  • Additional data type of duration has been added.
    • Users can now enter hours as 2.5 or 2:30

MxAsset:

  • Barcode scanning capability has been enhanced to support Bluetooth scanning devices
  • Bug Fixed – When entering a meter reading value of 0 it was not working properly. This has been fixed.
  • Additional API Key support added

MxCount:

  • Barcode scanning capability enhanced to support Bluetooth scanning devices

What do you need to do for this update?

  • If the MxMobile applications on your devices are set to auto update no action is needed.
  • If the MxMobile applications on your devices are set to update manually you can find the updates in the App Store or Play Store to download.

We hope that you enjoy the new updates of A3J Group’s MxMobile suite of IBM Maximo mobile apps. If you have any suggestions, feature requests or need to report a bug, please contact support@a3jgroup.com. If you would like to be notified via email when A3J Group posts a new blog sign up in the form below.

Log4J Security Vulnerability System Patching for WebSphere

At the end of 2021, many companies were faced with the log4j security vulnerabilities. This was a worldwide security that has caused a lot of problems. For users of IBM Maximo, their Maximo environments were not affected, however WebSphere was impacted. The vulnerability caused Apache Log4j to allow a remote attacker to execute arbitrary code on the system. If an attacker were to access the system they would be able to write access to the Log4j configuration and de-serialize untrusted data. If the deployed application is configured to use JMSAppender, an attacker could exploit this vulnerability to execute arbitrary code on the system. IBM has released a fixed for this issue in which the update removes the Apache Log4j from Admin Console and UDDI Registry application. The Log4j security vulnerability is resolved by upgrading WebSphere to 9.0.5.10 or newer versions. If you are running on any 8.0 version of WebSphere then upgrading to 8.5.5.20 or newer version will remedy the issue as well.

 

How to update WebSphere to the current version.

  1. Log into Maximo and go to System Information. Observe the WebSphere version.

ibm maximo system information websphere log4j security vulnerability blog

  1. Next, open the Services application and stop the following WebSphere services: IBM HTTP Server V9.0, IBM WebSphere Application Server V9.0-ctgCellManager01, IBM WebSphere Application Server V9.0-ctgNode01.

ibm maximo security patch log4j update fix

  1. Open the application, “IBM Installation Manager”.

a3j group troubleshooting ibm maximo blog log4j issue update

  1. After IBM Installation Manager opens, Click on “Update”

ibm installation manager update ibm maximo websphere log4j issue

5. Observe to see all of the packages that are available for an update. Click on the checkbox, “Update all packages with recommended updates and recommended fixes”

troubleshoot ibm maximo update websphere log4j issue a3j group

6. Log into your IBM account to download the recommended updates and fixes, then click “Next” after it finishes searching for the updates.

a3j group blog ibm maximo issue fix log4j websphere update

7. Accept the terms in the license agreements to proceed with the update.

ibm maximo patch log4j issue websphere update system

  1. In this view you can observe all of the updates that are going to occur before you click on the “Update” button. Then, click on Update.

a3j group blog patch ibm maximo log4j security vulnerability websphere update

  1. At this point, we have successfully updated WebSphere with all the recommended fixes and updates. Click “Finish”

ibm maximo blog a3j group websphere fix log4j security update

  1. Open the Services application, Start WebSphere back up by starting the following services: IBM HTTP Server V9.0, IBM WebSphere Application Server V9.0-ctgCellManager01, IBM WebSphere Application Server V9.0-ctgNode01.

security patch ibm maximo websphere integration log4j update a3j group blog

  1. Log into Maximo and go to System Information. Observe the new WebSphere version.

ibm maximo websphere integration security patch log4j issue blog update a3j group

Once, you have confirmed that your WebSphere system has been updated, you can rest assured that your Log4J security vulnerability has been remedied. As humans become more involved with technology and dependent on systems to run daily business operations, it is increasingly important to stay mindful of these types of breach opportunities. Emphasizing monitoring and remaining informed on the latest security vulnerabilities is imperative if you want your systems to remain impenetrable. Hopefully, this guide served you well in patching the Log4J security vulnerability! If you would like to receive an email when we post a new blog, subscribe below.

 

 

 

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!

MxMobile: Using Saved Queries with A3J Group’s Mobile Apps for IBM Maximo

As we all know, saved queries can make our workload much easier to manage when you’re having to sort through hundreds of records in Maximo.  However, have you ever created a saved query in Maximo and you weren’t able to find that query on one of A3J Group’s mobile apps?  You’re not alone, it’s happened to me too and the solution is very simple to follow.

 

For this example, I will use MxWork as the mobile app. In Maximo, I created a query on the Work Order Tracking application called “Environmental Group WOs” that displays all of the work orders with a person group of “ENV” and with a status of “APPR” and “INPRG”.

 

saved queries MxMobile IBM Maximo Mobile App

 

When I save this query and log into the MxWork mobile application and navigate to the Saved Queries list, I won’t see this query.  Why is that?  Well, the saved query has to be available in the API in order to access it from the mobile apps.  So, with the addition of Query Definitions in Maximo 7.6.0.3, we can select the query in the Object Structure for that specific application which will then allow the query to be accessible from the API.

 

If you open the details of the Object Structure, in this example we’re looking at MXWODETAIL, you’ll see Query Definitions listed under More Actions.  This is where you will add your query.  If you do not see your query in the lookup, you may need to make your query public by accessing View/Manage Queries and checking the box underneath Public.  Below are the three fields that are required:

  • Query Type: appclause
  • App Name: WOTRACK
  • Query Clause Name: Environmental Group WOs

asset management saved queries MxMobile IBM Maximo Mobile App

 

After I click OK and reload the Saved Queries list in MxWork, I now see the Environmental Group WOs query.  What’s also great about this solution is that the same process applies to all of A3J Group’s mobile apps!

using saved queries MxMobile IBM Maximo Mobile App

Maximo Mobile App saved queries used in MxMobile A3J Group asset management

A3J Group Launches Ninja Fix

Ninja Fix is a suite of useful Maximo solutions that tackle the everyday needs of Maximo users. The efficiency and effectiveness of these solutions give way to the name, “Ninja Fix.”

Continue reading

MBOs in Automation Scripts: Changing Status

In our previous posts in this series, we talked about how an MboSet is a collection of Mbo objects. This is analogous to a spreadsheet of data representing an MboSet, and a single row within that spreadsheet representing an Mbo. This article will discuss how to change the status of an Mbo that is stateful.

There are a number of objects that are able to perform status changes. These status changes control the flow of the object through a lifecycle or business process. For example, a work order flows from Waiting Approval to Approved to In Progress to Completed to Closed. Each one on these stages is a status in the application’s terms. As a result of transitioning from one status to another, certain business rules may be invoked that update other parts of the system. As an example, when a work order is approved, all parts required for that work order are reserved in Inventory.

Objects that have the ability to change state implement the StatefulMboRemote interface.

To change the status of an object, the changeStatus() method is called through the Mbo. For example:

# Change the status as of the given date
 
from psdi.server import MXServer
 
mbo.changeStatus("APPR", MXServer.getMXServer().getDate(), "A reason or memo")

The MXServer.getMXServer().getDate() variable in the changeStatus() call above is a Java Date and represents the date at which the newly set status is to take effect. The third argument is a string variable which allows the user to include a short note about this particular status change. The memo argument is optional – a null value may be passed. If an error occurs at any point, an MXException is thrown.

The caller does not need to understand what business rules are invoked within the object – the goal is to hide such details and make it easy to perform the status change operation.

Depending on the business rules coded into the object, it may not be possible to perform certain status changes. For example, it is not possible to move from CLOSE to WAPPR.

A list of available statuses for an object can be retrieved by calling the getStatusList() method.

Editing Font Sizes in IBM Maximo – Long Description and Log Defaults

How to change the Long Description and Log Default font sizes for all apps in IBM Maximo:

If you’re like me, you might not have the greatest eyesight in the world. Logs and long descriptions in IBM Maximo are a very useful way to let your co-workers know:

  1. What’s going on with a particular Work Order
  2. Asset, Purchase Order, Item or any of the various applications that would need more description, or a log information put onto it.

IBM Maximo defaults the size for the Long Descriptions and Logs to xx-small type. It’s great for fitting a lot more on a little page. However, it’s very hard to read and for the majority of the world’s population, we need glasses to do so. This begs the question, “Can I customize my Maximo user interface to improve these issues?” The Short

 

How do we go about making the font size larger?

Open the Long Description or Log. From the middle drop-down column (size) you can choose your font size.

The catch…

You must go into system properties and make a change to the global property (webcient.richtext.blocknode.)

If you do not take the step above, each carriage return (geek speak for hitting enter) makes the font size small again. Every subsequent Log or Description that you edit will also need to be changed when you open it to edit.

Is there a way to just have the font size bigger than xx-small in when you open any new or old log or long description in IBM Maximo?

The answer is yes, but you’ll have to roll your sleeves up and do a little bit of work to make it so.

Font sizes in IBM Maximo’s Long Descriptions and Logs revolve around the rich text editor. The rich text editor does not allow for sizing fonts easily. With some determination, you can get those fonts changed into something you won’t have to strain your eyes to read. If you want to make those Long Descriptions and Logs readable then you’re going to have to edit some CSS (cascading style sheets) files. CSS allows for bulk “styles” to re-occur across the website that they are applied to. IBM Maximo is a web application, so this is where we start.

Here’s how…

Buried in the IBM Maximo directories are files that make Maximo work. The ear file will be our focus, but there are others that also assist in Maximo’s functionality. On the application server (the machine that hosts IBM Maximo), you will have a directory that gets installed that contains the CSS information to display Maximo. Navigate to [maximo-folder]\applications\maximo\maximouiweb\webmodule\webclient\css and search for the ‘extended.css’ file. Open it and add the following lines of code to the end of the page.

#dijitEditorBody {

Font-size: 20px

}

 

The second location of an extended.css file that needs to be edited is in the following path, [maximo-folder]\applications\maximo\maximouiweb\webmodule\webclient\skins\iot18\css.

For the latest versions of IBM Maximo (7.6+), the iot18 folder is significant. The reason for this is, other articles mention to add the edited extended.css file to a folder called tivoli09. To save time, understand that the Tivoli directories were made for older versions of Maximo like 7.5 and prior. If you are using a newer version of Maximo look for the iot18 directory. You will edit this extended.css file in the same manner as the last one by adding the lines below to the end of the css file:

#dijitEditorBody {

Font-size: 20px

}

Next, you will need to rebuild the ear file for IBM Maximo and re-deploy it to your Maximo user interface. The 20px setting will default the text to medium in the logs and Long Descriptions.

Originally there were some hesitations on using CSS to fix this problem. It was thought that the change could affect the reports and the way they looked when generated. We have not seen that happen after making these changes.

We want to hear your thoughts about our helpful guide. Please comment below or send your inquiries to:

info@a3jgroup.com

Stay tuned for more helpful articles that will #MaximizeYourMaximo experience and the capabilities of your user interface!