Prevent completion / closure of work orders with open labor transactions

Dominic (madd0g17 in our forum) has posted a great example of how he achieved this using an automation script. It is loosely based on this article. Here are the steps:

Thanks Dominic!!


Automation Script

Launch Point: WOLAUNCH
Object Event Condition: :status IN (SELECT value FROM synonymdomain WHERE domainid=’WOSTATUS’ AND maxvalue IN (‘COMP’,’CLOSE’))
Active: (checked)
Events: Add (checked), Update (checked)

Description: Prevent comp/close of WOs with open LT
Script Language: jython
Log Level: Error

Variable: var_openlt
Description: input array variable to hold open labor transactions
Variable Type: IN
Binding Type: ATTRIBUTE
Launch Point Attribute: LABTRANS[finishdate IS NULL OR finishtime IS NULL].LABTRANSID* (Note: The asterisk at the end is important!)
Override?: (checked)

Source Code:

if var_openlt is not None and len(var_openlt) > 0:

errorgroup = ‘wo’
errorkey = ‘openltexists’

Then in Database Configuration, I created a message (from Select Action->Messages menu) like:

Message Group: wo
Message Key: openltexists
Display Method: MSGBOX
Message ID: BMXZZ0001E (Customer Customization)
Display ID: (checked)
Value: Work Order cannot be completed or closed while labor transactions are still open.

Just make sure your Automation Script is set to Active and you’re good to go! It even works via the mobile application we built so if a user tries to complete/close a work order in our app, it will respond with an error message instead.

Series NavigationYour first Automation Script in Maximo 7.5 >

Did You Know...

As Maximo Experts, we have developed several add-on products for Maximo that mobilize the work force, simplifies assignments, provides ad-hoc reporting capabilities and facilitates the seamless integration of Service Requests into Maximo.

Check out our products by clicking on the following links: EZMaxMobile, EZMaxPlanner and EZMaxRequest.

Find Out More

Leave a Reply