Eric,
Generally I would just re-implement whatever the base class is doing so you have full control over it and in most cases the actions in a field adapter are pretty simple. With that said, you can do something like the following.
from psdi.app.workorder import FldWOJobPlan
def action():
superField = FldWOJobPlan(mbo.getMboValue("ATTRIBUTE_NAME"))
superField.action()
# Do your custom actions here.
action()
You can take a similar strategy for the the get list and here is a blog post I wrote for reference on implementing lists with automation scripts.
https://www.sharptree.io/blog/2022/2022-02-14-script-retrieve-list/
Regards,
Jason
------------------------------
Jason VenHuizen
Sharptree
------------------------------
Original Message:
Sent: 04-22-2024 18:49
From: Eric Zuo
Subject: How to Call IBM outbox Java Function in Maximo Autoscript
Dear experts,
I need to write python scripts in Maximo to call action() and getList() of psdi.app.workorder.FldWOJobPlan.class. With customized java class, I can use super.action() and super.getList(). But How to do it in python auto script?
First I may need to call the constructor FldWOJobPlan(MboValue mbv) to create an instance. I tried:
supper = FldWOJobPlan ( curMbovalue )
supper.action()
It does not work. Could you please forward instruction?
Thank you in advance.
Eric
#MaximoApplicationSuite
#MaximoUserGroups
------------------------------
Eric Zuo
------------------------------