This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.
I am trying to apply a ROUTE to a work order through automation scripting upon the selection of particular SUPERVISOR. I have been able to populate the ROUTE ID to the workorder, I've seen this in the database, but I am obviously not importing the proper class to apply the ROUTE to the workorder as the children work orders are not being created. The script is not producing any error messages either.
Here is what I have thus far any insight or suggestions are welcome and thank you in advance.
Maximo 7.5.0.9
SQL Server 2008
WebSphere
from psdi.util import MXApplicationException
from psdi.mbo import MboConstants
from psdi.mbo import SqlFormat
from psdi.server import MXServer
from psdi.app.workorder import WOSet
from psdi.app.workorder import WO
def getMboSet(objectName):
return MXServer.getMXServer().getMboSet(objectName, mbo.getUserInfo())
woSet = getMboSet("WORKORDER")
if type == 'PROJ' and super == 'SUPERNAME':
route = 'ROUTETEST'
else:
route = ' '
Thanks again,
Mike
Mike,
Route's one of those fields you can't populate directly. You've got to
call a workorder function to apply it. Try replacing this line:
route = 'ROUTETEST'
with this:
mbo.applyRoute('ROUTETEST', None)
Thanks,
Adam Davis
Asset Partners
On Thu, Aug 18, 2016 at 8:31 AM, mjhanscom@comcast.net [MAXIMO] <
MAXIMO@yahoogroups.com> wrote:
>
>
>
> I am trying to apply a ROUTE to a work order through automation scripting
> upon the selection of particular SUPERVISOR. I have been able to populate
> the ROUTE ID to the workorder, I've seen this in the database, but I am
> obviously not importing the proper class to apply the ROUTE to the
> workorder as the children work orders are not being created. The script is
> not producing any error messages either.
> Here is what I have thus far any insight or suggestions are welcome and
> thank you in advance.
> Maximo 7.5.0.9
> SQL Server 2008
> WebSphere
>
>
> from psdi.util import MXApplicationException
> from psdi.mbo import MboConstants
> from psdi.mbo import SqlFormat
> from psdi.server import MXServer
>
> from psdi.app.workorder import WOSet
> from psdi.app.workorder import WO
>
>
> def getMboSet(objectName):
> return MXServer.getMXServer().getMboSet(objectName, mbo.getUserInfo())
>
> woSet = getMboSet("WORKORDER")
> if type == 'PROJ' and super == 'SUPERNAME':
> route = 'ROUTETEST'
> else:
> route = ' '
>
>
>
>
> Thanks again,
> Mike
>
>
>
>
>
Okay, you got the workorders, but I don't see where you are getting the children for each workorder.
-C
---In MAXIMO@yahoogroups.com, <mjhanscom@comcast.net> wrote :
I am trying to apply a ROUTE to a work order through automation scripting upon the selection of particular SUPERVISOR. I have been able to populate the ROUTE ID to the workorder, I've seen this in the database, but I am obviously not importing the proper class to apply the ROUTE to the workorder as the children work orders are not being created. The script is not producing any error messages either.
Here is what I have thus far any insight or suggestions are welcome and thank you in advance.
Maximo 7.5.0.9
SQL Server 2008
WebSphere
from psdi.util import MXApplicationException
from psdi.mbo import MboConstants
from psdi.mbo import SqlFormat
from psdi.server import MXServer
from psdi.app.workorder import WOSet
from psdi.app.workorder import WO
def getMboSet(objectName):
return MXServer.getMXServer().getMboSet(objectName, mbo.getUserInfo())
woSet = getMboSet("WORKORDER")
if type == 'PROJ' and super == 'SUPERNAME':
route = 'ROUTETEST'
else:
route = ' '
Thanks again,
Mike
Thanks Adam, I tried your suggestion with the same result, the ROUTE field gets populated on the WORKORDER table, but the children work orders are not created. Still searching for solution.
Mike
Is the route you're trying to apply set to create child work orders, tasks, or multi asset locci?
The route is set to create child work orders.
Mike