Maximo Open Forum

 View Only

 Select Action > Create Work Order from Asset Application

  • Maximo User Groups
Maryann Wood's profile image
Maryann Wood posted 02-09-2022 12:13
Hi All,

We are using the Select Action > Create Work Order from the Asset Application.

When creating a WO this way, you get a dialog box, populate the Description and Details > Click "OK" - then a Message "Work Order XXXXX Created".  Then you need to go to Work Order Tracking and open the WO to complete it.  

Is there a way to change this action to auto open the newly Created WO in Work Order Tracking? 

Your assistance is appreciated. 

Thank you.    ​
Jade Warren's profile image
Jade Warren
Hello Maryann!  I think I have a relatively simple solution--looks something like this:

  1. Go to the Assets application in application designer
  2. Create a new signature option ASSET_CREATE_WO - "Assets - create new work order" and be sure to check the box This is an action that must be invoked by user in the UI in the Advanced Signature Options section
  3. Open the "Create Work Order" dialog box (CREATEWO) in the application designer and change the event for the OK button from dialogok to ASSET_CREATE_WO (this will make the OK button fire an automation script)
  4. Grant security to the signature option to whatever group(s) would be invoking this functionality
  5. Go to Automation scripts > Create new automation script with ACTION launch point.  Be sure to have the script ID and action ID = ASSET_CREATE_WO 
  6. Make the CODE for the script this:
from psdi.webclient.system.controller import WebClientEvent;

## get context
session = service.webclientsession();
databean = session.getDataBean("CREATEWO");
appinstance = session.getCurrentApp();
appbean = appinstance.getAppBean();
WO = databean.getMbo(); # get the work order that exists in the dialog box
UID = WO.getUniqueIDValue(); # get the UNIQUE ID of that work order

## SAVE and move to WOTRACK
appbean.SAVE();

## Jump to WOTRACK application
newEvent = WebClientEvent("changeapp", appinstance.getId(), "wotrack", None, None, None, UID, session);
session.queueEvent(newEvent);

Cheers,

Jade