Hi All,
I want to evaluate the work order total cost (here total means for all child WOs).
I can see this information in Main WO->More Actions->View ->Cost.
This comes from WOGRANDTOTAL which is non persistent object.
So, the attribute Total is ALN value and not AMOUNT/INTEGER.
I want to evaluate this total cost (planned - labor,material,services,tool) for the whole WO hierarchy, and based on some conditions, I must send the Main WO to different people/roles for approval, hence I am trying to use workflow here.
I am not sure whether we can use non persistent objects in Workflow. I tried in condition node, but it always evaluates to false irrespective of total cost.
Also INTEGER(:WOGRANDTOTAL.TOTAL) is not working.
Please let me know how to achieve this.
Regards,
SV Aparna
IBM | Maximo Consultant |
Bangalore
+91 - 9972016373
IBM Holiday:
01 May 2023
Upcoming OOO :
02 May 2023 - 5 May 2023
Original Message:
Sent: 4/14/2023 3:32:00 PM
From: Subhransu Sekhar Sahoo
Subject: RE: Attribute Launch Point for WOCHANGESTATUS Object (Run action event)
Hi Nivethitha,
To call the script for the last option (Close Workorder" option for multiple WO from list tab), you need to change your launch point event to "Initialize value" instead of "Run Action" as Close status value has been already defaulted/initialized when you opened the "Close Workorder" dialog box, so there is no event changes in the WOCHANGESTATUS.STATUS field and as a result the script didn't fire.
In other cases, you are setting the the status value manually un the dialog box and causing an event to call the script.
Now the catch is how did it work for the second option ("Close Workorder" option for single WO)?
It did worked for the second option as the MBO(i.e WO here) inherits the StatefulMbo class which has the ChangeStatus method. But once you select multiple WO records in list tab, it becomes an MboSet(i.e WOSet) and unfortunately the MboSet neither inherit the StatefulMbo Class nor it overrides the ChangesStatus method, so the same code didn't work when you select the record from list tab and tried to close them through the Close Workorder More action menu. Hope this clears everything now.
Please test that with initialize value attribute launch point and let me know how it goes.
-----------------------------
Subhransu Sekhar Sahoo
------------------------------
Original Message:
Sent: Thu April 13, 2023 08:39 AM
From: Nivethitha S
Subject: Attribute Launch Point for WOCHANGESTATUS Object (Run action event)
Hi Yalcin Kumbasar,
Thank you for your reply!
We were selected around 10 open records in the list tab of workorder tracking application, then selecting the 'Close Work order' option from select action.
At that point, Automation script is not triggers to show warning message dialog box. Could you please suggest.
Thanks in Advance!
------------------------------
Nivethitha S
Original Message:
Sent: Wed April 12, 2023 10:17 AM
From: YALCIN KUMBASAR
Subject: Attribute Launch Point for WOCHANGESTATUS Object (Run action event)
Hi Nivethitha,
Below technote asserts that automation script does not fire on list tab when no records are selected. That might be the cause or the CLOSE button might be calling changeStatus method directly w/o the non-persistent object. Yet, if that message is important, I can recommend some workarounds.
Tech Note:
https://www.ibm.com/support/pages/automation-scripts-fire-list-tab
Option 1: Since item 3 works, you can replace CLOSE button with a copy of STATUS dialog having readonly status (no dropdown / lookup) defaulted to CLOSE.
Option 2: Replace CLOSE button with a new sigoption & automation script which handles the message and single / list of WO status change to CLOSE.
------------------------------
YALCIN KUMBASAR
Original Message:
Sent: Fri April 07, 2023 01:35 AM
From: Nivethitha S
Subject: Attribute Launch Point for WOCHANGESTATUS Object (Run action event)
Requirement:
User A is completed the workorder and again, same user A is going to change the work order status to 'CLOSE'. At that moment, have to pop up warning message as "You have completed this WO. Do you want to proceed?". This warning message is need to work for the below scenario
1. "Change Status" option for single WO
2. "Close Workorder" option for single WO
3. "Change Status" option for multiple WO from List Tab
4. "Close Workorder" option for multiple WO from list tab
We tried, created Attribute Launch Point for WOCHANGESTATUS Object (Run action event). Script is working for 1, 2, 3 scenario but not working for last scenario.
"Close Workorder" option for multiple WO from list tab, Automation script is not calling and not working.
Does anyone suggest how to handle the "Close Workorder" option for multiple WO from list tab to show warning message.
Thanks in Advance! :-)
------------------------------
Nivethitha S
------------------------------