psdi.iface.app.po

Class MaxPOProcess

  • All Implemented Interfaces:
    MicConstants, MosConstants


    public class MaxPOProcess
    extends StatefulMicSetIn
    Integration point processing class for Purchase Order transactions coming into Maximo from an external system.
    • Constructor Detail

      • MaxPOProcess

        public MaxPOProcess()
                     throws MXException,
                            java.rmi.RemoteException
        Construct the MaxPOProcess class
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
    • Method Detail

      • checkBusinessRules

        public int checkBusinessRules(MboSetRemote mboSet,
                                      java.lang.String tableName)
                               throws MXException,
                                      java.rmi.RemoteException
        Method to call back and find out can we process data from specific table.
        Overrides:
        checkBusinessRules in class MosProcessImpl
        Parameters:
        tableName - Give name of process MAXIMO table
        mboSet - Give MboSet for the current level.
        Returns:
        - Return integer indicating can we take data from specific table or not (for list of return values refer to MicSetIn)
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • createMboSet

        public MboSetRemote createMboSet(boolean primaryMbo,
                                         MboRemote parentMbo,
                                         MosDetailInfo mdi,
                                         java.lang.String processTable)
                                  throws MXException,
                                         java.rmi.RemoteException
        Create mbo and mbo set sets for incomig transactions
        Overrides:
        createMboSet in class MosProcessImpl
        Parameters:
        parentMbo - Give reference to parent Mbo.
        micInfo - Give MicSetInfo for the current level.
        processTable - Give name of table to process
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • addMbo

        public MboRemote addMbo(MboSetRemote mboSet)
                         throws MXException,
                                java.rmi.RemoteException
        Try to find in memory MBO with the keys matched with XML data for the currebt level
        Overrides:
        addMbo in class MosProcessImpl
        Parameters:
        mboSet - Give MboSet for the current level.
        Returns:
        MboSet
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • setAdditionalData

        public void setAdditionalData(MboSetRemote MboSet,
                                      java.lang.String tableName)
                               throws MXException,
                                      java.rmi.RemoteException
        Method to set all addition data from XML to MBO which was not set thru Integration DD
        Overrides:
        setAdditionalData in class MosProcessImpl
        Parameters:
        tableName - Give name of process MAXIMO table
        MboSet - Give MboSet for the current level.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • checkAdditionalRules

        public void checkAdditionalRules()
                                  throws MXException,
                                         java.rmi.RemoteException
        Method to call at the end of processing can be used to set data for the whole object.It will clear allPR HashMap after every PO is processed.
        Overrides:
        checkAdditionalRules in class StatefulMicSetIn
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • findValidStatusPO

        public MboRemote findValidStatusPO()
                                    throws MXException,
                                           java.rmi.RemoteException
        Purchase Orders exist in database with different revisions. Find an active purchase order. Here is the order to get active purchase order. 1) Return null PO if PO doesn't exist. 2) Return PNDREV PO if it exists. 3) Return WAPPR/APPR/INPRG PO if it exists. 4) Display error message for history status of POs. PO Set could have one APPR/INPRG/WAPPR PO and/or PNDREV and/or history POs. PO revision status: example 1 - REVISE, REVISE, APPR, PNDREV. Active PO is PNDREV. example 2 - REVISE, APPR. Active PO is APPR. example 3 - WAPPR. Active PO is WAPPR. example 4 - REVISE, REVISE, CLOSE. No active PO exists. Display error message
        Returns:
        Purchase Order
        Throws:
        MXException
        java.rmi.RemoteException
      • findApprovedPO

        public MboRemote findApprovedPO()
                                 throws MXException,
                                        java.rmi.RemoteException
        Return an approved, in progressed or waiting for approved purchase order. Return null if PO doesn't exist in database.
        Returns:
        Purchase Order
        Throws:
        MXException
        java.rmi.RemoteException
      • getPR

        public MboRemote getPR(java.lang.String prnum,
                               java.lang.String siteid)
                        throws MXException,
                               java.rmi.RemoteException
        Returned PR object based on PRNum and Site.
        Parameters:
        prnum - PR number
        siteid - PR's site
        Returns:
        Purchase Requisition
        Throws:
        MXException
        java.rmi.RemoteException