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
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Phased Migration Strategy for Zero Downtime in Systems
  • Launching Pega Web Mashup Forms on a Secure Static Website With AWS S3
  • Deploying Databricks Asset Bundles
  • Exploring Deployment Options in Mule 4

Trending

  • 5 Subtle Indicators Your Development Environment Is Under Siege
  • A Developer's Guide to Mastering Agentic AI: From Theory to Practice
  • How to Convert XLS to XLSX in Java
  • Measuring the Impact of AI on Software Engineering Productivity
  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.4K 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

  • Phased Migration Strategy for Zero Downtime in Systems
  • Launching Pega Web Mashup Forms on a Secure Static Website With AWS S3
  • Deploying Databricks Asset Bundles
  • Exploring Deployment Options in Mule 4

Partner Resources

×

Comments
Oops! Something Went Wrong

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!