psdi.app.workorder

Class WOService

    • Field Detail

      • MAXPRIORITY

        public static final int MAXPRIORITY
        The maximum priority value. For attributes WoPriority, AssetLocPriority, and CalcPriority on the WO object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WOService

        public WOService()
                  throws java.rmi.RemoteException
        constructor for WOService.
        Throws:
        java.rmi.RemoteException
      • WOService

        public WOService(MXServer mxServer)
                  throws java.rmi.RemoteException
        constructor for WOService.
        Parameters:
        mxServer - the "Server Environment" this Service is being created in.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • restart

        public void restart()
                     throws java.rmi.RemoteException
        Indicates that the Service should reload any cached information. Clears Priority and Edit Setting cached information.
        Specified by:
        restart in interface ServiceRemote
        Overrides:
        restart in class AppService
        Throws:
        java.rmi.RemoteException
      • calculateWorkPriority

        public void calculateWorkPriority(MboRemote forWO,
                                          UserInfo ui)
                                   throws MXException,
                                          java.rmi.RemoteException
        Calculates the value for the CalcPriority attribute, given the current values of WoPriority and AssetLocPriority and the select priority formula.
        Specified by:
        calculateWorkPriority in interface WOServiceRemote
        Parameters:
        forWO - the workorder which its CalcPriority need be calculated.
        ui - The user info object for the user.
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateResponseDate

        public void calculateResponseDate(WO forWO)
                                   throws MXException,
                                          java.rmi.RemoteException
        Calculates the response time given the value of the CalcPriority attribute. The response time is added to the report date and put into the RespondBy attribute.
        Parameters:
        forWO - the workorder which its RespondBy need be calculated.
        Throws:
        MXException
        java.rmi.RemoteException
      • getEditSettings

        public WoEditSettings getEditSettings(WO forWO)
                                       throws MXException,
                                              java.rmi.RemoteException
        Gets the edit settings for the status the workorder is at and its site. The WO object uses the settings to set read-only flags.
        Parameters:
        forWO - The workorder to get edit settings for.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWorkTypeAttribute

        public boolean getWorkTypeAttribute(WO forWO,
                                            java.lang.String attr)
                                     throws MXException,
                                            java.rmi.RemoteException
        Determines the value for this workorder's worktype attribute. If the work order's work type is not found, false is returned.
        Parameters:
        forWO - The work order needing work type information
        attr - The work type attribute desired. Either "PromptFail" or "PromptDown" for now.
        Returns:
        The value of the WO's work type attribute.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateWoForMovedAsset

        public void updateWoForMovedAsset(MboRemote movedAsset)
                                   throws MXException,
                                          java.rmi.RemoteException
        Updates the workorders which reference a piece of asset which has moved. Asset is assumed to be moved before calling this method.
        Specified by:
        updateWoForMovedAsset in interface WOServiceRemote
        Parameters:
        movedAsset - the asset Mbo which has moved.
        Throws:
        MXException
        java.rmi.RemoteException
      • initCriteriaList

        public void initCriteriaList(java.util.Hashtable criteriaTable)
                              throws MXException,
                                     java.rmi.RemoteException
        Criteria defined for the WOService object: OPEN - all open work orders. OPENCHARGES - all open and accept charges work orders. HISTORY - all closed and cancelled work orders. APPROVED - Open work orders which not waiting for approval. APPROVEDCHARGES - Open and accept charges work orders which not waiting for approval. UNAPPROVED - Waiting for approval work orders. INCOMPLETE - Open and approved work orders which aren't complete. INCOMPLETECHARGES - Open and approved and accept charges work orders which aren't complete. NOTCANCELLED - Appoved work orders which have not been cancelled. NOTCOMPLETE - Open work orders which are not complete either.
        Overrides:
        initCriteriaList in class AppService
        Parameters:
        criteriaTable - the Hashtable to store Criterias.
        Throws:
        MXException
        java.rmi.RemoteException
      • tagoutsMustBelongToHazards

        public boolean tagoutsMustBelongToHazards()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Identify whether tagouts must belong to hazards. If true, then all wotagout throughout the system must belong to wohazard. If false, then NO wotagout anywhere in the system may belong to wohazard. This used to be identified via the maxvar TAGOUTSHAVEHAZARDS, but now always returns True.
        Returns:
        True if tagouts must belong to hazards, else False.
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(WORemote wo,
                                 java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Service Method used to change status.
        Specified by:
        changeStatus in interface WOServiceRemote
        Parameters:
        wo - Work Order Mbo
        status - The new status
        date - The date of the status change. Defaults to the current date/time if null.
        memo - The status change memo.
        Throws:
        MXException("access", - "samestatus"); MXException("access", "UnrecogStatus") MXException("workorder", "unappr") MXException("workorder", "wappr") MXException("workorder", "wappr") MXException("workorder", "inprg") MXException("workorder", "comp"") MXException("workorder", "close") MXException("workorder","can") MXException("workorder","wsch") MXException("access", "notauthorized") MXException("workorder", "notcloselabtrans") MXException("workorder", "actuals") MXException("workorder", "CannotCancel") MXException("workorder", "ReqApprContractToApprWO") MXException("workorder", "processflowsuspended"); MXException("workorder", "cantcompletebeforestart") MXException("workorder", "predecessorsnotcomp") MXException("workorder", "parentnotstarted") MXException("workorder", "invalidstatus") MXException("workorder", "childrenmustbecompleted")
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • getISCalEditSettings

        public WoEditSettings getISCalEditSettings(WO wo)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Gets the checks if is cal edit settings.
        Parameters:
        wo - the wo
        Returns:
        the checks if is cal edit settings
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • reportDowntime

        public void reportDowntime(MboRemote wo,
                                   java.util.Date startDate,
                                   java.util.Date endDate,
                                   double hoursDown,
                                   java.lang.String code,
                                   boolean operational)
                            throws MXException,
                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • startTimerStartDate

        public void startTimerStartDate(MboRemote wo,
                                        java.util.Date startDateTime,
                                        java.lang.Long anywhererefid,
                                        java.lang.String transtype)
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • stopTimerStartFinishDates

        public void stopTimerStartFinishDates(MboRemote wo,
                                              java.util.Date finishDateTime,
                                              java.util.Date startDateTime,
                                              java.lang.Boolean noStopTimerPopup)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPFromWO

        public MboRemote createJPFromWO(MboRemote wo,
                                        java.lang.String jpnum,
                                        java.lang.String description,
                                        java.lang.String longdescription)
                                 throws MXException,
                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getParentsInChangeStatus

        public java.util.Vector getParentsInChangeStatus()
                                                  throws MXException,
                                                         java.rmi.RemoteException
        IV76966: Called by WO
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • clearParentsInChangeStatus

        public void clearParentsInChangeStatus()
                                        throws MXException,
                                               java.rmi.RemoteException
        IV76966:called by WorkOrderListener postCommitAction
        Throws:
        MXException
        java.rmi.RemoteException
      • assignLabor

        public void assignLabor(MboRemote assignment,
                                java.lang.String laborcode,
                                java.lang.String orgid)
                         throws MXException,
                                java.rmi.RemoteException
        Specified by:
        assignLabor in interface WOServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • getLaborCraftRateSet

        public MboSetRemote getLaborCraftRateSet(MboRemote assignment)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Filters the LaborCraftRate Set
        Parameters:
        assignment -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createAssignmentwithAssignedLabor

        public void createAssignmentwithAssignedLabor(MboRemote workorder,
                                                      java.lang.String laborcode,
                                                      java.lang.String orgid,
                                                      java.lang.String laborhrs,
                                                      java.util.Date starttime)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Create an assignment from unplanned work.
        Specified by:
        createAssignmentwithAssignedLabor in interface WOServiceRemote
        Parameters:
        workorder -
        laborcode -
        orgid -
        laborhrs -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException;
      • getAvailableLabor

        public MboSetRemote getAvailableLabor(MboRemote wo,
                                              java.util.Date fromdate,
                                              java.util.Date todate,
                                              java.lang.String vendor,
                                              java.lang.String contractnum,
                                              java.lang.String location,
                                              java.lang.Boolean assigned,
                                              java.lang.String siteid,
                                              java.lang.String craft,
                                              java.lang.String skilllevel,
                                              java.lang.String orgid)
                                       throws MXException,
                                              java.rmi.RemoteException
        Gets the available labor for the current assignment.
        Specified by:
        getAvailableLabor in interface WOServiceRemote
        Returns:
        laborSet
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • applyOwner

        public void applyOwner(MboRemote wo,
                               java.lang.String owner)
                        throws MXException,
                               java.rmi.RemoteException
        Applies the selected owner to the current workorder.
        Specified by:
        applyOwner in interface WOServiceRemote
        Parameters:
        wo -
        owner -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • applyOwnerGroup

        public void applyOwnerGroup(MboRemote wo,
                                    java.lang.String ownergroup)
                             throws MXException,
                                    java.rmi.RemoteException
        Applies the selected ownergroup to the current workorder.
        Specified by:
        applyOwnerGroup in interface WOServiceRemote
        Parameters:
        wo -
        ownergroup -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • getWorkLog

        public MboSetRemote getWorkLog(MboRemote wo,
                                       java.lang.Boolean viewSR)
                                throws MXException,
                                       java.rmi.RemoteException
        Gets the work log entries for the current workorder.
        Specified by:
        getWorkLog in interface WOServiceRemote
        Returns:
        worklogSet
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • generateWORelRecord

        public void generateWORelRecord(MboRemote wo,
                                        java.lang.String wonum,
                                        java.lang.String siteId)
                                 throws MXException,
                                        java.rmi.RemoteException
        Generates a new related record from workorder
        Parameters:
        wo -
        wonum -
        Throws:
        MXException
        java.rmi.RemoteException
      • downtimereport

        public MboRemote downtimereport(MboRemote wo,
                                        java.util.Date statuschangedate,
                                        java.lang.String statuschangecode,
                                        java.lang.String operational)
                                 throws MXException,
                                        java.rmi.RemoteException
        Change status of the asset by reporting downtime up/down.
        Parameters:
        wo - - workorder object.
        statuschangedate- - status change date.
        statuschangecode- - status change code.
        operation- - operational.
        Returns:
        MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • checkEAcfg

        public java.util.Map checkEAcfg()
                                 throws MXException,
                                        java.rmi.RemoteException
        Check if EA configuration is valid.
        Throws:
        MXException
        java.rmi.RemoteException
      • getEAToken

        public java.util.Map getEAToken()
                                 throws MXException,
                                        java.rmi.RemoteException
        Get token from EA
        Throws:
        MXException
        java.rmi.RemoteException
      • getJobPlans

        public MboSetRemote getJobPlans(WORemote wo,
                                        java.lang.Boolean jpincludeclassless,
                                        java.lang.Boolean jpassets)
                                 throws MXException,
                                        java.rmi.RemoteException
        Service Method to fetch Possible Job plans for a work order
        Parameters:
        wo - Work Order Mbo
        jpincludeclassless - Fetch Job Plans with No Classes Defined
        jpassets - Fetch Job Plans for the Work Order's Asset and Location Only
        Throws:
        MXException
        java.rmi.RemoteException
      • changeWOStatus

        public void changeWOStatus(WORemote wo,
                                   java.lang.String status,
                                   java.util.Date date,
                                   java.lang.String memo)
                            throws MXException,
                                   java.rmi.RemoteException
        Service Method used to change status. Asset down validation will be done here.
        Parameters:
        wo - Work Order Mbo
        status - The new status
        date - The date of the status change. Defaults to the current date/time if null.
        memo - The status change memo.
        Throws:
        MXException("access", - "samestatus"); MXException("access", "UnrecogStatus") MXException("workorder", "unappr") MXException("workorder", "wappr") MXException("workorder", "wappr") MXException("workorder", "inprg") MXException("workorder", "comp"") MXException("workorder", "close") MXException("workorder","can") MXException("workorder","wsch") MXException("access", "notauthorized") MXException("workorder", "notcloselabtrans") MXException("workorder", "actuals") MXException("workorder", "CannotCancel") MXException("workorder", "ReqApprContractToApprWO") MXException("workorder", "processflowsuspended"); MXException("workorder", "cantcompletebeforestart") MXException("workorder", "predecessorsnotcomp") MXException("workorder", "parentnotstarted") MXException("workorder", "invalidstatus") MXException("workorder", "childrenmustbecompleted") MXApplicationException("workorder","NeedDowntime")
        MXException
        java.rmi.RemoteException
      • completeAssignment

        public void completeAssignment(MboRemote assignment)
                                throws MXException,
                                       java.rmi.RemoteException
        Completes the assignment, which will complete the work order as part of its action if all assignments are completed.
        Parameters:
        assignment - - Assignment object.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAvailableCrew

        public MboSetRemote getAvailableCrew(MboRemote wo,
                                             java.util.Date fromdate,
                                             java.util.Date todate,
                                             java.lang.String persongroup,
                                             java.lang.String amcrewtype,
                                             java.lang.String company,
                                             java.lang.Boolean assigned,
                                             java.lang.String siteid,
                                             java.lang.String orgid)
                                      throws MXException,
                                             java.rmi.RemoteException
        Gets the available crew for the current assignment.
        Specified by:
        getAvailableCrew in interface WOServiceRemote
        Returns:
        crewSet
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        throws MXException, RemoteException
      • getAssistUri

        public java.util.Map getAssistUri(OslcRequest request)
                                   throws MXException,
                                          java.rmi.RemoteException
        Get Uri from Assist API
        Throws:
        MXException
        java.rmi.RemoteException