Maximo 7.6 APPR POs via Integration

1.2k views Asked by At

We have an integration where in PO will be created in an external application and then will be interfaced to Maximo. POs which are aproved only will be inbound to Maximo , however Maximo doesnt allow addition of POLINES in APPR status ,so via integration , we are receiving the PO in WAPPR status. We have to approve the PO instantly so that any successive PO updates / Receipt transactions process to Maximo. I'm aware that an escalation can do the task of approving POs, however I would like the status change to happen instantly.

I have tried following options 1)Create a workflow to approve PO and set it to auto initiate. This doesnt work as workflow set to auto-initiate doesnt get triggered for objects created through integration

2)Tried setting up automation script to initiate workflow

from psdi.mbo import MboConstants
from psdi.server import MXServer
print("**************Script to Approve Inbound POs *******");
stat=mbo.getString("STATUS")
if ( stat != ''):
  print ( " Status is not null ");
  print ( stat);
  if ( stat=='WAPPR'):
    print ("Status is WAPPR");
    MXServer.getMXServer().lookup("WORKFLOW").initiateWorkflow("[my WF]",mbo);
    print(" Workflow has been initiated and PO will be approved");

my WF contains an Action , which performs Change Status to set status as APPR. This creates an entry in the POSTATUS table, however new Status reads as WAPPR instead of APPR

3)Automation script to set value for Status

from psdi.mbo import MboConstants
from psdi.server import MXServer
print("**************Script to Approve POs Inbound *******");
stat=mbo.getString("STATUS")
if ( stat != ''):
   print ( " Status is not null ");
   print ( stat);
   if ( stat=='WAPPR'):
     print ("Status is WAPPR");
     mbo.setValue("STATUS","APPR",MboConstants.NOVALIDATION );
     print(" Status approved");

This was set up with Object Launch point , Object as PO and on Save operation , After commit.

This also dint work.

Please let me know whether there are any other options

1

There are 1 answers

1
Jeroen On

Not sure if you're workflow triggering script is working or if it is needed.

The problem is you analysis of the change status. Because a new PO record is created, there is also a new status 'change', which is the change from 'nothing' to the first status for PO that is 'WAPPR' . For PO there is no 'NEW' status. So the record you're seeing in the POSTATUS table is not from your script, but from the create action of the interface.

For status changes you should use the default application action. This will change the status on the record AND create an entry in the correct status table (POSTATUS in this case). Go to->System Configuration->Platform configuration->Actions. Create new action. Set object to PO, Type to 'Change Status' and value to 'APPR'. Use this action in your workflow. Or directly in the escalation. Don't worry to much about escalations that run every 5min. You can even use a new status 'NEW' as synonym for 'WAPPR' to distinguish between normal records and the just interfaced ones. That way you can also hide them from your users in the PO application.

Hope that helps.