DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • The Airlock Pattern: A Mathematician's Secret to Preventing Cascade Failures
  • How AI-Driven Software Automation Reduced Deployment Failures by 40%?
  • Deployment Strategies for Self-Hosted Open-Source Applications: Balancing Efficiency and Control
  • The "Unified Manifest" Pattern: Automating Blue-Green Deployments on Kubernetes

Trending

  • S3 Vectors: How to Build a RAG Without a Vector Database
  • The ORM Is Over: AI-Written SQL Is the New Data Access Layer
  • Introduction to Tactical DDD With Java: Steps to Build Semantic Code
  • Smart Deployment Strategies for Modern Applications
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How to Change Status of Work Orders in Maximo Using MBOs

How to Change Status of Work Orders in Maximo Using MBOs

Want to learn more about how to change the status of a work order in Maximo? Check out this tutorial demonstrating how to change its status using MBOs.

By 
Kayleigh Davis user avatar
Kayleigh Davis
·
Aug. 09, 18 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
15.9K Views

Join the DZone community and get the full member experience.

Join For Free

The process of changing work orders status in Maximo involves writing your code and packaging it in a WAR file and then placing that WAR file in the MAXIMO.ear and redeployment of Maximo Asset Management System on BEA Weblogic Server.

Writing Code and Creating a WAR File

Before writing the code, you will need to include the library BusinessObjects.jar  in your project. This jar file is available in Maximo installation folder. Now, we can import the required packages. 

List of the importrequired packages mentioned below:

import psdi.server.MXServer;
import psdi.security.UserInfo;
import psdi.app.workorder.WOSet;
import psdi.app.workorder.WO;


Get an instance of the MXServer class:

MXServer mxServer = MXServer.getMXServer();            
Get UserInfo of any authorized Maximo user
UserInfo userInfo = mxServer.getUserInfo("maxadmin");


Next, you will need to get the WOSet object by passing UserInfoas the parameter. If we pass the userInfo here, some of the users lacking required privileges that returned WOSet will be empty.

WOSet woSet = (WOSet)mxServer.getMboSet("WORKORDER", userInfo);                                                         
Set your where clause for filtering records in woSet
woSet.setUserWhere("WONUM = '1045' ");
Get first WO object from WOSet
WO wo = (WO)woSet.getMbo(0); 


Next, you will need to initialize the variable with the desired work order status

String desiredStatus = "COMP";


Now, you will need to initialize the memo variable, which can be used for adding comments, like the reasons or details of changing the status.

String memo = "";


This method changes the Work Oder status by updating rows in the MAXIMO tables WORKORDER , WOSTATUS , etc.

wo.changeMaxStatus(desiredStatus, mxServer.getDate(), memo);


Next, you will need to ask Maximo to persist your changes:

 woSet.save();


Now, close WOSet  so that memory resources are freed:

woSet.close();


Deploying Your WAR File

When deploying your WAR file, you must place it in the MAXIMO.ear file. To do that, you will extract the MAXIMO.ear file and copy your WAR file in the root directory. You also need to make changes in the application.xml file in the MAXIMO.ear located at MAXIMO.ear\META-INF .

Right above <!-- List of EJB modules --> line in the application.xml,  insert the description of your web module as the following:

<module id="WebModule_SomeUniqueNumbericID">
       <web>
                <web-uri>YourWar.war</web-uri>
                <context-root>/YourWebModuleName</context-root>
       </web>
</module>


After making these changes, you will recreate the MAXIMO.ear file and redeploy it on BEA Weblogic server. These are the methods that we can follow to change the status of the work orders in Maximo using MBOs. 

Conclusion

We can change the status of work orders in Maximo using MBOs by, firstly, writing the code and creating the war file in Maximo.ear. Then, we can employ the Maximo Asset Management System on the BEA Weblogic Server. This is the best solution to solving this problem.

WAR (file format) Pass (software) Software deployment

Published at DZone with permission of Kayleigh Davis. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Airlock Pattern: A Mathematician's Secret to Preventing Cascade Failures
  • How AI-Driven Software Automation Reduced Deployment Failures by 40%?
  • Deployment Strategies for Self-Hosted Open-Source Applications: Balancing Efficiency and Control
  • The "Unified Manifest" Pattern: Automating Blue-Green Deployments on Kubernetes

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook