psdi.app.workorder

Class WO

  • All Implemented Interfaces:
    AutoLocatable, GISable, AddressableMbo, java.rmi.Remote, AncMbo, WORemote, AppActionInterface, HierarchicalMboRemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy
    Direct Known Subclasses:
    WOActivity, WOChange, WORelease


    public class WO
    extends StatefulMbo
    implements WORemote, AncMbo
    MBO to represent Work Order object. This is one of the most complex objects in MAXIMO. See the Work Order Package description for details.

    This is a site level object.

    The key attributes for this object are SiteID and WoNum.

    The attributes in this object are as follows:

    Attribute Name Description
    ActFinish Actual finish date of this work order.
    ActLabCost Actual labor cost of this work order.
    ActLabHrs Actual labor hours of this work order.
    ActMatCost Actual material cost of this work order.
    ActServCost Total actual service cost against this work order.
    ActStart Actual start date of this work order.
    ActToolCost Actual tool cost of this work order.
    ActTotalCost Non-persistent attribute to calculate the actual total cost against this work order. it's value equals to (ActLabCost + ActMatCost + ActToolCost+ ActServCost).
    CalcPriority Calculated work priority, it's value is calculated from wopriority and assetlocpriority, and it calculates the respondby date. See also WOPriority.
    Calendar Identifier of Calendar to determine shift work is to be done on.
    ChangeBy Modified By.
    ChangeDate Last Modified Date.
    ChargeStore Indicates whether charges on this work order should be added to the asset.
    Contract Identification of the asset ServiceContract.
    CrewId Identification for a given crew within an craft.
    Description Short description of this work order.
    Disabled Indicates if this record active.
    DownTime Indicates if the asset has to be down for this work order.
    AssetLocPriority asset Location Priority copied from the work order'sasset or Location.
    assetnum Identification of the asset associate with this work order.
    EstAtApprLabCost Estimated labor costs at time of approval for this work order.
    EstAtApprLabHrs Estimated the labor hours at time of approval for this work order.
    EstAtApprMatCost Estimated materials cost at time of approval for this work order.
    EstAtApprServCost Estimated service cost at time of approval for this work order.
    EstAtApprToolCost Estimated tools cost at time of approval for this work order.
    EstAtApprTotalCost A non-persistent attribute to calculate the estimate at time of approval of total cost against this work order, the value of this attribute equals to (EstAtApprLabCost + EstAtApprMatCost + EstAtApprToolCost+ EstAtApprServCost).
    EstDur Estimated duration of this work order.
    EstLabCost Estimated labor cost of this work order.
    EstLabHrs Estimated labor hours of this work order.
    EstMatCost Estimated material cost of this work order.
    EstServCost Total estimated service cost against this work order.
    EstToolCost Estimated tool cost of this work order.
    EstTotalCost A non-persistent attribute to calculate the estimated total cost against this work order, The value of this attribute equals to (EstLabCost + EstMatCost + EstToolCost+ EstServCost).
    ExternalRefId External reference ID.
    FailDate Actual failure date.
    FailureCode Indicates top level failure code of the FailureCode of a failure hierarchy.
    FincntrlId Identifier of Financial Control.
    OrigRecordID Indicates if this work order has been generated from another WO or Ticket, if yes, then this attribute contains the originating WO/Ticket number.
    Fr1Code A non-persistent attribute that represents this work order's 2nd level failure report failure code.
    Fr2Code A non-persistent attribute that represents this work order's 3rd level failure report failure code.
    GeneratedForPo Identification of the PO for this work order.
    GenForPoLineId The POLine number that required the work.
    GLAccount GL Account associated with this work order.
    HasChildren Indicates if this work order has children. Yes if WO has children No if it has no children.
    HasFollowUpWork Indicates if there is follow up work for this work order.
    HistoryFlag Indicates if this work order is in history. Closed and cancelled work orders are in history.
    Inspector Identifier of the Inspector responsible for this work order.
    Interruptible Indicates if this work order allowed to be stopped and restarted during resource scheduling.
    IsTask Indicates if the work order is considered to be a task.
    JpNum Identification of the JobPlan associate with this work order.
    LdKey Long description key.
    Location Identifier of the Location of this work order.
    MeasureDate Date/Time when measurement was taken or when observation was taken.
    MeasurementValue Recorded measurement.
    Observation Describes an inspection observation of asset or location by an inspector.
    OrgId Identifier of the organization for this work order.
    OutLabCost Outside Labor Cost of this work order.
    OutMatCost Outside Material Cost of this work order.
    OutToolCost Outside Tool Cost of this work order.
    OwnerSysId Owner System ID of MXCollab.
    Parent Work Order Number of this work order's parent.
    ParentChgsStatus Flags whether the parent of this work order should change this work order's status.
    Phone The phone number of the person reporting the work order.
    PmDueDate From the original Next due date of the PM.
    PmExtDate From the extended date of the PM.
    PmNextDueDate From the next due date of the PM.
    PMNum Identifier of the PM that created this work order.
    PointNum The MeasurePoint for which this work order is recording.
    ProblemCode Reason for failure, indicates second level FailureCode of a failure hierarchy. This value is also the first level of the work order's failure report.
    RemarkDesc This nonpersistent attribute is a link to the Description attribute of the FailureRemark companion record.
    RemarkEnterDate This nonpersistent attribute is a link to the EnterDate attribute of the FailureRemark companion record.
    RemDur Estimated time to complete work order.
    ReportDate The date work order was reported.
    ReportedBy The person reporting this work order.
    RespondBy A Calculated field specifying by when a breakdown should be responded to.
    SafetyPlanID A non-persistent attribute to hold the identifier of the SafetyPlan associate with this work order.
    SchedFinish Scheduled finish date-from the Scheduler.
    SchedStart Scheduled start date-from the Scheduler.
    SenderSysId Attribute used by ERP-Integration (APIs).
    SiteId Identifier of the site for this failure.
    SourceSysId Source System ID of the MXCollab.
    Status The status of the Work Order.
    StatusDate Work Order Status Date.
    Supervisor Identifier of the supervisor of work order.
    TargCompDate Target Completion Date.
    TargStartDate Target Start Date.
    aThe Task identifier of this work order.
    WfActive Indicates if the work flow is active on this work order.
    WfId Identifier of the Work Flow process associated with this work order.
    PersonGroup Identifier of the PersonGroup.
    WoLabLnk Identifier of the Labor associate with this work order.
    WoNum Unique identifier of this work order.
    WoPriority Work Order Priority. WorkLocation Identifier of the Work Location that is to be responsible for the work.
    WorkType Indicates the WorkType of this work order.
    WoSequence Indicates sequence to execute Work Orders of a given WO hierarchy.
    WO01-WO020 extra fields.
    WOEQ1-WOEQ14 extra fields. Cross over fields from asset.EQ1-EQ12, EQ23,EQ24.
    WOJO1-WOJO8 extra fields. Cross over fields from JobTask.JO1-JO8.
    WOL01-WOLO10 extra fields.
    WORTS1-WORTS5 extra fields. Crossover fieldS from Route_Stop.RTS1-RTS5.

    The createWorkorder, createChange & createRelease methods all create a seperate mbo set, save it and return the newly created mbo.

    • Field Detail

      • assetMoveFromChangeSttaus

        public boolean assetMoveFromChangeSttaus
        The is from comp/close staus.
      • APPLYASSETLOC

        public static final java.lang.String APPLYASSETLOC
        This is a bullentin board key indicating that this thread is already in the middle of validating either the assetnum or Location attribute. The handling class for these attributes look for and post this key to know whether they are the original attribute changed or a change because of a side effect.
        See Also:
        BulletinBoardServiceRemote, FldWOassetnum, FldWOLoc, Constant Field Values
      • skipFieldCopy

        protected static java.util.Set skipFieldCopy
        This is a static HashSet that contains the names of the fields whose values need not be copied from the source Mbo to the target Mbo and is used only for duplication the Workorder Mbo. This HashSet is loaded in the loadSkipFieldCopyHashSet.
        See Also:
        WO.loadSkipFieldCopyHashSet(), WO.skipFieldCopy
      • isHashSetLoaded

        protected static boolean isHashSetLoaded
        This is a protected boolean variable to check if the HashSet has already been loaded. The HashSet is loaded only once since it is static. The same hashSet can be used by all duplicate methods once it has been loaded
      • removeChildren

        protected boolean removeChildren
        Indicator determining if children workplans should be removed as well.
      • removeChildFlag

        protected boolean removeChildFlag
        Initialize and setup default flag when removing work plan removal.
      • FLOWCONTROLSUSPENDED

        public static int FLOWCONTROLSUSPENDED
        The FLOWCONTROLSUSPENDED.
      • WONOTFLOWCONTROLLED

        public static int WONOTFLOWCONTROLLED
        The WONOTFLOWCONTROLLED.
      • WORKTYPENOTFLOWCONTROLLED

        public static int WORKTYPENOTFLOWCONTROLLED
        The WORKTYPENOTFLOWCONTROLLED.
      • FLOWCONTROLWOCANCELLED

        public static int FLOWCONTROLWOCANCELLED
        The FLOWCONTROLWOCANCELLED.
      • BEFOREFLOWCONTROLSTART

        public static int BEFOREFLOWCONTROLSTART
        The BEFOREFLOWCONTROLSTART.
      • ATFLOWCONTROLSTART

        public static int ATFLOWCONTROLSTART
        The ATFLOWCONTROLSTART.
      • INFLOWCONTROL

        public static int INFLOWCONTROL
        The INFLOWCONTROL.
      • ATFLOWCONTROLCOMPLETE

        public static int ATFLOWCONTROLCOMPLETE
        The ATFLOWCONTROLCOMPLETE.
      • AFTERFLOWCONTROLCOMPLETE

        public static int AFTERFLOWCONTROLCOMPLETE
        The AFTERFLOWCONTROLCOMPLETE.
      • FLOWCONTROLUNRECOGNIZED

        public static int FLOWCONTROLUNRECOGNIZED
        The FLOWCONTROLUNRECOGNIZED.
      • FLOWCONTROLAUTOSTART

        public static int FLOWCONTROLAUTOSTART
        The FLOWCONTROLAUTOSTART.
      • FLOWCONTROLMANUALSTART

        public static int FLOWCONTROLMANUALSTART
        The FLOWCONTROLMANUALSTART.
      • FLOWCONTROLMANUALCOMPLETE

        public static int FLOWCONTROLMANUALCOMPLETE
        The FLOWCONTROLMANUALCOMPLETE.
      • removeWorkplanFlag

        protected boolean removeWorkplanFlag
        Initialize and setup default flag when removing work plan removal.
      • unCommittedWOs

        public java.util.Vector unCommittedWOs
        IV98812: in PM wogen, for a job plan with many nested job plans. There could be exceptions in any point of the structure. Since in pm wogen, each child set is created in its own set, this causes transaction not bening rolled back when exception happens. This vector stores the child wos that had been generated before the exception.
    • Constructor Detail

      • WO

        public WO(MboSet ms)
           throws MXException,
                  java.rmi.RemoteException
        Your basic constructor.
        Parameters:
        ms - The WO MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • setUserInteractive

        public void setUserInteractive(boolean isInteractive)
                                throws MXException,
                                       java.rmi.RemoteException
        Specified by:
        setUserInteractive in interface WORemote
        Parameters:
        isInteractive - the isInteractive to set
        Throws:
        MXException
        java.rmi.RemoteException
      • isChangeInHierarchy

        public boolean isChangeInHierarchy()
                                    throws MXException,
                                           java.rmi.RemoteException
        Returns:
        the changeInHierarchy
        Throws:
        MXException
        java.rmi.RemoteException
      • setChangeInHierarchy

        public void setChangeInHierarchy(boolean changeInHierarchy)
                                  throws MXException,
                                         java.rmi.RemoteException
        Parameters:
        changeInHierarchy - the changeInHierarchy to set
        Throws:
        MXException
        java.rmi.RemoteException
      • getPreviousParent

        public java.lang.String getPreviousParent()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Returns:
        the previousParent
        Throws:
        MXException
        java.rmi.RemoteException
      • setPreviousParent

        public void setPreviousParent(java.lang.String previousParent)
                               throws MXException,
                                      java.rmi.RemoteException
        Parameters:
        previousParent - the previousParent to set
        Throws:
        MXException
        java.rmi.RemoteException
      • getProcess

        public java.lang.String getProcess()
        Gets the work flow process for work orders.
        Returns:
        the work flow process name for work orders which is WO.
      • init

        public void init()
                  throws MXException
        Initialization routine. Always read-only fields has their READONLY flag set here.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • isCharacteristic

        public boolean isCharacteristic()
                                 throws MXException,
                                        java.rmi.RemoteException
        This method checks if the measurepoint belongs to the characteristic meter. It returns true if the measurepoint belongs to characteristic meter, otherwise returns false.
        Returns:
        boolean true, if the measurepoint belongs to characteristic meter. false, if the measurepoint does not belong to characteristic meter.
        Throws:
        MXException
        java.rmi.RemoteException
      • setRelatedMboEditibility

        public void setRelatedMboEditibility(java.lang.String relationName)
                                      throws MXException,
                                             java.rmi.RemoteException
        Checks the editability of related tables.
        Parameters:
        relationName - The relationship name of the related MboSet which need to set the read/only flag.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.settings, #setEditibilityFlags
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. Programmers can override this method for custom handling of related objects. An example of this would be making the WPMATERIAL object read only if the status of the Work Order is CLOSED.
        Overrides:
        initRelationship in class Mbo
        Parameters:
        relationName - The relationship name of the related MboSet which need to initialize.
        mboSet - The related MboSet which need to initialize.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.setRelatedMboEditibility(java.lang.String)
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Internal method that marks the record as modified. Not usually called except by PSDI objects. Called when ever a field is modified so we can update the changedate/changeby.
        Specified by:
        modify in interface WORemote
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.modify()
      • IsCreatingChild

        protected boolean IsCreatingChild()
                                   throws MXException,
                                          java.rmi.RemoteException
        returns a flag indicating that workorder created is child or not
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new Work Order. Field defaults are set as well as field flags.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • updateServiceAddress

        public void updateServiceAddress()
                                  throws MXException,
                                         java.rmi.RemoteException
        Service Address. When updating main Assets/Locations WOServiceAddress may be updated.
        It will be populated in this order, SA from Asset if any, then SA from Location if any, else do nothing.
        Specified by:
        updateServiceAddress in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
      • createJobEntry

        public MboRemote createJobEntry()
                                 throws MXException,
                                        java.rmi.RemoteException
        Creates async record to get executed nested jobplan processing
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions which occur when a work order is saved. Initial WoAncestor record must be created. Updates HasFollowUpWonum flags for work orders referenced by the OrigRecordID attribute.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException - MAXIMO System Error
        java.rmi.RemoteException - RMI Error
        See Also:
        Mbo.add()
      • createAssignRepLoc

        public void createAssignRepLoc()
                                throws MXException,
                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getCrewMemberCount

        public int getCrewMemberCount(java.util.Date desiredDate)
                               throws MXException,
                                      java.rmi.RemoteException,
                                      MXApplicationException
        Get members count related to MaxVar CREWDURATION for a specific date
        Parameters:
        desiredDate - The date you want to know the members count
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        MXApplicationException
      • copyDoclinksToWO

        public void copyDoclinksToWO()
                              throws java.rmi.RemoteException,
                                     MXException
        Copy the docklinks from assetlocation,safetyplan,jobplan,pm etc which has copylonktowo flag set to WO and it's children
        Specified by:
        copyDoclinksToWO in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.copyDoclinksToWO()
      • copyDoclinksToWO

        public void copyDoclinksToWO(WO wo)
                              throws java.rmi.RemoteException,
                                     MXException
        Copy the docklinks from assetlocation,safetyplan,jobplan,pm etc which has copylonktowo flag set to this WO
        Throws:
        java.rmi.RemoteException
        MXException
      • inChildSubSet

        public boolean inChildSubSet()
        Determines when this work order is a member of children set of another work order.
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Work orders normally may not be deleted, except when they were created by mistake and deleted before being used.
        Specified by:
        canDelete in interface WORemote
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - With the key "workorder", and one of the "WoNoDelete" keys: WoNoDeleteWorkFlow, WoNoDeleteAppr, WoNoDeleteChildren, WoNoDeletePM, WoNoDeleteFollowup, WoNoDeleteAssettrans, WoNoDeletePurchase, and WoNoDeleteActual
        MXException
        java.rmi.RemoteException
        See Also:
        added for issue 82881
      • getSimilarWorkOrders

        public WOSetRemote getSimilarWorkOrders()
                                         throws MXException,
                                                java.rmi.RemoteException
        Returns a list of similar work orders. Definition of similar work order is :
        An open workorder which is not complete where the assetnum or LOCATION match as well as the PROBLEMCODE
        Checks MaxVar's showDupAtLoc and showDupWithAsset to see what queries should be done.

        The MboSet returned should be reset when no longer needed.

        Specified by:
        getSimilarWorkOrders in interface WORemote
        Returns:
        WOSetRemote of Similar Work Orders, which may be empty, or null if no query was performed.
        Throws:
        MXException - MAXIMO System Error
        java.rmi.RemoteException - RMI Error
        See Also:
        WO.getSimilarWorkOrders()
      • getLocForAsset

        public void getLocForAsset()
                            throws MXException,
                                   java.rmi.RemoteException
        Called by the assetnum attribute to set the work order's location to the Asset's location If the asset has a valid location for the work order, that location will be put on the work order, if the location field is blank. If the work order's locaiton is not blank, a warning will be given (MXApplicationException, workorder, AssetChangeLoc, parameter of the asset's location), but the location field won't change.
        Throws:
        MXException
        java.rmi.RemoteException
      • applyAssetLoc

        public void applyAssetLoc()
                           throws MXException,
                                  java.rmi.RemoteException
        Applys any changes to fields that are affected by changing the asset or location fields. Since changing the asset or Location of a work order will call this routine, the work order's asset or Location may be changed without validation by this method.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.selectSafetyPlan()
      • applyAssetLoc

        public void applyAssetLoc(boolean calcSafetyPlan)
                           throws MXException,
                                  java.rmi.RemoteException
        Apply asset loc.
        Parameters:
        calcSafetyPlan - the calc safety plan
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • copyJobPlanToWorkPlan

        public void copyJobPlanToWorkPlan()
                                   throws MXException,
                                          java.rmi.RemoteException
        Creates Work Plan from a Job Plan. Copies job plan in jpnum attribute. Called when job plan attribute changes value. exception thrown if workorder isn't waiting for approval
        Throws:
        MXApplicationException - With "workorder","CopyJobPlan" is thrown if an error is encountered while copying the job plan.
        MXException
        java.rmi.RemoteException
      • copyJobPlanToWorkPlanNoNestedJP

        public void copyJobPlanToWorkPlanNoNestedJP()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Creates Work Plan from a Job Plan. Copies job plan in jpnum attribute. Called when job plan attribute changes value. exception thrown if workorder isn't waiting for approval
        Throws:
        MXApplicationException - With "workorder","CopyJobPlan" is thrown if an error is encountered while copying the job plan.
        MXException
        java.rmi.RemoteException
      • clearWorkPlanInfo

        public void clearWorkPlanInfo()
                               throws MXException,
                                      java.rmi.RemoteException
        Clears Work Plan from a work order. Called when the job plan attribute is set to null in copyJobPlanToWorkPlan
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateConstaintDates

        public void calculateConstaintDates(MboValue startOffset,
                                            MboValue finishOffset,
                                            MboValue woDur)
                                     throws MXException,
                                            java.rmi.RemoteException
        Uses the passed Start and Finish Constraint Offsets, if any, and the workorder's target dates, if any, to calculate the constaint dates, if possible. The start offset is subtracted from the target start to determine the start constraint; the finish offset is added to the target finish to determine the finish constraint. Without a start offset, the start constraint cannot be calculated; without a finish offset, the finish constraint cannot be calculated. There must be at least one target date. If the target finish is null, the finish constraint is calculated as the target start plus the passed wo duration plus the finish offset, and similarly for the start constraint if the target start is null. WODur may be either a jpduration, if a jobplan is involved, or an estdur, if one isn't.
        Parameters:
        startOffset - The mboValue object associated with the passed start offset.
        finishOffset - The mboValue object associated with the passed finish offset.
        woDur - The mboValue object associated with the passed workorder duration.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWoTaskLookup

        public java.util.Map getWoTaskLookup()
        Gets the lookup table for converting original sub-work orders to new JobPlan Tasks.
        Returns:
        the lookup table for converting original sub-work orders to new JobPlan Tasks
      • getAddingFirstJobTask

        public boolean getAddingFirstJobTask()
                                      throws MXException,
                                             java.rmi.RemoteException
        Gets the adding first job task.
        Specified by:
        getAddingFirstJobTask in interface WORemote
        Returns:
        the adding first job task
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        psdi.app.workorder.WO#getAddingFirstJobChild
      • getCopyingJobTasks

        public boolean getCopyingJobTasks()
                                   throws MXException,
                                          java.rmi.RemoteException
        Gets the copying job tasks.
        Specified by:
        getCopyingJobTasks in interface WORemote
        Returns:
        the copying job tasks
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        psdi.app.workorder.WO#getcopyingJobTasks
      • getCopyingWorkPlanAssignments

        public boolean getCopyingWorkPlanAssignments()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Gets the copying work plan assignments.
        Returns:
        the copying work plan assignments
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • setParentValuesForNestedjpWO

        public void setParentValuesForNestedjpWO(MboRemote newChild,
                                                 MboRemote parent)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • generateTaskID

        public void generateTaskID()
                            throws MXException,
                                   java.rmi.RemoteException
        Sets this work order's task ID to the next task ID value for the parent work order. This method can only be called from a work order in the children's set of another work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • setJobPlanFieldFlag

        public void setJobPlanFieldFlag()
                                 throws MXException,
                                        java.rmi.RemoteException
        Sets the READONLY flag on or off for the jpnum attribute. Special function b/c this test is very expensive. Don't want to examine the JPNum if it isn't visible.
        Throws:
        MXException
        java.rmi.RemoteException
      • startWFOnWoReqSave

        public boolean startWFOnWoReqSave()
                                   throws MXException,
                                          java.rmi.RemoteException
        Return in work request applications should start workflow when work request is created.
        Specified by:
        startWFOnWoReqSave in interface WORemote
        Returns:
        true if work request applications should start workflow when work request is created.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.startWFOnWoReqSave()
      • incrEstLabCost

        public void incrEstLabCost(double incrAmount,
                                   boolean isExternal)
                            throws MXException,
                                   java.rmi.RemoteException
        Increments/Decrements the estimated labor cost that is associated with the work order. Will also modify the estimated internal or external labor cost based on the isExternal flag (e.g. if a labor is associated with a vendor, then its external). Use this method if there is a taskid associated with the labor.
        Parameters:
        incrAmount -
        isExternal -
        Throws:
        MXException
        java.rmi.RemoteException
      • incrEstLabHours

        public void incrEstLabHours(double incrAmount,
                                    boolean isExternal)
                             throws MXException,
                                    java.rmi.RemoteException
        Used to increment/decrement the estimated labor hours on the work order. Will also modify the the estimated internal or external labor hours based on the isExternal flag (e.g. if a labor is associated with a vendor, then its external). Use this method if there is a taskid associated with the labor.
        Parameters:
        incrAmount - The amount to increment/decrement by
        isExternal - If the amount that is being changed belongs to an external resources or not
        Throws:
        MXException
        java.rmi.RemoteException
      • incrEstToolCost

        public void incrEstToolCost(double incrAmount)
                             throws MXException,
                                    java.rmi.RemoteException
        Adds to the work order's estimated tool cost from outside the object. For internal use only.
        Parameters:
        incrAmount - The amount to add to EstToolCost.
        Throws:
        MXException
        java.rmi.RemoteException
      • incrEstMatCost

        public void incrEstMatCost(double incrAmount)
                            throws MXException,
                                   java.rmi.RemoteException
        Adds to the work order's estimated material cost from outside the object. For internal use only.
        Parameters:
        incrAmount - The amount to add to EstMatCost.
        Throws:
        MXException
        java.rmi.RemoteException
      • incrEstServCost

        public void incrEstServCost(double incrAmount)
                             throws MXException,
                                    java.rmi.RemoteException
        Adds to the WO's EstServCost attribute from outside object. The estimated service cost total is different from the other estimate totals in that what it totals is outside of the work order package, specifically POLines. Once the total is incremented from a POLine, the total becomes read/only. This method assumes that a POLine Mbo is doing the updating.
        Specified by:
        incrEstServCost in interface WORemote
        Parameters:
        incrAmount - The amount to add to EstServCost.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.incrEstServCost(double incrAmount)
      • incrActMatCost

        public void incrActMatCost(double incrAmount,
                                   boolean isOutsideCost)
                            throws MXException,
                                   java.rmi.RemoteException
        Adds to the work order's actual material cost from outside the object. Note that this will allow the update of a closed work order although trying to update a canceled work order will throw an exception.
        Specified by:
        incrActMatCost in interface WORemote
        Parameters:
        isOutsideCost - Specify if it is a outside cost
        incrAmount - The amount to add to ActMatCost.
        Throws:
        MXApplicationException - CanceledNoActuals when this workorder is cancelled.
        MXException
        java.rmi.RemoteException
        See Also:
        WO.incrActMatCost(double incrAmount, boolean isOutsideCost)
      • incrActLabCost

        public void incrActLabCost(double incrAmount,
                                   boolean isOutsideCost)
                            throws MXException,
                                   java.rmi.RemoteException
        Adds to the work order's actual labor cost from outside the object. Note that this throw an exception if the work order is in history.
        Specified by:
        incrActLabCost in interface WORemote
        Parameters:
        isOutsideCost - Specify if it is a outside cost
        incrAmount - The amount to add to ActLabCost.
        Throws:
        MXApplicationException - HistoryNoActuals when this workorder is a history record.
        MXException
        java.rmi.RemoteException
        See Also:
        WO.incrActLabCost(double incrAmount, boolean isOutsideCost)
      • incrActServCost

        public void incrActServCost(double incrAmount)
                             throws MXException,
                                    java.rmi.RemoteException
        Adds to the work order's actual service cost from outside the object. Note that this throw an exception if the work order has been cancelled. Note that this allows updates of closed work orders, which is normally not allowed.
        Specified by:
        incrActServCost in interface WORemote
        Parameters:
        incrAmount - The amount to add to ActServCost.
        Throws:
        MXApplicationException - CanceledNoActuals when this workorder is canceled.
        MXException
        java.rmi.RemoteException
        See Also:
        WO.incrActServCost(double incrAmount)
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validates the Order for work order attributes.
        Overrides:
        getValidateOrder in class Mbo
      • isCanceled

        public boolean isCanceled()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns true if this work order was canceled.
        Returns:
        true if this work order was canceled
        Throws:
        MXException
        java.rmi.RemoteException
      • isAssetChargeStore

        public boolean isAssetChargeStore()
                                   throws java.rmi.RemoteException,
                                          MXException
        Examines the work order's asset to see if it could be on a charge to store work order. The WO's asset must rotating to be charge to store. If the work order's assetis in inventory, the WO can't be charge to store. Also, capitialized rotating items can not be charged to store. The method throws no exceptions itself.
        Specified by:
        isAssetChargeStore in interface WORemote
        Returns:
        true if the WO can be charge to store.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        FldWOChargeStore, psdi.app.workorder.FldWOassetnum, This method performs the tests.
      • canChargeStore

        public boolean canChargeStore()
                               throws java.rmi.RemoteException,
                                      MXException
        Determines whether this work order can be charged to store.
        Specified by:
        canChargeStore in interface WORemote
        Returns:
        true if this work order can be charged to store. If there's any reason the work order can't be charge to store, an exception is thrown.
        Throws:
        MXApplicationException - Thrown with one of the following:
        group: "workorder", key: "CSassetnum", parameters( wonum )
        group: "workorder", key: "CSRotate", parameters( wonum, assetnum )
        group: "workorder", key: "CSCapitalized", parameters( wonum, assetnum )
        group: "workorder", key: "CSInventory", parameters( wonum, assetnum )
        java.rmi.RemoteException
        MXException
        See Also:
        FldWOChargeStore, psdi.app.workorder.FldWOassetnum, The method only returns true or false, without throwing exceptions.
      • calcGLAccount

        public void calcGLAccount()
                           throws java.rmi.RemoteException,
                                  MXException
        Sets the GL Account attribute based on the Asset/Loc/ChargeStore attribute values.
        Throws:
        java.rmi.RemoteException
        MXException
      • getSubWorkOrders

        public MboSetRemote getSubWorkOrders()
                                      throws java.rmi.RemoteException,
                                             MXException
        Returns the mboset of sub-work orders under this work order. This simply returns the MboSet defined by the CHILDREN relationship.
        Specified by:
        getSubWorkOrders in interface WORemote
        Returns:
        the mboset of sub-work orders under this work order.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.getSubWorkOrders()
      • canApplyRoute

        public void canApplyRoute(long accessModifier)
                           throws java.rmi.RemoteException,
                                  MXException
        Determines if this user can apply a route to the work order. The flag allows for the overriding of the signature security check. The work order must be open and not a detail work order.
        Specified by:
        canApplyRoute in interface WORemote
        Parameters:
        accessModifier - If this value contains the value NOACCESSCHECK, no check is made against signature security.
        Throws:
        MXApplicationException - ClosedNoRoute when this workorder is a history record.
        java.rmi.RemoteException
        MXException
        See Also:
        WO.canApplyRoute(long accessModifier)
      • canApplyRoute

        public void canApplyRoute(java.lang.String routeID,
                                  long accessModifier)
                           throws java.rmi.RemoteException,
                                  MXException
        Determines if this route can be applied to the work order. The flag allows for the overriding of the signature security check. If this work order has child work orders, then the route must consist of the same type of work order, detail wise. (awk!)
        Specified by:
        canApplyRoute in interface WORemote
        Parameters:
        routeID - The route to apply to this work order.
        accessModifier - If this value contains the value NOACCESSCHECK, no check is made against signature security.
        Throws:
        MXApplicationException - RouteNotFound when the Route does not exist.
        java.rmi.RemoteException
        MXException
        See Also:
        This test is performed as part of this method.
      • applyRoute

        public void applyRoute(java.lang.String routeID,
                               java.lang.String storeLoc)
                        throws java.rmi.RemoteException,
                               MXException
        Applies the route to this work order.
        Specified by:
        applyRoute in interface WORemote
        Parameters:
        routeID - The route to apply to this work order.
        storeLoc - The store location for WPMaterial records which need a storeroom.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        This method is called with the flag set to NONE.
      • applyRoute

        public void applyRoute(java.lang.String routeID,
                               java.lang.String storeLoc,
                               java.lang.String storeLocSite)
                        throws java.rmi.RemoteException,
                               MXException
        Applies the route to this work order.
        Specified by:
        applyRoute in interface WORemote
        Parameters:
        routeID - The route to apply to this work order.
        storeLoc - The store location for WPMaterial records which need a storeroom.
        storeLocSite - The storeromm's Site for WPMaterial records.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        This method is called with the flag set to NONE.
      • applyRoute

        public void applyRoute(java.lang.String routeID,
                               java.lang.String storeLoc,
                               java.lang.String storeLocSite,
                               long accessModifier)
                        throws java.rmi.RemoteException,
                               MXException
        Applies the route to this work order. The flag allows for the overriding of the signature security check.
        Specified by:
        applyRoute in interface WORemote
        Parameters:
        routeID - The route to apply to this work order.
        storeLoc - The store location for WPMaterial records which need a storeroom.
        storeLocSite - The storeromm's Site for WPMaterial records.
        accessModifier - If this value contains the value NOACCESSCHECK, no check is made against signature security.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        This method is called before the route is applied.
      • applyRoute

        public void applyRoute(java.lang.String routeID,
                               java.lang.String storeLoc,
                               java.lang.String storeLocSite,
                               long accessModifier,
                               MboSetRemote infoSet)
                        throws java.rmi.RemoteException,
                               MXException
        Applies the route to this work order. The route sub-work orders are added to the set supplied, and are not saved. The flag allows for the overriding of the signature security check. This method is used when the new work orders should not be saved after being created.
        Specified by:
        applyRoute in interface WORemote
        Parameters:
        routeID - The route to apply to this work order.
        storeLoc - The store location for WPMaterial records which need a storeroom.
        storeLocSite - The storeromm's Site for WPMaterial records.
        accessModifier - If this value contains the value NOACCESSCHECK, no check is made against signature security.
        infoSet - If not null, this is the set to add the work order information to.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        This method is called before the route is applied., PM.calculateWork(boolean, java.util.Date)
      • calculateTargetComplete

        protected void calculateTargetComplete()
                                        throws MXException,
                                               java.rmi.RemoteException
        Calculates the value for TargCompDate by adding the EstDur to TargStartDate. Used to calculate the initial value for this attribute.
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateTaskTargetComplete

        protected void calculateTaskTargetComplete(WORemote newChild)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Calculates the value for TargCompDate on the Task by adding the Tasks EstDur to TargStartDate.
        Throws:
        MXException
        java.rmi.RemoteException
      • getGrandTotals

        public java.util.Vector getGrandTotals()
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns a vector of the totals to view the hierarchy grand totals. The totals are added to the vector in the following order: estlabhrs, estatapprlabhrs, actlabhrs, estlabcost, estatapprlabcost, actlabcost, estmatcost, estatapprmatcost, actmatcost, esttoolcost, estatapprtoolcost, acttoolcost, estservcost, estatapprservcost, actservcost, esttotalcost, estatapprtotalcost, acttotalcost.
        Specified by:
        getGrandTotals in interface WORemote
        Returns:
        A vector of the totals.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.getGrandTotals()
      • getDuplicated

        public boolean getDuplicated()
        get the duplicated.
      • setDuplicated

        public void setDuplicated(boolean duplicated)
        get the duplicated.
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Creates a duplicate workOrder with its related objects.
        The duplicated workorder's wonum will be an autokeyed value or just leave it blank if the autokey is off.
        The duplicated workorder will have INPRG status and the related objects being duplicated will include the linked documents(Doclinks object), related work plans( WPMaterial, WPLabor, WPTool, and Assignment objects) and safety plans(WoSafetyPlan, WoSafetyLink, WoHazard, WoHazardPrec, WoPreccaution, WoTagOut, WoTagLock, WoLockOut objects).
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated MboRemote workorder
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.copyWorkPlans(psdi.mbo.MboRemote, boolean), WO.copySafetyPlans(psdi.mbo.MboRemote)
      • loadSkipFieldCopyHashSet

        protected void loadSkipFieldCopyHashSet()
                                         throws MXException,
                                                java.rmi.RemoteException
        Loads the static HashSet with the names of the fields whose values need not be copied from the source Mbo to the target Mbo when a duplicate operation is performed. As an example the statusdate is one of the fields that need not be copied and the hashSet is loaded in the following way skipFieldCopy.add("STATUSDATE") The following is a list of fields that are not copied from the source workorder to the target workorder and these are the field names that are loaded into the HashSet.
        1. WONUM
        2. HISTORYFLAG
        3. STATUS
        4. STATUSDATE
        5. CHANGEDATE
        6. CHANGEBY
        7. REPORTDATE
        8. REPORTEDBY
        9. HASCHILDREN
        10. HASFOLLOWUPWORK
        11. TASKID
        12. ACTSTART
        13. ACTFINISH
        14. ACTLABHRS
        15. ACTLABCOST
        16. ACTMATCOST
        17. ACTTOOLCOST
        18. ACTSERVCOST
        19. ACTTOTALCOST
        20. ESTATAPPRLABHRS
        21. ESTATAPPRLABCOST
        22. ESTATAPPRMATCOST
        23. ESTATAPPRTOOLCOST
        24. ESTATAPPRSERVCOST
        25. ESTATAPPRTOTALVCOST
        26. PMNUM
        27. PARENT
        28. WOSEQUENCE
        29. PROBLEMCODE
        30. ESTLABHRS
        31. TARGCOMPDATE
        32. TARGSTARTDATE
        33. SCHEDSTART
        34. SCHEDFINISH
        35. OUTLABCOST
        36. OUTTOOLCOST
        37. OUTMATCOST
        38. OBSERVATION
        39. MEASUREMENTVALUE
        40. MEASUREDATE
        41. CALCPRIORITY
        42. FAILURECODE
        43. SNECONSTRAINT
        44. FNLCONSTRAINT
        45. REPAIRLOCFLAG
        46. REPAIRFACILITY
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.skipCopyField(psdi.mbo.MboValueInfo), WO.skipCopyField(psdi.mbo.MboValueInfo), WO.duplicate()
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are Workorder fields will be skipped without being copied to the newly duplicated workorder
        1. WONUM
        2. HISTORYFLAG
        3. STATUS
        4. STATUSDATE
        5. CHANGEDATE
        6. CHANGEBY
        7. REPORTDATE
        8. REPORTEDBY
        9. WFACTIVE
        10. WFID
        11. CHARGESTORE
        12. HASCHILDREN
        13. HASFOLLOWUPWORK
        14. ISTASK
        15. ACTSTART
        16. ACTFINISH
        17. ACTLABHRS
        18. ACTLABCOST
        19. ACTMATCOST
        20. ACTTOOLCOST
        21. ACTSERVCOST
        22. ACTTOTALCOST
        23. ESTATAPPRLABHRS
        24. ESTATAPPRLABCOST
        25. ESTATAPPRMATCOST
        26. ESTATAPPRTOOLCOST
        27. ESTATAPPRSERVCOST
        28. ESTATAPPRTOTALCOST
        29. PMNUM
        30. PARENT
        31. WOSEQUENCE
        32. PROBLEMCODE
        33. OUTLABCOST
        34. OUTTOOLCOST
        35. OUTMATCOST
        36. OBSERVATION
        37. MEASUREMENTVALUE
        38. MEASUREDATE
        39. FAILURECODE
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        The - MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.loadSkipFieldCopyHashSet()
      • canGenFollowUpWo

        public void canGenFollowUpWo()
                              throws java.rmi.RemoteException,
                                     MXException
        Determines if this workorder can generate a followup workorder. Only if the current workorder is not in history, not in status of 'WAPPR' and not a followup workorder(origrecordid is null).
        Specified by:
        canGenFollowUpWo in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.canGenFollowUpWo()
      • genFollowUpWo

        public MboRemote genFollowUpWo()
                                throws java.rmi.RemoteException,
                                       MXException
        Generates a followUp workorder with its related objects.
        The generated followUp workorder number will be an autokeyed value or just leave it blank if the autokey is off.
        The followUp workorder will have WAPPR status and the related objects being copyed will include the linked documents(Doclinks object), the work plans and safety plans will not be copyed and the job plan number will be cleared(set to null) and the estimate labor hours, labor cost, material cost and tool cost of the followup workorder will be cleared( set to zero).
        The hasFollowUpWork attribute of the workorder which generate this followup workorder will be set to true.
        The origrecordid attribute of the newly generated followup workorder will be set to the work order number of the workorder which generate this followup workorder.
        Specified by:
        genFollowUpWo in interface WORemote
        Returns:
        MboRemote the generated followup workorder.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        #copyWorkPlans., #copySafetyPlans.
      • setSafetyPlanFieldFlag

        public void setSafetyPlanFieldFlag()
                                    throws MXException,
                                           java.rmi.RemoteException
        Sets the READONLY flag on or off for the safetyplanid non-persistent attribute. Called from field validation class FldWOSafetyPlanID and setFieldEditibilityFlags.
        Throws:
        MXException
        java.rmi.RemoteException
      • isTop

        public boolean isTop()
                      throws MXException,
                             java.rmi.RemoteException
        This method indicates if the Mbo is at the top level of a hierarchy.
        Specified by:
        isTop in interface HierarchicalMboRemote
        Returns:
        Returns true if Mbo is top level.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasChildren

        public boolean hasChildren()
                            throws MXException,
                                   java.rmi.RemoteException
        Indicates that this Mbo has Mbos underneth it in the hierarchy
        Specified by:
        hasChildren in interface HierarchicalMboRemote
        Returns:
        Returns true if the Mbo has sub-Mbos
        Throws:
        MXException
        java.rmi.RemoteException
      • hasParents

        public boolean hasParents()
                           throws MXException,
                                  java.rmi.RemoteException
        Indicates that this Mbo is owned by another Mbo in the hierarchy.
        Specified by:
        hasParents in interface HierarchicalMboRemote
        Returns:
        Returns true if the Mbo has a parent.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasSafetyPlan

        public boolean hasSafetyPlan()
                              throws MXException,
                                     java.rmi.RemoteException
        Indicates that this WO has a Safety Plan and/or Safety Plan ID.
        Returns:
        Returns true if the WO has a Safety Plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • getChildren

        public MboSetRemote getChildren()
                                 throws MXException,
                                        java.rmi.RemoteException
        Gets the MboSet representing the children of this Mbo in the hierarchy. Uses the relationship named CHILDREN.
        Returns:
        Children MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
      • getChildNoTask

        public MboSetRemote getChildNoTask()
                                    throws MXException,
                                           java.rmi.RemoteException
        Gets the MboSet representing the children of this Mbo in the hierarchy. Uses the relationship named CHILDNOTASK.
        Returns:
        Children MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTasksOnly

        public MboSetRemote getTasksOnly()
                                  throws MXException,
                                         java.rmi.RemoteException
        Gets the MboSet representing the children of this Mbo in the hierarchy. Uses the relationship named CHILDNOTASK.
        Returns:
        Children MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
      • getParents

        public MboSetRemote getParents()
                                throws MXException,
                                       java.rmi.RemoteException
        Gets the MboSet representing the parents of this Mbo in the hierarchy. Usually this set consists of zero or one members. Uses the relationship named PARENT.
        Returns:
        Parent MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • getTop

        public MboSetRemote getTop()
                            throws MXException,
                                   java.rmi.RemoteException
        Gets the MboSet representing top-level Mbos above this Mbo in the hierarchy. Usually this set consists of one member. If the Mbo is top-level the set will contain this Mbo.
        Returns:
        Top-Level MboSet
        Throws:
        MXException
        java.rmi.RemoteException
      • getHierarchies

        public java.lang.String[] getHierarchies()
                                          throws MXException,
                                                 java.rmi.RemoteException
        For Mbos that support multiple hiearchies, this method returns the names of all the hierarchy this Mbo is a member of. There may be zero to many values in the array returned.
        Returns:
        Array of hierarchy names. Null if multiple hierarchies is not supported.
        Throws:
        MXException
        java.rmi.RemoteException
      • enterQuickReportingMode

        public void enterQuickReportingMode()
                                     throws MXException,
                                            java.rmi.RemoteException
        Sets up a work order for use in QuickReporting applications. This method turns on QuickReporting mode and changes the work order's status to In Progress. Before the work order is saved, one of the following attributes must have a validated value: assetnum, Location, or GLAccount. This method is only availible for newly created work orders.
        Specified by:
        enterQuickReportingMode in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.enterQuickReportingMode()
      • isApproved

        public boolean isApproved()
                           throws MXException,
                                  java.rmi.RemoteException
        This method determines whether the work order is in an approved state. The work order can't be in history, closed, canceled, and it must not be in waiting for approval status. This define matches the criteria defined by critAPPROVED in the WOService.
        Specified by:
        isApproved in interface WORemote
        Returns:
        True if the work order is in a approved state.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.isApproved()
      • getTaskForWonum

        public java.lang.String getTaskForWonum(java.lang.String wonum)
                                         throws MXException,
                                                java.rmi.RemoteException
        Gives the proper TaskID for a work plan record, given the work order number. Used in combined parent/children displays. The taskID for the parent work order returned as null, while the children return their taskIDs.
        Parameters:
        wonum - The wonum to figure out the task ID for.
        Returns:
        The TaskID value representing that work order.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Uses this to figure out it's value.
      • getWOforTask

        public MboRemote getWOforTask(java.lang.String task)
                               throws MXException,
                                      java.rmi.RemoteException
        Finds the work order given a task ID. Used in combined parent/children displays. Null or an empty string returns the parent work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWOforWonum

        public WORemote getWOforWonum(java.lang.String wonum)
                               throws MXException,
                                      java.rmi.RemoteException
        Finds the work order given a work order number.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWOClassDescription

        public java.lang.String getWOClassDescription(MboRemote theMboRemote)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Gets the wO class description.
        Specified by:
        getWOClassDescription in interface WORemote
        Parameters:
        theMboRemote - the the mbo remote
        Returns:
        the wO class description
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        added for issue 79047
      • changeWorkOrderParent

        public void changeWorkOrderParent(MboRemote woparent)
                                   throws MXException,
                                          java.rmi.RemoteException
        Changes this work order's parent to point to the work order passed as a parameter.
        Specified by:
        changeWorkOrderParent in interface WORemote
        Parameters:
        woparent - The new parent of this work order.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#changeWorkOrderParent()
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is called by everything except haveReceivedDirectIssue We pass in false to say that we are not coming from Receiving.
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        status - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        date - The effective date of the new status ( java.util.Date). If null the current date/time is used.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        accessModifier - A value of NOACCESSCHECK will cause the method not to call canChangeStatus. Callers using this flag are responsible for ensuring that they are attempting a valid status change.
        Throws:
        MXException - Thrown if there is a problem, or the status cannot be changed, as determined by canChangeStatus(String).
        java.rmi.RemoteException
        See Also:
        Determines whether the work order can change status.
      • changeStatus

        public void changeStatus(java.lang.String status,
                                 java.util.Date date,
                                 java.lang.String memo,
                                 long accessModifier,
                                 boolean comingFromReceiving)
                          throws MXException,
                                 java.rmi.RemoteException
        This method is overridden to support changing the status of work order hierarchies. If this work order throws an exception instead of changing status, it's children's status isn't changed.
        Parameters:
        status - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        date - The effective date of the new status ( java.util.Date). If null the current date/time is used.
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        comingFromReceiving - If this flag is set then don't update the children regardless of how the hasChildren flag is set.
        Throws:
        MXException - Thrown if there is a problem, or the status cannot be changed, as determined by canChangeStatus(String).
        java.rmi.RemoteException
        See Also:
        Determines whether the work order can change status.
      • changeChildrenStatus

        public void changeChildrenStatus()
                                  throws MXException,
                                         java.rmi.RemoteException
        Changes the status of the work orders directly beneath this one. The ParentChgsStatus flag is evaluated on each child work order. Child work orders with a true flag will allow their status to be changed to match the status of their parent. Exceptions thrown during the status changes are written to the warnings list.
        Parameters:
        status - The new desired status.
        date - The effective date of the new status.
        memo - A string briefly describing the circumstances of the change.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Referenced., Also referenced.
      • getParentMbo

        public WO getParentMbo()
                        throws MXException,
                               java.rmi.RemoteException
        Returns the work order which is the parent of a parent + children combined display. Either returns this work order or it's parent.
        Returns:
        The parent work order Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getWoFromCombined

        public WORemote getWoFromCombined(java.lang.String findWonum)
                                   throws MXException,
                                          java.rmi.RemoteException
        Looks up the wonum from the parent and children set and returns the one with the matching wonum.
        Specified by:
        getWoFromCombined in interface WORemote
        Parameters:
        findWonum - The wonum of the work order to return.
        Returns:
        The found WO or null if not found.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#getWoFromCombined()
      • removeSafetyPlan

        public void removeSafetyPlan()
                              throws MXException,
                                     java.rmi.RemoteException
        Allows the user to remove the current safety plans and clear the Safety Plan field (non-persistent attribute safetyplanid). The workorder must be waiting for approval (WAPPR status). If removal is allowed, the safetyplanid is set to null.
        Specified by:
        removeSafetyPlan in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.canRemoveSafetyPlan()
      • canReportDowntime

        public void canReportDowntime()
                               throws MXException,
                                      java.rmi.RemoteException
        If this work order does not have asset, or if its in a history status then it cannot report down time. Also, check that all required fields are populated before presenting Report Downtime dialog.
        Specified by:
        canReportDowntime in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.canReportDowntime()
      • getOwnSet

        public MboSetRemote getOwnSet()
                               throws MXException,
                                      java.rmi.RemoteException
        Creates a MboSetRemote containing this single Mbo. Probably the current MboSet should be saved before calling this method.
        Specified by:
        getOwnSet in interface WORemote
        Returns:
        The MboSetRemote containing this Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.getOwnSet()
      • setAttrFromWoGen

        public void setAttrFromWoGen(MboRemote woGen)
                              throws java.rmi.RemoteException,
                                     MXException
        Generate work order from PM and set the values for the attributes. Although this method sets the value of the Parent attribute, it ignores that field's validation and business rules. MboRemote woGen
        Specified by:
        setAttrFromWoGen in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
      • getECommHelperRemote

        public ECommHelperRemote getECommHelperRemote()
                                               throws java.rmi.RemoteException
        Gets the e comm helper remote.
        Specified by:
        getECommHelperRemote in interface WORemote
        Returns:
        the e comm helper remote
        Throws:
        java.rmi.RemoteException - the remote exception
        See Also:
        psdi.app.mr.WO#getECommHelperRemote
      • editHistory

        public void editHistory()
                         throws MXException,
                                java.rmi.RemoteException
        method which provides ability to edit certain fields on work orders while they are in closed status. This ability will be provided for only those work orders which have "CLOSE" status. When invoked, the user will see the following fields as editable. If any changes are made while using Edit History, a WOSTATUS transaction will be written upon save. The user can edit a single record at the time and need to save before editing the other records. The columns which are editable in "EditHistory" mode are: "ACTFINISH", "ACTSTART", "CALENDAR", "CHANGEBY", "CHANGEDATE", "CONTRACT", "CREWID", "DESCRIPTION", "DOWNTIME", "ESTDUR", "FAILDATE", "FAILURECODE", "INTERRUPTIBLE", "PHONE", "PROBLEMCODE", "REMDUR", "REPORTEDBY", "REPORTDATE", "SCHEDFINISH", "SCHEDSTART", "SUPERVISOR", "TARGCOMPDATE", "TARGSTARTDATE", "WOLABLNK", "WOPRIORITY", "WORKTYPE", "OWNER", "OWNERGROUP"
        Specified by:
        editHistory in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.editHistory()
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for Wonum.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "wonum" or else nothing will be propagated.
        keyValue - The new value of wonum.
        Throws:
        MXException
        java.rmi.RemoteException
      • getPM

        public PMRemote getPM()
                       throws MXException,
                              java.rmi.RemoteException
        get the related PM mbo
        Returns:
        the related PM mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getAsset

        public AssetRemote getAsset()
                             throws MXException,
                                    java.rmi.RemoteException
        get the related asset mbo
        Returns:
        the related asset mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        override delete to delete this and records associated with this work order task
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        override undelete method to undelete this and associated records
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • copyMatUseTransToToolTransSet

        public void copyMatUseTransToToolTransSet(MboSetRemote matUseTransSet)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Copies the passed tool set to tool trans set.
        Specified by:
        copyMatUseTransToToolTransSet in interface WORemote
        Parameters:
        toolSet - the tool set to be copied.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyMRLineToPlanMaterialSet

        public void copyMRLineToPlanMaterialSet(MboSetRemote mrLineSet)
                                         throws MXException,
                                                java.rmi.RemoteException
        Copies the selected Requisitions set to Planned material set.
        Specified by:
        copyMRLineToPlanMaterialSet in interface WORemote
        Parameters:
        mrLineSet - the work plan MRLine set to be copied.
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Overridden to support faux MboSets
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        name - The relationship provided to retrieve a related mboSet, usually using foreign keys. For example, "psdi.app.workorder.WOSetRemote.ASSET" is a relationship for the work order object to access the asset Set where "workorder.assetnum=asset.assetnum". The relationship can also be chained. Such as ASSET.ASSETSTATUS.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        MXException - "A relationship called {0} does not exist for the {1} business object" exception will be thrown if the relationship was not found. "Unknown Object" exception will be thrown if the database object can not be found through the relationship.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String)
      • getPRTotal

        public double getPRTotal()
                          throws MXException,
                                 java.rmi.RemoteException
        Gets the total PR cost for this workorder.
        Specified by:
        getPRTotal in interface WORemote
        Returns:
        total PR cost
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#getPRotal
      • makeSelectedChildren

        public void makeSelectedChildren(MboSetRemote selectSet)
                                  throws MXException,
                                         java.rmi.RemoteException
        Attempts to make all selected work orders in the set children of this set. If a selected work order isn't valid child of this work order, it is not made a child, but this method won't throw an exception. This WO must be saved in order to call this method, otherwise an exception will be thrown. This Mbo should be refetched from the database after this method is called.
        Specified by:
        makeSelectedChildren in interface WORemote
        Parameters:
        selectSet - The set with selected work orders.
        Throws:
        MXApplicationException - Thrown with "workorder", "UnsavedNoUsage" if this Mbo has unsaved changes.
        MXException
        java.rmi.RemoteException
        See Also:
        Any work orders that aren't valid children will have warnings in this Mbo's MboSet.
      • makeSelectedChildren

        public void makeSelectedChildren(MboSetRemote selectSet,
                                         java.lang.String dialogLabel)
                                  throws MXException,
                                         java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • canRemoveWorkPlan

        public void canRemoveWorkPlan()
                               throws MXException,
                                      java.rmi.RemoteException
        Determines whether the remove work plan option is valid.
        Throws:
        MXAccessException - With "workorder","removeworkplan" if the work plan may not be removed
        MXException
        java.rmi.RemoteException
      • removeWorkPlan

        public boolean removeWorkPlan()
                               throws MXException,
                                      java.rmi.RemoteException
        Allows the user to remove the current work plan and clear the JobPlan field (jpnum). The workorder must be waiting for approval (WAPPR status).
        Specified by:
        removeWorkPlan in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.removeWorkPlan()
      • hasActuals

        public boolean hasActuals()
                           throws MXException,
                                  java.rmi.RemoteException
        Determines whether this work order has any actuals.
        Returns:
        true if this work order has actuals.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasPlanMoveModify

        public boolean hasPlanMoveModify()
                                  throws MXException,
                                         java.rmi.RemoteException
        Determines whether this work order has any plan move/modify.
        Returns:
        true if this work order has plan move/modify.
        Throws:
        MXException
        java.rmi.RemoteException
      • promptForDowntimeReport

        public boolean promptForDowntimeReport(java.lang.String newStatus)
                                        throws MXException,
                                               java.rmi.RemoteException
        Determines if the work order requires a downtime report. The DOWNPROMPT MaxVar or work order's WorkType attribute determines this. Task work orders are exempted from the rule. Prompting will only occur when the work order is Completed.
        Specified by:
        promptForDowntimeReport in interface WORemote
        Parameters:
        The - status the work order is changing to.
        Returns:
        true if a downtime report is required.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.promptForDowntimeReport(java.lang.String)
      • promptForFailureReport

        public boolean promptForFailureReport(java.lang.String newStatus)
                                       throws MXException,
                                              java.rmi.RemoteException
        Determines if the work order requires a failure report. The work order's WorkType attribute determines this. Task work orders are exempted from the rule. Prompting will only occur when the work order is Completed.
        Specified by:
        promptForFailureReport in interface WORemote
        Parameters:
        The - status the work order is changing to.
        Returns:
        true if a failure report is required.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.promptForFailureReport(java.lang.String)
      • createJPFromWO

        public MboRemote createJPFromWO(java.lang.String jpnum,
                                        java.lang.String description,
                                        java.lang.String longdescription)
                                 throws MXException,
                                        java.rmi.RemoteException
        An interface for UI to create a Job Plan from a Work Plan. It takes a Job Plan number and description as arguments.
        Specified by:
        createJPFromWO in interface WORemote
        Parameters:
        jpnum - the string that contains the new jpnum to be created that can be specified by the user
        description - the Job Plan's description
        longdescription - the Job Plan's longdescription
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.createJPFromWO(Date,String jpnum,String description, String longdescription)
      • createJPFromWO

        public MboRemote createJPFromWO(java.util.Date date,
                                        java.lang.String jpnum,
                                        java.lang.String description,
                                        java.lang.String longdescription)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method creates a Job Plan from this WO. If the specified Job Plan number is valid then the newly created Job Plan will have this number as the JPNUM. If the jpnum passed in to the method already exists, a JPNumAlreadyPresent would be thrown.
        Parameters:
        date - the date when the new JP is created
        jpnum - the string that contains the new jpnum to be created
        description - the JP's description
        longdescription - the JP's longdescription
        Throws:
        MXException
        java.rmi.RemoteException
      • createJPHeaderFromWO

        public Mbo createJPHeaderFromWO(java.lang.String jpnum,
                                        java.lang.String description,
                                        java.lang.String longdescription)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method copies the Work Order header info to a new Job Plan header. It takes the new JPNUM as the parameter and if one is not specified it is autokeyed. Call this method with a null value if you need the JPNUM to be autokeyed.
        Parameters:
        jpnum - the JPNUM of the newly created Job Plan. Pass null if the JPNUM is to be autokeyed.
        Returns:
        a new Job Plan header
        Throws:
        MXException
        java.rmi.RemoteException
      • createWorkorder

        public MboRemote createWorkorder()
                                  throws MXException,
                                         java.rmi.RemoteException
        creates a Workorder with WOCLASS=WORKORDER from any other WOCLASS (WORKORDER, CHANGE or RELEASE)
        Specified by:
        createWorkorder in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#createWorkOrder
      • createWorkorder

        public MboRemote createWorkorder(java.lang.String jpnum)
                                  throws MXException,
                                         java.rmi.RemoteException
        creates a Workorder with WOCLASS=WORKORDER from any other WOCLASS (WORKORDER, CHANGE or RELEASE)
        Specified by:
        createWorkorder in interface AppActionInterface
        Parameters:
        jpnum - -job plan need be apply to the new work order
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createChange

        public MboRemote createChange(java.lang.String jpnum)
                               throws MXException,
                                      java.rmi.RemoteException
        creates a Workorder with WOCLASS=CHANGE from any other WOCLASS (WORKORDER, CHANGE or RELEASE)
        Specified by:
        createChange in interface AppActionInterface
        Parameters:
        jpnum - Parameter that refers to a job plan, based on which the change is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createRelease

        public MboRemote createRelease(java.lang.String jpnum)
                                throws MXException,
                                       java.rmi.RemoteException
        creates a Workorder with WOCLASS=RELEASE from any other WOCLASS (WORKORDER, CHANGE or RELEASE)
        Specified by:
        createRelease in interface AppActionInterface
        Parameters:
        jpnum - Parameter that refers to a job plan, based on which the release is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createServiceRequest

        public MboRemote createServiceRequest(java.lang.String tickettemplateid)
                                       throws MXException,
                                              java.rmi.RemoteException
        creates a Ticket with Ticket Type = Service Request from a WO of any WOCLASS
        Specified by:
        createServiceRequest in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the service request is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createProblem

        public MboRemote createProblem(java.lang.String tickettemplateid)
                                throws MXException,
                                       java.rmi.RemoteException
        creates a Ticket with Ticket Type = Problem from a WO of any WOCLASS
        Specified by:
        createProblem in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the problem is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • createIncident

        public MboRemote createIncident(java.lang.String tickettemplateid)
                                 throws MXException,
                                        java.rmi.RemoteException
        creates a Ticket with Ticket Type = Incident from a WO of any WOCLASS
        Specified by:
        createIncident in interface AppActionInterface
        Parameters:
        tickettemplateid - Parameter that refers to a ticket template, based on which the incident is created.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • orphan

        public void orphan()
                    throws MXException,
                           java.rmi.RemoteException
        Deletes the parent child association and the deletes the parent work order.
        Specified by:
        orphan in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.orphan()
      • handleUndeleteTasks

        public void handleUndeleteTasks()
                                 throws MXException,
                                        java.rmi.RemoteException
        Undeletes the Work Order and its Tasks.
        Specified by:
        handleUndeleteTasks in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#handleundeleteTasks
      • deleteChildren

        public void deleteChildren(boolean task)
                            throws MXException,
                                   java.rmi.RemoteException
        Sets up the children hierarchy for deletion.
        Specified by:
        deleteChildren in interface WORemote
        Parameters:
        true - Prepared to delete the Task Workorders only.
        false - Prepares to delete both the Children and Task Work Orders
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.deleteChildren(boolean)
      • undeleteChildren

        public void undeleteChildren(boolean task)
                              throws MXException,
                                     java.rmi.RemoteException
        Sets up the children hierarchy for undelete.
        Parameters:
        task -
        Throws:
        MXException
        java.rmi.RemoteException
      • isWoAcceptsChargesEditable

        public boolean isWoAcceptsChargesEditable()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Determines the WoAcceptsCharges attribute READONLY status. WOAcceptsCharges is editable on a new WO WOAcceptsCharges is READONLY if the WO is NOT IN Waiting for Approved status (WAPPR). WOAcceptsCharges is READONLY if any charges exist for the work order WOAcceptsCharges is READONLY if there are any direct issue planned material WOAcceptsCharges is READONLY if there are any PO Lines that reference this work order
        Throws:
        MXException
        java.rmi.RemoteException
      • getTaskIdsThatAcceptCharges

        public java.lang.String getTaskIdsThatAcceptCharges()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Determines which tasks on a WO can accept charges
        Specified by:
        getTaskIdsThatAcceptCharges in interface WORemote
        Parameters:
        -
        Returns:
        String null if there are no tasks for this work order a comma delimited string of tasks that accept charges. "" if there are tasks but none accept charges. "ALL" if all the tasks accept charges.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.getTaskIdsThatAcceptCharges()
      • pmAlert

        public MboSetRemote pmAlert()
                             throws MXException,
                                    java.rmi.RemoteException
        This method retrieves a set of PMs that need to be alerted when PMAlert is turned on.
        Returns:
        pmSet Set of PMs that are to be alerted.
        Throws:
        MXException
        java.rmi.RemoteException
      • woCancel

        public boolean woCancel()
                         throws MXException,
                                java.rmi.RemoteException
        Rolls PM back to the state it was prior to generation of the work order that is being canceled. For time-based PMs PM.NEXTDATE,PM.EXTDATE (if applicable), and PM.LASTSTARTDATE will be updated. For meter-based PMs PMMETER.READINGATNEXTWO and PMMETER.LASTPMWOGENREAD will be updated. PM.PMCOUNTER AND PM.JPNUM will be updated for both time- and meter-based PMs.
        Specified by:
        woCancel in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.woCancel()
      • canEnterMeterReadings

        public void canEnterMeterReadings()
                                   throws MXException,
                                          java.rmi.RemoteException
        checks to make sure that there is an asset or location on the work order, and that the workorder's asset or location is associated with an active meter.
        Specified by:
        canEnterMeterReadings in interface WORemote
        Throws:
        MXApplicationException - ("workorder","NoAssetLoc") if there is not an asset or location on the workorder
        MXApplicationException - ("workorder","NoLocMeter") if there is a location on the work order that does not have any associated active meters
        MXApplicationException - ("workorder","NoAssetMeter") if there is an asset on the work order that does not have any associated active meters
        MXApplicationException - ("workorder","NoAssetOrLocMeter") if there is an asset and a location on the work order and neither is associated with any active meters
        MXException
        java.rmi.RemoteException
        See Also:
        WO.canEnterMeterReadings()
      • startTimer

        public void startTimer()
                        throws MXException,
                               java.rmi.RemoteException
        Method that will start the timer. If timer is already started, it will throw an exception
        Specified by:
        startTimer in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.labor.LabTransSet.startTimer
      • startTimer

        public void startTimer(java.util.Date startdatetime,
                               java.lang.Long anywhererefid,
                               java.lang.String transtype)
                        throws MXException,
                               java.rmi.RemoteException
        Method that will start the timer. If timer is already started, it will throw an exception
        Specified by:
        startTimer in interface WORemote
        Parameters:
        Date - startdatetime date and time to use for timer start
        Long - anywhererefid ID used by Maximo Mobile to sync records
        String - transtype labor transaction type
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.labor.LabTransSet.startTimer
      • stopTimer

        public MboRemote stopTimer(java.util.Date finishdatetime,
                                   boolean noStopTimerPopup)
                            throws MXException,
                                   java.rmi.RemoteException
        Method that will stop the timer as specified date time. If timer is not started, it will throw an exception.
        Specified by:
        stopTimer in interface WORemote
        Parameters:
        Date - targetDateTime date and time to set finishDate and finishTime with
        noStopTimerPopup - true no need popup on stop timer
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LabTransSet.stopTimer()
      • stopTimer

        public MboRemote stopTimer(java.util.Date finishdatetime,
                                   java.util.Date startDateTime,
                                   boolean noStopTimerPopup)
                            throws MXException,
                                   java.rmi.RemoteException
        Method that will stop the timer as specified date time. If timer is not started, it will throw an exception.
        Specified by:
        stopTimer in interface WORemote
        Parameters:
        Date - targetDateTime date and time to set finishDate and finishTime with
        Date - startDateTime date and time to set startDate and startTime with
        noStopTimerPopup - true no need popup on stop timer
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        LabTransSet.stopTimer()
      • updateWorkview

        public void updateWorkview()
                            throws MXException,
                                   java.rmi.RemoteException
        update crossover fields in workview table . This method is used in postcommit event when workorder got inserted or modified. If the implementtation have the crossover domain setup to cross over extra fields from workorder to workview, it will happens in this method.
        Throws:
        MXException
        java.rmi.RemoteException
      • applyOwner

        public void applyOwner(java.lang.String ownerID)
                        throws java.rmi.RemoteException,
                               MXException
        Apply an owner to a record.
        Specified by:
        applyOwner in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.app.workorder.WO#applyOwner()
      • applyOwnerGroup

        public void applyOwnerGroup(java.lang.String ownergroupID)
                             throws java.rmi.RemoteException,
                                    MXException
        Apply an ownergroup to a record.
        Specified by:
        applyOwnerGroup in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.app.workorder.WO#applyOwnerGroup()
      • applyAssignedOwnerGroup

        public void applyAssignedOwnerGroup(java.lang.String ownergroupID)
                                     throws java.rmi.RemoteException,
                                            MXException
        Apply an assigned owner group to a record. The AssignedOwnerGroup field holds the explicit current ownergroup ownership of this record.
        Specified by:
        applyAssignedOwnerGroup in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
      • moveModifyAssets

        public boolean moveModifyAssets(boolean checkonly)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method will move the assets and modify all assets and locations attributes as planned when checkonly is false, otherwise just return the flag see if there is any thing to move/modify.
        Parameters:
        checkonly - checkonly will check if we do move/modify or not
        Returns:
        if there is any move/modify planned
        Throws:
        java.rmi.RemoteException
        MXException
      • removeUserCust

        public void removeUserCust()
                            throws java.rmi.RemoteException,
                                   MXException
        This method will clear the the usercust modifications for assets and locations
        Throws:
        java.rmi.RemoteException
        MXException
      • removeUserCust

        public void removeUserCust(boolean removeAssetUserCustPlans,
                                   boolean removeLocUserCustPlans)
                            throws java.rmi.RemoteException,
                                   MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • removeUserCust

        public void removeUserCust(boolean removeAssetUserCustPlans,
                                   boolean removeLocUserCustPlans,
                                   MboRemote multiassetlocci)
                            throws java.rmi.RemoteException,
                                   MXException
        This method will clear the the usercust modifications for assets and locations.
        Parameters:
        removeAssetUserCustPlans - - the MultiAssetLocCI ASSETNUM has been set to null.
        removeLocUserCustPlans - - the MultiAssetLocCI LOCATION has been set to null.
        multiassetlocci - - the MultiAssetLocCI being modified. This can be null (for example, when this method is called during work order cancellation).
        Throws:
        java.rmi.RemoteException
        MXException
      • restoreUserCust

        public void restoreUserCust()
                             throws java.rmi.RemoteException,
                                    MXException
        used by MultiAssetLocCI undelete() to reverse changes made in delete() to prevent improper modifications to woassetusercust and wolocusercust
        Throws:
        java.rmi.RemoteException
        MXException
      • restoreUserCust

        public void restoreUserCust(MboRemote multiassetlocci)
                             throws java.rmi.RemoteException,
                                    MXException
        used by MultiAssetLocCI undelete() to reverse changes made in delete() to prevent improper modifications to woassetusercust and wolocusercust
        Throws:
        java.rmi.RemoteException
        MXException
      • clearMoveandDeleteAttrUpdate

        public void clearMoveandDeleteAttrUpdate()
                                          throws java.rmi.RemoteException,
                                                 MXException
        This method will modify the asset and location attributes
        Throws:
        java.rmi.RemoteException
        MXException
      • clearMoveAssetFields

        public void clearMoveAssetFields()
                                  throws java.rmi.RemoteException,
                                         MXException
        This method will modify the asset and location attributes
        Throws:
        java.rmi.RemoteException
        MXException
      • updateWarrantyContracts

        public void updateWarrantyContracts()
                                     throws java.rmi.RemoteException,
                                            MXException
        this method will repopulate the wocontract records for this work order, it's called from asset,location,reportdate,actstart field class.
        Throws:
        java.rmi.RemoteException
        MXException
      • getServiceContractInClause

        public java.lang.String getServiceContractInClause()
                                                    throws java.rmi.RemoteException,
                                                           MXException
        this method will populate the Service Contract inclause for this work order, it's called from wocontract field class.
        Throws:
        java.rmi.RemoteException
        MXException
      • getWODate

        public java.util.Date getWODate()
                                 throws java.rmi.RemoteException,
                                        MXException
        this method will return the date for search warranties.
        Returns:
        Date
        Throws:
        java.rmi.RemoteException
        MXException
      • getSafetyPlanID

        public java.lang.String getSafetyPlanID()
                                         throws MXException,
                                                java.rmi.RemoteException
        Determines the safety plan based on the Location, assetnum, and job plan, but DOES NOT set value for the workorder's safetyplanid. Called from FldWOAssetnum and other Field Validation classes Calls MboSet cleanup for the set of JpassetSpLink.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.cleanup()
      • copyWOToRelatedRecSet

        public void copyWOToRelatedRecSet(MboSetRemote woSet,
                                          boolean copyToParent)
                                   throws MXException,
                                          java.rmi.RemoteException
        Copies the passed work order set to related record set. IJ06338
        Parameters:
        WOSet - the work order set to be copied.
        copyToParent - - is the related record being generated against the parent of this WO?
        Throws:
        MXException
        java.rmi.RemoteException
      • updateOriginator

        public void updateOriginator()
                              throws MXException,
                                     java.rmi.RemoteException
        update originate record
        Parameters:
        laborSet - the labor set to be copied.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWOObjectName

        public java.lang.String getWOObjectName()
                                         throws MXException,
                                                java.rmi.RemoteException
        Gets the wO object name.
        Specified by:
        getWOObjectName in interface WORemote
        Returns:
        the wO object name
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getRecordMboName

        public java.lang.String getRecordMboName()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Gets the record mbo name.
        Overrides:
        getRecordMboName in class Mbo
        Returns:
        the record mbo name
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • setHashForSelectedRecord

        public void setHashForSelectedRecord(java.util.HashSet hs)
                                      throws MXException,
                                             java.rmi.RemoteException
        Sets the HashSet that contains the selected workorder object. Used in conjunction with Report Printing from the WO Change Status Dialog.
        Specified by:
        setHashForSelectedRecord in interface WORemote
        Parameters:
        hs -
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getHashForSelectedRecord

        public java.util.HashSet getHashForSelectedRecord()
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Returns the HashSet that contains the selected workorder object. Used in conjunction with Report Printing from the WO Change Status Dialog.
        Throws:
        MXException
        java.rmi.RemoteException
      • clearHashForSelectedRecord

        public void clearHashForSelectedRecord()
                                        throws MXException,
                                               java.rmi.RemoteException
        Clear hashSet so new mbo can be added and to release memory. Only one record will exist in hashSet.
        Throws:
        MXException
        java.rmi.RemoteException
      • relateWorkorders

        public MboSetRemote relateWorkorders(MboSetRemote woSet)
                                      throws java.rmi.RemoteException,
                                             MXException
        Refines the Work Order Set further removing any records that may have already been related.
        Specified by:
        relateWorkorders in interface WORemote
        Parameters:
        woSet - Work Order Set which has been filtered by a criteria such as Assetnum,Location, Commodity, etc..
        Returns:
        woSet Work Order Set with related records filtered out.
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • relateTickets

        public MboSetRemote relateTickets(MboSetRemote ticketSet)
                                   throws java.rmi.RemoteException,
                                          MXException
        Refines the Ticket Set further removing any records that may have already been related.
        Specified by:
        relateTickets in interface WORemote
        Parameters:
        ticketSet - Ticket Set which has been filtered by a criteria such as Affected User, Reportedby User, Commodity, etc..
        Returns:
        ticketSet Work Order Set with related records filtered out.
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • checkNestedJobPlans

        public boolean checkNestedJobPlans()
                                    throws java.rmi.RemoteException,
                                           MXException
        Check if nested jobplans are defined on the children of the workorder.
        Returns:
        true if nested jobplans found on the children
        Throws:
        java.rmi.RemoteException
        MXException
      • setRemoveWorkPlan

        public void setRemoveWorkPlan(boolean removeChildFlag)
                               throws java.rmi.RemoteException,
                                      MXException
        Sets the Remove Work Plan - Yes/No Dialog Flag
        Specified by:
        setRemoveWorkPlan in interface WORemote
        Parameters:
        removeChildFlag - - returns true, remove children and tasks by default.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.setRemoveWorkPlan(boolean)
      • getRemoveWorkPlan

        public boolean getRemoveWorkPlan()
                                  throws java.rmi.RemoteException,
                                         MXException
        Gets the Remove Work Plan flag that was set by the setRemoveWorkPlan method.
        Specified by:
        getRemoveWorkPlan in interface WORemote
        Returns:
        removeChildren - flag which determines if all children should be removed.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.getRemoveWorkPlan()
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        App validate.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • setmultiassetrecord

        public void setmultiassetrecord()
                                 throws MXException,
                                        java.rmi.RemoteException
        Setmultiassetrecord.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • copyWOFieldsToMultiAsset

        public void copyWOFieldsToMultiAsset(MultiAssetLocCIRemote multiAssetMbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Collect the fields that need to be copied from a work order to its MultiAssetLocCI record.
        Throws:
        MXException
        java.rmi.RemoteException
      • isLicensePresent

        public static boolean isLicensePresent(java.lang.String lic)
                                        throws MXException,
                                               java.rmi.RemoteException
        returns true if the license is present
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getFlowControlState

        public int getFlowControlState()
                                throws MXException,
                                       java.rmi.RemoteException
        Get the current state of this WO in the flow control process
        Throws:
        MXException
        java.rmi.RemoteException
      • getFlowControlState

        public int getFlowControlState(WO wo,
                                       java.lang.String status)
                                throws MXException,
                                       java.rmi.RemoteException
        Get the current state of this WO in the flow control process
        Parameters:
        status - The current status or the status this wo may be changing to
        Returns:
        FLOWCONTROLSUSPENDED The flow control on the work order is suspended
        Throws:
        MXException
        java.rmi.RemoteException
      • isFlowControlComplete

        public boolean isFlowControlComplete()
                                      throws MXException,
                                             java.rmi.RemoteException
        Helper method used to determine if the status is at or beyond the WorkType.COMPLETESTATUS value.
        A work order not in flow control or that has been cancelled or does not have a worktype with a start and complete status defined is considered complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • isFlowControlComplete

        public boolean isFlowControlComplete(WO wo,
                                             java.lang.String status)
                                      throws MXException,
                                             java.rmi.RemoteException
        Helper method used to determine if the status is at or beyond the WorkType.COMPLETESTATUS value.
        A work order not in flow control or that has been cancelled or does not have a worktype with a start and complete status defined is considered complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • getStartStatusForWorkType

        public java.lang.String getStartStatusForWorkType()
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Gets the start status for work type.
        Returns:
        the start status for work type
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getStartStatusForWorkType

        public java.lang.String getStartStatusForWorkType(WO wo)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Gets the start status for work type.
        Parameters:
        wo - the wo
        Returns:
        the start status for work type
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getCompleteStatusForWorkType

        public java.lang.String getCompleteStatusForWorkType()
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Gets the complete status for work type.
        Returns:
        the complete status for work type
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getCompleteStatusForWorkType

        public java.lang.String getCompleteStatusForWorkType(WO wo)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Gets the complete status for work type.
        Parameters:
        wo - the wo
        Returns:
        the complete status for work type
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getPredecessors

        public java.util.Vector getPredecessors()
                                         throws MXException,
                                                java.rmi.RemoteException
        Gets the predecessors.
        Returns:
        the predecessors
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getSuccessors

        public java.util.Vector getSuccessors()
                                       throws MXException,
                                              java.rmi.RemoteException
        Gets the successors.
        Returns:
        the successors
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getChildrenThatHaveNoPredecessors

        public java.util.Vector getChildrenThatHaveNoPredecessors()
                                                           throws MXException,
                                                                  java.rmi.RemoteException
        Gets the children that have no predecessors.
        Returns:
        the children that have no predecessors
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • suspendChildrensProcessFlow

        public void suspendChildrensProcessFlow(boolean torf)
                                         throws MXException,
                                                java.rmi.RemoteException
        Suspend childrens process flow.
        Parameters:
        torf - the torf
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • setChildrensFlowControl

        public void setChildrensFlowControl(boolean torf)
                                     throws MXException,
                                            java.rmi.RemoteException
        Sets the childrens flow control.
        Parameters:
        torf - the new childrens flow control
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • changeChildrensFieldValue

        public void changeChildrensFieldValue(java.lang.String fieldname,
                                              java.lang.String fieldvalue,
                                              long accessModifier)
                                       throws MXException,
                                              java.rmi.RemoteException
        Change childrens field value.
        Parameters:
        fieldname - the fieldname
        fieldvalue - the fieldvalue
        accessModifier - the access modifier
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • executeProcessFlowControlAction

        public void executeProcessFlowControlAction()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Execute process flow control action.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • changeStatusProcessFlowControl

        public void changeStatusProcessFlowControl()
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method is called from WOStatusChangeListener after the status of a workorder has been changed. This methodis the starting point for the Improved Sequencing / Enhanced Status Control Functionality.
        Throws:
        MXException
        java.rmi.RemoteException
      • startSuccessors

        public boolean startSuccessors(Mbo mbo,
                                       java.util.Vector successors,
                                       java.util.Date date,
                                       java.lang.String memo,
                                       long accessModifier)
                                throws MXException,
                                       java.rmi.RemoteException
        Try to start a list of successors for a given work order.
        If the successor has a FlowAction and FlowActionAssist is not checked then execute the action after the work order is started.
        Parameters:
        mbo - The work order that owns the successors
        successors - A vector holding a list of the successor work orders
        date - Status change date
        memo - Status memo
        accessModifier - Status access modifier
        Returns:
        true if at least one successor was started
        Throws:
        MXException
        java.rmi.RemoteException
      • adjustSuccVectors

        public void adjustSuccVectors(java.util.Vector existingSuccs,
                                      java.util.Vector newSuccs)
                               throws MXException,
                                      java.rmi.RemoteException
        Compares a new list of successor nodes to be started to the master list. If any repeats are found, they're removed from the new list. Any nodes on the new list that are not repeats are then added to the master list for future reference.
        Parameters:
        existingSuccs - A string vector: the wonums of successor nodes that we already know about
        newSuccs - A string vector: the wonums of a new list of successor nodes that are candidates for being started.
        Throws:
        MXException
        java.rmi.RemoteException
      • getSuccessorObjectForAction

        protected MboRemote getSuccessorObjectForAction(MboRemote successor)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Given a successor workorder object return the successor as a WORKORDER, WOACTIVITY, WOCHANGE or WORELEASE object.
        Parameters:
        A - successor workorder (as a WORKORDER object)
        Returns:
        The successor as a specific workorder object (a WORKORDER, WOACTIVITY, WOCHANGE or WORELEASE object)
        Throws:
        MXException
        java.rmi.RemoteException
      • areAllPredecessorsComplete

        public boolean areAllPredecessorsComplete()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Are all predecessors complete.
        Returns:
        true, if successful
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • areAllPredecessorsComplete

        public boolean areAllPredecessorsComplete(WO wo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Are all predecessors complete.
        Parameters:
        wo - the wo
        Returns:
        true, if successful
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • areAllPredecessorsComplete

        public boolean areAllPredecessorsComplete(java.lang.String targetStatus,
                                                  boolean fully)
                                           throws MXException,
                                                  java.rmi.RemoteException
        If all predecessors are flow complete, then true is returned; if any are not flow complete, false is returned. The boolean "fully" determines (when true) whether the predecessors must be fully flow complete or (when false) whether "complete" can take into account the context and the relationship types of the precedence relations joining this WO to its predecessors. In the latter case, "complete" means "far enough along the chain of statuses so as to be sufficiently close to flow complete".
        Parameters:
        targetStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        fully - A boolean which determines whether the predecessors must be fully flow complete (if true) or whether they need only be sufficiently complete as determined by the context and the precedence relation types.
        Returns:
        A boolean stating whether or not all predecessors are flow complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • areAllPredecessorsComplete

        public boolean areAllPredecessorsComplete(WO wo,
                                                  java.lang.String targetStatus,
                                                  boolean fully)
                                           throws MXException,
                                                  java.rmi.RemoteException
        If all predecessors are flow complete, then true is returned; if any are not flow complete, false is returned. The boolean fully determines (when true) whether the predecessors must be fully flow complete or (when false) whether "complete" can take into account the context and the relationship types of the precedence relations joining this WO to its predecessors. In the latter case, "complete" means "far enough along the chain of statuses so as to be sufficiently close to flow complete". If fully is true, then areAllPredecessorsComplete is called; if fully is false, then areAllPredecessorsSufficientlyComplete is called.
        Parameters:
        wo - The WO whose predecessors are being checked for flow completeness.
        targetStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        fully - A boolean which determines whether the predecessors must be fully flow complete (if true) or whether they need only be sufficiently complete as determined by the context and the precedence relation types.
        Returns:
        A boolean stating whether or not all predecessors are flow complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • areAllPredecessorsSufficientlyComplete

        public boolean areAllPredecessorsSufficientlyComplete(WO wo,
                                                              java.lang.String targetStatus)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        Completeness in a predecessor depends on the context: it can be different depending on: 1) what action is being considered (auto start, manual start, or manual completion); 2) the Relationship type of the precedence relation between the predecessor and the current wo; and 3) the status of the predecessor (relative to flow start and flow complete).
        Parameters:
        wo - The WO whose predecessors are being checked for flow completeness.
        targetStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        Returns:
        A boolean stating whether or not all predecessors are flow complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • getContemplatedAction

        public int getContemplatedAction(WO wo,
                                         java.lang.String targetStatus)
                                  throws MXException,
                                         java.rmi.RemoteException
        Determines the contemplated action. The purpose of contemplatedAction is so that methods called further down can tell whether an auto flow start, a manual flow start, or a manual flow completion is the action being inquired about. There's no such thing as an auto flow completion for a successor, only for a parent, which is handled elsewhere.
        Parameters:
        wo - The WO for whom the action is being contemplated.
        targetStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value ( valuelist.maxvalue).
        Returns:
        A static parameter specifing the contemplated action.
        Throws:
        MXException
        java.rmi.RemoteException
      • isSufficientlyFlowControlComplete

        public boolean isSufficientlyFlowControlComplete(WO wo,
                                                         java.lang.String reltypeToSuccessor,
                                                         int contemplatedAction)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Helper method used to determine if the status is at or beyond the the correct status value for the relationship type of the precedence relation.
        A work order not in flow control or that has been cancelled or does not have a worktype with a start and complete status defined is considered complete.
        Parameters:
        wo - The WO whose flow completeness is being checked.
        reltypeToSuccessor - The relationship type of the relation joining wo to its successor.
        contemplatedAction - The contemplated action: what the user is trying to do.
        Returns:
        A boolean stating whether or not wo is flow complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • isSufficientlyFlowControlComplete

        public boolean isSufficientlyFlowControlComplete(WO wo,
                                                         java.lang.String status,
                                                         java.lang.String reltypeToSuccessor,
                                                         int contemplatedAction)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Helper method used to determine if the status is at or beyond the value that signifies competeness. What value that actually is depends on the contemplated action, precedence relation type, and the status of the predecessor, as follows. The Predecessor Status is the status the predecessor must have to be considered complete, given the Action and Relationship Type: Action Relationship Type Predecessor Status Auto Start FS Flow Complete FF Flow Complete SF Flow Started SS Flow Started Manual Start FS Flow Complete FF before Flow Start SF before Flow Start SS Flow Started Manual Finish FS Flow Complete FF Flow Complete SF Flow Started SS Flow Started
        A work order not in flow control or that has been cancelled or does not have a worktype with a start and complete status defined is considered complete.
        Parameters:
        wo - The WO whose flow completeness is being checked.
        status - The current status of wo.
        reltypeToSuccessor - The relationship type of the relation joining wo to its successor.
        contemplatedAction - The contemplated action: what the user is trying to do.
        Returns:
        A boolean stating whether or not wo is flow complete.
        Throws:
        MXException
        java.rmi.RemoteException
      • getChildPFCOrder

        public java.util.Vector getChildPFCOrder(boolean getChildrenWOs,
                                                 boolean appendSiteid)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Return a vector containing child wonums in process flow order (successor order).
        If a child is not flow controlled or if it has no predecessors it will be at the beginning of the the vector.
        Specified by:
        getChildPFCOrder in interface WORemote
        Parameters:
        boolean - getChildrenWOs false if you only want task wos true if you only want child wos
        boolean - appendSiteid false do not append siteid to wonums true append siteid to wonums
        Throws:
        MXException
        java.rmi.RemoteException
      • findPredecessorPosition

        public int findPredecessorPosition(java.util.Vector vector2Search,
                                           java.lang.String wonum,
                                           java.util.Hashtable htNetwork)
                                    throws MXException,
                                           java.rmi.RemoteException
        Loop thru the vector2Search vector to find the highest position of the wonums predecessors. If we fail to find the highest postion of the wonums predecessors then we need to recursively call this method to check the predecessors of the wonums predecessors.
        Parameters:
        vector2Search -
        wonum -
        htNetwork -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • bulkReschedule

        public void bulkReschedule(boolean resched,
                                   java.util.Date reschedDate,
                                   boolean fromListTab)
                            throws MXException,
                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • bulkReschedule

        public void bulkReschedule(boolean resched,
                                   java.util.Date reschedDate)
                            throws MXException,
                                   java.rmi.RemoteException
        Calls rescheduleAssignments if the action is rescheduling assignments and unassignWOAssignments if it's unassigning assignments; resched being true or false, respectively, tells which it is. Do nothing at all if this workorder is Completed, Closed, or Cancelled.
        Parameters:
        resched - A boolean based on a checkbox on the dialog, this tells whether they are rescheduling the assignments of this WO or merely unassigning them.
        reschedDate - If the action is rescheduling assignments, this is the date on which they will now start, if availability allows that. If the action is unassigning, this may be either null or contain a date; if it does contain a date, the date will be the new schedule start date for the Work Order.
        Throws:
        MXException
        java.rmi.RemoteException
      • getRescheduled

        public int getRescheduled()
      • getUnassigned

        public int getUnassigned()
      • unassignWOAssignments

        public void unassignWOAssignments(AssignmentSet assignSet,
                                          java.util.Date reschedDate)
                                   throws MXException,
                                          java.rmi.RemoteException
        This method exists so that the lower-level method unassignAssignments can be called as part of two different sequences of method calls, depending on whether the action is unassigning assignments or rescheduling them. This method is the one for unassigning assignments with no reschedule action. The first step is to call restoreSplitAssignments and reconstruct any assignments that have been split into their original form. Then the call to unassignAssignments removes the Labor from each one. If there are no assignments in the set, both methods should still be called; there are tests for emptiness in both of them, and unassignAssignments may need to reset the schedule dates of the work order even if there are no assignments.
        Parameters:
        assignSet - The AssignmentSet of Assignments that belong to this workorder; they are to be restored to their original unsplit form and then have their labor removed.
        reschedDate - This may or may not contain a date. If it does, the date will become the new schedule start date for the Work Order. If it's null, the Work Order will retain the schedule dates it already has
        Throws:
        MXException
        java.rmi.RemoteException
      • unassignAssignments

        public void unassignAssignments(AssignmentSet assignSet,
                                        java.util.Date reschedDate)
                                 throws MXException,
                                        java.rmi.RemoteException
        May be called either as part of the reschedule assignments process or the unassign assignments process. Removes the laborcode from Assigned assignments and restores the original LaborHrs in those cases where the assignement was based on a WPLabor row. Interrupted assignments have their schedule date cleared, if they have one. No other assignments are acted on: WaitAssign assignments won't have any laborcode anyway and Started and Completed assignments are to be left alone. The actions of the assignment's schedule- and finishdate field classes are not appropriate for bulk unassign so it's handled in a different way in this method. If reschedDate is null, the work order's schedule start and finish dates are cached and restored at the end. If it contains a date, that date becomes the new schedule start date for the work order and the scedule finish is calculated based on the work order's estimated duration.
        Parameters:
        assignSet - The AssignmentSet of Assignments that belong to this workorder; they are to be restored to their original unsplit form and then have their labor removed if their status is Assigned.
        reschedDate - This may or may not contain a date. If it does, the date will become the new schedule start date for the Work Order. If it's null, the Work Order will retain the schedule dates it already has.
        Throws:
        MXException
        java.rmi.RemoteException
      • rescheduleAssignments

        public void rescheduleAssignments(AssignmentSet assignSet,
                                          java.util.Date reschedDate,
                                          boolean fromListTab)
                                   throws MXException,
                                          java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • rescheduleAssignments

        public void rescheduleAssignments(AssignmentSet assignSet,
                                          java.util.Date reschedDate)
                                   throws MXException,
                                          java.rmi.RemoteException
        The top-level method for rescheduling this work order's assignments. Only assignments that are already in the Assigned state will be rescheduled. This method must keep track of which assignments those are and what LaborCraftRate was assigned to them, because an early step is to unassign them all and save. This is necessary because assigning takes availability into account, so all the labor involved must be freed up before the re-assigning can begin. The steps are: 1) restore split assignments; 2) cache the LaborCraftRate information for each assignment; 3) unassign all Assigned assignments and save; and 4) reschedule by calling the assignLabor method from Assignment Manager.
        Parameters:
        assignSet - The AssignmentSet of Assignments that belong to this workorder; the ones that are in the Assigned state are to be rescheduled to start on reschedDate, or as soon after that as possible, depending on availability of the labor.
        reschedDate - The date on which the newly rescheduled assignments will start, if possible, depending on the availability of labor.
        Throws:
        MXException
        java.rmi.RemoteException
      • getLCRSqlFormatHashMap

        public java.util.HashMap getLCRSqlFormatHashMap(AssignmentSet assignSet)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Loops through the assignmentset and for each assignment in the Assigned state creates a SQLFormat object that will allow us to fetch the correct LaborCraftRate object later on. A SQLFormat object is stored instead of the mbo itself because the LaborCraftRate mbos must be fetched at assign time so there's no point in fetching them twice. The SQLFormat objects are stored in a hashmap whose key is the AssignmentID of the assignment that the labor will be assigned to. The existence of a SQLFormat object in the hashmap for a given assignment tells us which assignments were in the Assigned state, which are the only ones that are to be rescheduled. The hashmap is returned.
        Parameters:
        assignSet - The AssignmentSet of Assignments that belong to this workorder; for each one in the Assigned state a SQLFormat object that will allow its LaborCraftRate to be retrieved later is created and stored in the hashmap.
        Returns:
        A hashmap containing SQLFormat objects that will allow the correct LaborCraftRate mbo to be retrieved for each assignment; the assignmentID is the key into the hashmap for that assignment's SQLFormat object.
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateScheduleFinishDate

        public java.util.Date calculateScheduleFinishDate(WO wo,
                                                          java.util.Date schedStartDate)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Calculates a schedule finish date as the passed schedStartDate date plus the EstDur of the passed workorder. The date so calculated is returned.
        Parameters:
        wo - The work order whose EstDur is used in the calculation.
        schedStartDate - The date used as the schedule start date.
        Throws:
        MXException
        java.rmi.RemoteException
      • setWOScheduleDates

        public void setWOScheduleDates(WO wo,
                                       java.util.Date schedStartDate)
                                throws MXException,
                                       java.rmi.RemoteException
        Sets the schedule dates of the passed wo. The schedule start date is set to the schedStartDate parameter while the schedule finish date is calculated based on the work order's estimated duration.
        Parameters:
        wo - The work order whose schedule dates are being set.
        schedStartDate - The date to be used for the schedule start of the work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • setWOScheduleDates

        public void setWOScheduleDates(WO wo,
                                       java.util.Date schedStartDate,
                                       double duration)
                                throws MXException,
                                       java.rmi.RemoteException
        Sets the schedule dates of the passed wo. The schedule start date is set to the schedStartDate parameter while the schedule finish date is calculated based on the work order's estimated duration.
        Parameters:
        wo - The work order whose schedule dates are being set.
        schedStartDate - The date to be used for the schedule start of the work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • restoreSplitAssignments

        public AssignmentSet restoreSplitAssignments(AssignmentSet assignSet)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Restores split assignments by deleting all the child assignments and resetting the laborhrs of the top-level parent. If the top-level parent was based on a WPLabor row, its hours are set to the hours of its WPLabor. If the top-level parent was a new assignment, its hours are reset to the sum of the hours of the children. Completed and Started assignments are not included in this process: completed assignments already have LabTrans records and so should be left intact; started assignments should be left to progress until manually interrupted. Two hashmaps are used in the processing, both of which use assignmentIDs as their keys. One holds the index of a given assignment in the assignmentSet, so as to allow the assignment to be located quickly. The other holds the WPLabor object the assignment was based on, if there was one; this way, the WPLabors have to be fetched only once and it can be told quickly if the assignment was based on a WPLabor. The restored assignments are not saved in this method.
        Parameters:
        assignSet - The AssignmentSet of the Assignments that belong to this workorder; all child assignments will be marked for deletion while the top-level parents will either have their hours set to the hours of the WPLabor they were based on, if they were, or the sum of all their children (excepting Completed and Started ones).
        Returns:
        The passed assignmentset after the splits have been restored.
        Throws:
        MXException
        java.rmi.RemoteException
      • getToplevelParentAssign

        public Assignment getToplevelParentAssign(Assignment assign,
                                                  AssignmentSet assignSet,
                                                  java.util.HashMap assignIndexMap)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Given an assignment and the assignmentset containing the assignment, this method will return the top-level parent assignment of the passed assignment. A hashmap containing the indexes of all the assignments in the assignmentset, keyed on the assignmentID, is also passed.
        Parameters:
        assign - An assignment whose top-level parent will be returned.
        assignSet - The AssignmentSet containing assign.
        assignIndexMap - A hashmap containing the indexes of the assignments in assignSet, keyed on the assignmentID of each assignment.
        Returns:
        The top-level parent of the passed assignment.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeCompleteStartedAssigns

        public AssignmentSet removeCompleteStartedAssigns(AssignmentSet assignSet,
                                                          java.util.HashMap assignIndexMap)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Removes completed and started assignments from a chain of split assignments in preparation for restoring the original unsplit assignments; completed or started assignments should not be touched during this process. If such assignments are top-level parents, all their children then become top-level parents. If they are within the chain, they are simply cut out of it, with their children subsequently pointing to the parent of the original parent, or a parent higher up the chain, if necessary, until one is reached that is not completed or started.
        Parameters:
        assignSet - The AssignmentSet whose Assignments are to have the completed and started ones removed from any chain of splits.
        assignIndexMap - A HashMap in which the assignmentID of an Assignment is the key that returns the index of that Assignment in assignSet.
        Returns:
        The AssignmentSet parameter after its completed and started assignments have been removed from all chains of splits.
        Throws:
        MXException
        java.rmi.RemoteException
      • applyToAllUser

        public void applyToAllUser(MboRemote woModUser)
                            throws java.rmi.RemoteException,
                                   MXException
        This method will apply the specified user and custodian to AssetUserCust and LocationUserCust
        Specified by:
        applyToAllUser in interface WORemote
        Parameters:
        woModUser - the modify user and custodian will apply to AssetUserCust and LocationUserCust
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.applyToAllUser(psdi.mbo.MboRemote)
      • setPrimaryLinearAssetFieldsReadOnly

        public void setPrimaryLinearAssetFieldsReadOnly(MultiAssetLocCIRemote multiAssetMbo,
                                                        boolean readonlystate)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Set the linear asset fields as a group to ReadOnly or not for the passed MultiAssetLocCI record. (Note that it defaults to the primary record if no MultiAssetLocCI mbo is passed.)
        Throws:
        MXException
        java.rmi.RemoteException
      • clearPrimaryLinearAssetFields

        public void clearPrimaryLinearAssetFields(MultiAssetLocCIRemote multiAssetMbo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Clear all the linear asset fields in the passed MultiAssetLocCI object; this should ordinarily be the primary one associated with this wo...
        Throws:
        MXException
        java.rmi.RemoteException
      • copyLinearAssetFieldsFromRouteStop

        public void copyLinearAssetFieldsFromRouteStop(MboRemote toMbo,
                                                       MboRemote routestop)
                                                throws java.rmi.RemoteException,
                                                       MXException
        Copy linear asset fields from route stop.
        Parameters:
        toMbo - the to mbo
        routestop - the routestop
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • setRemoveWorkPlanFlag

        public void setRemoveWorkPlanFlag(boolean removeWorkplan)
                                   throws java.rmi.RemoteException,
                                          MXException
        Sets the Remove Work Plan Flag-
        Parameters:
        removeWorkplan - - returns true, it's remove workplan, don't need check delete security for task or children workorder.
        Throws:
        java.rmi.RemoteException
        MXException
      • getRemoveWorkPlanFlag

        public boolean getRemoveWorkPlanFlag()
                                      throws java.rmi.RemoteException,
                                             MXException
        Gets the Remove Work Plan flag that was set by the setRemoveWorkPlanFlag method.
        Returns:
        removeWorkplanFlag - flag which determines if it's in remove work plan.
        Throws:
        java.rmi.RemoteException
        MXException
      • getTopOwner

        public MboRemote getTopOwner()
                              throws MXException,
                                     java.rmi.RemoteException
        get the top wo owner work order.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkCompStatus

        public void checkCompStatus()
                             throws MXException,
                                    java.rmi.RemoteException
        If the work order status is COMP, cannot perform Save as Plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • doClassificationCreateTicketViews

        public void doClassificationCreateTicketViews(MboRemote newMbo)
                                               throws MXException,
                                                      java.rmi.RemoteException
        08-10181: copy workorderspec to ticketspec
        Parameters:
        newMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • doClassificationCreateWOViews

        public void doClassificationCreateWOViews(MboRemote newMbo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        08-10181: copy workorderspec to ticketspec
        Parameters:
        newMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • doClassificationCreateWOSpecFromJobPlan

        public void doClassificationCreateWOSpecFromJobPlan(MboRemote newMbo,
                                                            MboRemote sourceMbo)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        07-27302: copy jobplanspec to workorderspec copy jobtaskspec to workorderspec
        Parameters:
        newMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • CheckOrigIsFollowup

        public void CheckOrigIsFollowup()
                                 throws MXException,
                                        java.rmi.RemoteException
        Check to see if originator is a follow up
        Throws:
        MXException
        java.rmi.RemoteException
      • routeStopExists

        public boolean routeStopExists()
                                throws MXException,
                                       java.rmi.RemoteException
        Check if Route Stop exists on any of the Work Orders Tasks.
        Specified by:
        routeStopExists in interface WORemote
        Returns:
        true if RouteStop exists for any of the Work Orders tasks.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.routeStopExists()
      • isListSelected

        public boolean isListSelected()
        Returns:
        the isListSelected
      • setListSelected

        public void setListSelected(boolean isListSelected)
        Parameters:
        isListSelected - the isListSelected to set
      • getCopydocMboSet

        public MboSetRemote getCopydocMboSet(java.lang.String name)
                                      throws MXException,
                                             java.rmi.RemoteException
        Gets the copydoc mbo set.
        Parameters:
        name - the name
        Returns:
        the copydoc mbo set
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • setAvailibilityStatus

        public WO.MTLStatus setAvailibilityStatus(boolean changeStatus)
                                           throws java.rmi.RemoteException,
                                                  MXException
        Sets storeroom status, direct issue status and workpack status. Returns are based on the settings to ignore storeroom and the setting to ignore the direct issue.
        Parameters:
        changeStatus - true if record called from wostatushandler
        Returns:
        MTLStatus that is calculated by the maxvars and the storeroom and direct issue of the current workorder.
        Throws:
        java.rmi.RemoteException
        MXException
      • setStoreroomStatus

        public WO.MTLStatus setStoreroomStatus(boolean changeStatus)
                                        throws java.rmi.RemoteException,
                                               MXException
        Sets the storeroom status. Finds all the planned storeroom materials and checks the storeroom to see if the quantity available in the storeroom is enough to fulfill this workorder
        Parameters:
        changeStatus - true if record called from wostatushandler
        Returns:
        MTLStatus of the field value.
        Throws:
        java.rmi.RemoteException
        MXException
      • setDirectIssueStatus

        public WO.MTLStatus setDirectIssueStatus()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Finds all direct issue materials and make sure the following conditions are true: 1. PR is approved 2. PO is approved 3. Receipts are complete.
        Returns:
        MTLStatus of field status
        Throws:
        java.rmi.RemoteException
        MXException
      • setChildrenStatus

        public WO.MTLStatus setChildrenStatus(WO.MTLStatus storeroomStatus,
                                              WO.MTLStatus directIssueStatus,
                                              boolean changeStatus)
                                       throws MXException,
                                              java.rmi.RemoteException
        Finds all the material in the workpack, this includes the all workorders including task that have materials, including this work order. If a work order does not have materials, it is not included in the calculation of the work pack. This makes sure each direct issue matches the criteria and that the sum of all storeroom items (in this workorder and the workorders under this workorder) are available in the inventory. This does mean that the current workorder materials are executed a second time.
        Parameters:
        storeroomStatus - The status of the current workorder storeroom materials
        directIssueStatus - The status of the current workorder direct issue materials
        Returns:
        the status for the work pack
        Throws:
        MXException
        java.rmi.RemoteException
      • setMaterialAvailStatus

        public WO.MTLStatus setMaterialAvailStatus()
                                            throws java.rmi.RemoteException,
                                                   MXException
        When status is refreshed from UI. Get the status of the current workorder and check to see if APPR, WMATL, or INPRG. Update the workorder status fields.
        Throws:
        java.rmi.RemoteException
        MXException
      • isRevEnabled

        public boolean isRevEnabled()
                             throws MXException,
                                    java.rmi.RemoteException
        Checks if is WORKORDER revision is enabled.
        Specified by:
        isRevEnabled in interface WORemote
        Returns:
        true, if is rev enabled
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        WO.isRevEnabled()
      • setFromMobile

        public void setFromMobile(boolean isFromMobile)
        Sets the from mobile.
        Specified by:
        setFromMobile in interface WORemote
        Parameters:
        isFromMobile - the new from mobile
        See Also:
        psdi.app.workorder.WO#setFromMobile()
      • setCompleteWOFromEveryplace

        public void setCompleteWOFromEveryplace(boolean completeWOFromEveryplace)
                                         throws java.rmi.RemoteException
        Specified by:
        setCompleteWOFromEveryplace in interface WORemote
        Throws:
        java.rmi.RemoteException
      • manageCircleEffect

        public void manageCircleEffect(MboRemote thisToolTrans)
                                throws java.rmi.RemoteException,
                                       MXException
        Manage circle effect.
        Parameters:
        thisToolTrans - the this tool trans
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getWorkTypeCal

        public java.lang.String getWorkTypeCal()
                                        throws java.rmi.RemoteException,
                                               MXException
        Returns the value of the PLUSCWORKTYPECAL maxvar, which determines the type of worktype that marks a workorder a calibration.
        Specified by:
        getWorkTypeCal in interface WORemote
        Returns:
        value of the PLUSCWORKTYPECAL maxvar
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        WO.getWorkTypeCal()
      • getTranslatedWorkTypeCal

        public java.lang.String getTranslatedWorkTypeCal()
                                                  throws java.rmi.RemoteException,
                                                         MXException
        Returns the translated value of the PLUSCWORKTYPECAL maxvar.
        Returns:
        value of the PLUSCWORKTYPECAL maxvar
        Throws:
        java.rmi.RemoteException
        MXException
      • getJobRevNum

        public java.lang.String getJobRevNum(Mbo PlusCWO)
                                      throws MXException,
                                             java.rmi.RemoteException
        Gets the jobplan rev num.
        Parameters:
        PlusCWO - the plus cwo
        Returns:
        the job rev num
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • isValidJPRevNum

        public boolean isValidJPRevNum(java.lang.String jpNum,
                                       java.lang.String revNum)
                                throws MXException,
                                       java.rmi.RemoteException
        Issue 08-16714
        Parameters:
        jpNum -
        revNum -
        Throws:
        MXException
        java.rmi.RemoteException
      • getWorkType

        public java.lang.String getWorkType()
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns this workorder's WORKTYPE TYPE attribute value, converted to the internal (not translated) representation.
        Specified by:
        getWorkType in interface WORemote
        Returns:
        TYPE of this workorder's WORKTYPE
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.getWorkType()
      • checkRequiredDatasheets

        public boolean checkRequiredDatasheets()
                                        throws java.rmi.RemoteException,
                                               MXException
        Check whether there's at least one required data sheet (if the WO has any).
        Specified by:
        checkRequiredDatasheets in interface WORemote
        Returns:
        true if there's at least one required datasheet or the WO doesn't have attached datasheets
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.checkRequiredDatasheets()
      • duplicateWODS

        public MboRemote duplicateWODS(MboRemote newWO)
                                throws MXException,
                                       java.rmi.RemoteException
        Duplicate workorder datasheets.
        Parameters:
        newWO - the new wo
        Returns:
        the mbo remote
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • canEditRelatedSetCal

        public void canEditRelatedSetCal(java.lang.String relationName)
                                  throws MXException,
                                         java.rmi.RemoteException
        Can edit related set cal.
        Parameters:
        relationName - the relation name
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • copyJobPlanToWorkPlanCal

        public void copyJobPlanToWorkPlanCal()
                                      throws MXException,
                                             java.rmi.RemoteException
        Copy job plan to work plan cal.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getJobPlanDataSheet

        protected MboSetRemote getJobPlanDataSheet(MboRemote jpDs)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Returns a MboSet with the active data sheet that is attached to the given PLUSCJPDATASHEET object.
        Parameters:
        jpDs - a PLUSCJPDATASHEET object
        Returns:
        a MBO Set with the active data sheet
        Throws:
        MXException
        java.rmi.RemoteException
      • testDSStatus

        protected void testDSStatus(MboRemote dsPlan)
                             throws MXException,
                                    java.rmi.RemoteException
        Tests if the given DS is active. If not, throws a specific MXApplicationException.
        Parameters:
        dsPlan - datasheet whose status is to be tested.
        Throws:
        MXException - if the DS is not active
        java.rmi.RemoteException
      • copyDSPlanToWO

        public void copyDSPlanToWO(Mbo ds)
                            throws MXException,
                                   java.rmi.RemoteException
        Copy the given Datasheet to this Workorder.
        Parameters:
        ds - the datasheet to copy
        Throws:
        MXException
        java.rmi.RemoteException
      • copyDSPlanToWO

        protected void copyDSPlanToWO(PlusCWODSSet headerSet,
                                      MboRemote dsPlan,
                                      java.lang.String dsplannum,
                                      java.lang.String assetNum,
                                      java.lang.String tagLocation,
                                      java.lang.String sequence,
                                      boolean requiredAlways)
                               throws MXException,
                                      java.rmi.RemoteException
        Copy a single Datasheet template to this Workorder.
        Parameters:
        headerSet - WO DS set where the new WO DS will be added
        dsPlan - datasheet to copy
        dsplannum - datasheet template number
        tagLocation - asset's tag location
        sequence - sequence number, for table ordering
        requiredAlways - "always required" flag, comes from the JP-DS's required flag
        Throws:
        MXException
        java.rmi.RemoteException
      • createCalPoint

        protected MboRemote createCalPoint(PlusCWODSInstrRemote dsInstr,
                                           PlusCDSPointRemote dsPoint,
                                           PlusCWODSPointSetRemote woDsPointSet,
                                           boolean isAverage)
                                    throws MXException,
                                           java.rmi.RemoteException
        Creates a new WO DS cal point in the given set and copies the data from the given DS cal point to it.
        Parameters:
        dsInstr - Asset function that contains the DS cal point
        dsPoint - DS cal point
        woDsPointSet - WO DS cal point Set for adding the new point
        isAverage - whether this point is a Average/Std deviation line or not
        Returns:
        reference to the newly created point
        Throws:
        MXException
        java.rmi.RemoteException
      • updatePreviousAsLeftValues

        public void updatePreviousAsLeftValues()
                                        throws MXException,
                                               java.rmi.RemoteException
        Searches for previously closed work orders referencing this work order's data sheets and, if found, copy their "as left" values to this data sheet's "previous as left" fields.
        Specified by:
        updatePreviousAsLeftValues in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.updatePreviousAsLeftValues()
      • isTolWarning

        public boolean isTolWarning()
                             throws MXException,
                                    java.rmi.RemoteException
        This method checks whether the tolerances are within the limits or not. It returns a boolean true if any of the error value if not equal to zero (show the warning) otherwise it returns boolean false (don't show warning)
        Specified by:
        isTolWarning in interface WORemote
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.isTolWarning()
      • updateJobPlanRevisionNum

        protected void updateJobPlanRevisionNum()
                                         throws MXException,
                                                java.rmi.RemoteException,
                                                MXApplicationException
        Updates this WO's PLUSCJPREVNUM with the currently active revision for this WO's jpnum. This is meant to be called when a jobplan is being attached to the WO. If JPNUM is null, it does nothing.
        Throws:
        MXException
        java.rmi.RemoteException
        MXApplicationException
      • canEditAsset

        public boolean canEditAsset()
                             throws MXException,
                                    java.rmi.RemoteException
        Can edit asset.
        Specified by:
        canEditAsset in interface WORemote
        Returns:
        true, if successful
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
        See Also:
        WO.canEditAsset()
      • changeStatusCal

        public void changeStatusCal(java.lang.String status,
                                    java.util.Date date,
                                    java.lang.String memo,
                                    long accessModifier,
                                    boolean comingFromReceiving)
                             throws MXException,
                                    java.rmi.RemoteException
        Overridden to update previous as left values when approving.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.changeStatus(String, Date, String, long, boolean)
      • managePlusCNextDate

        public void managePlusCNextDate()
                                 throws MXException,
                                        java.rmi.RemoteException
        Manage plus c next date.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getLoopRotAsset

        public MboRemote getLoopRotAsset(MboRemote toolMbo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Gets the loop rot asset.
        Parameters:
        toolMbo - the tool mbo
        Returns:
        the loop rot asset
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • validateRotatingAsset

        public boolean validateRotatingAsset(MboRemote toolMbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Validate rotating asset.
        Parameters:
        toolMbo - the tool mbo
        Returns:
        true, if successful
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • checkWorkPackStatus

        public void checkWorkPackStatus()
                                 throws java.rmi.RemoteException,
                                        MXException
        This method will be called whenever a parent is changed on a workorder. This method will check it's work package status and compare it to its old and new parent. If its parent needs to recalculate it's own work package status then it will change its status and all of its parents up the hierarchy.
        Throws:
        MXException
        java.rmi.RemoteException
      • parentMbo

        public MboRemote parentMbo(java.lang.String wonum)
                            throws java.rmi.RemoteException,
                                   MXException
        This method fetches the Parent Work Order into a set of its own. Used in conjunction with Work Pack status updates.
        Parameters:
        wonum - Parent record to be fetched.
        Returns:
        Parent record.
        Throws:
        java.rmi.RemoteException
        MXException
      • updateHierarchyWPStatus

        public MboRemote updateHierarchyWPStatus(MboRemote parentMbo,
                                                 MboRemote mainMbo,
                                                 java.lang.String previousParentValue,
                                                 java.lang.Boolean parentChanged)
                                          throws java.rmi.RemoteException,
                                                 MXException
        This method updates the work pack status based on the childen in the hierarchy.
        Parameters:
        parentMbo - parent mbo to check and change status for.
        mainMbo - Work Order record which is having its parent changed.
        previousParentValue -
        parentChanged - true if parent values has changed from one record to another (instead of null to another)
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • refreshWorkPackHierarchy

        public void refreshWorkPackHierarchy()
                                      throws java.rmi.RemoteException,
                                             MXException
        Update Work Pack Hierarchy executed from WorkOrder Listener.
        Throws:
        java.rmi.RemoteException
        MXException
      • refreshWorkPackHierarchy

        public void refreshWorkPackHierarchy(WORemote mbo)
                                      throws java.rmi.RemoteException,
                                             MXException
        Update the Parents Work Pack Status up the hierarchy.
        Parameters:
        mbo -
        Throws:
        java.rmi.RemoteException
        MXException
      • getPMWOCancelUserListResponse

        public boolean getPMWOCancelUserListResponse()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Get the User's Stored Response from Cancel Yes/No Dialog.
        Specified by:
        getPMWOCancelUserListResponse in interface WORemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.workorder.WO#getPMWOCancelUserListResponse(boolean)
      • getLatitudeY

        public java.lang.Double getLatitudeY()
                                      throws MXException,
                                             java.rmi.RemoteException
        Description copied from interface: GISable
        Return a double value with the the Latitude (or Y) coordinate of the current entitty.
        Specified by:
        getLatitudeY in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getLongitudeX

        public java.lang.Double getLongitudeX()
                                       throws MXException,
                                              java.rmi.RemoteException
        Description copied from interface: GISable
        Return a double value with the the Longitude (or X) coordinate of the current entitty.
        Specified by:
        getLongitudeX in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • getAddressString

        public java.lang.String getAddressString()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: GISable
        Return a string with the address of the current entitty.
        Specified by:
        getAddressString in interface GISable
        Returns:
        Double or null
        Throws:
        MXException
        java.rmi.RemoteException
      • saveGISData

        public void saveGISData(java.lang.String address,
                                java.lang.String lat,
                                java.lang.String lng)
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from interface: GISable
        Implement the logic to save the GIS Data
        Specified by:
        saveGISData in interface GISable
        Throws:
        MXException
        java.rmi.RemoteException
      • isGISDataReadonly

        public boolean isGISDataReadonly()
                                  throws MXException,
                                         java.rmi.RemoteException
        Description copied from interface: GISable
        Indicate if the current GIS entity is editable or not. Usefull when the coordinates are populated using an external system.
        Specified by:
        isGISDataReadonly in interface GISable
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • updateChildrensServiceAddress

        public void updateChildrensServiceAddress(WO currentWO)
                                           throws java.rmi.RemoteException,
                                                  MXException
        Method to propogate the service address to children workorders (children & tasks). If there is an address already present, it will NOT overwrite the value. This method is triggered by the action on changing the address on WOServiceAddress.
        Parameters:
        addresscode -
        Throws:
        java.rmi.RemoteException
        MXException
      • getAmCrewLabor

        public MboRemote getAmCrewLabor(java.lang.String laborCode,
                                        java.lang.String laborOrg)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get crew from AMCrewLabor table based on login labor and organization.
        Parameters:
        laborCode - Labor Code
        laborOrg - Labor org
        Returns:
        AMCrewLabor mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getAmCrew

        public MboRemote getAmCrew(java.lang.String crew,
                                   java.lang.String laborOrg)
                            throws MXException,
                                   java.rmi.RemoteException
        Get crew information from AMCrew table based on labor's crew and organization.
        Parameters:
        crew - Crew
        laborOrg - Labor org
        Returns:
        AMCrew mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getAmCrewLaborSet

        public MboSetRemote getAmCrewLaborSet(java.lang.String crew,
                                              java.lang.String laborOrg)
                                       throws MXException,
                                              java.rmi.RemoteException
        Get members of crew from AMCREWLABOR based on crew and organization.
        Parameters:
        crew - Crew
        laborOrg - Labor org
        Returns:
        AMCrewLaborSet
        Throws:
        MXException
        java.rmi.RemoteException
      • isMobileCrew

        public boolean isMobileCrew(java.lang.String laborCode,
                                    java.lang.String laborOrg)
                             throws MXException,
                                    java.rmi.RemoteException
        Return true if it's calling from Mobile and labor is a crew member. Otherwise return false.
        Parameters:
        laborCode - Labor Code
        laborOrg - Labor org
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • isCrew

        public boolean isCrew(java.lang.String laborCode,
                              java.lang.String laborOrg)
                       throws MXException,
                              java.rmi.RemoteException
        Return true if labor is a crew member. Otherwise return false.
        Specified by:
        isCrew in interface WORemote
        Parameters:
        laborCode - Labor Code
        laborOrg - Labor org
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WO.isCrew(String laborCode, String laborOrg)
      • createToolTransEveryplace

        public void createToolTransEveryplace(MboRemote labTransMbo)
                                       throws MXException,
                                              java.rmi.RemoteException
        Everyplace Report by Labor/Tool Stop Timer. Create ToolTrans based on LabTrans.
        Parameters:
        labTransMbo - LabTrans
        Throws:
        MXException
        java.rmi.RemoteException
      • getAmCrewToolSet

        public MboSetRemote getAmCrewToolSet(java.lang.String crew)
                                      throws MXException,
                                             java.rmi.RemoteException
        Get tools from AMCrewTool based on crew and organization.
        Parameters:
        crew - Crew
        Returns:
        AMCrewToolSet
        Throws:
        MXException
        java.rmi.RemoteException
      • getAutoLocateObject

        public MboRemote getAutoLocateObject()
                                      throws MXException,
                                             java.rmi.RemoteException
        Description copied from interface: AutoLocatable
        Returns an autolocate object instance if present.
        Specified by:
        getAutoLocateObject in interface AutoLocatable
        Returns:
        the auto locate object
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • hasCoords

        public java.lang.Boolean hasCoords()
                                    throws MXException,
                                           java.rmi.RemoteException
        Description copied from interface: GISable
        Check if this autolocatable object has coordinates filled (LAT,LONG)
        Specified by:
        hasCoords in interface GISable
        Returns:
        the boolean
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • setClearLBSLocation

        public void setClearLBSLocation(boolean setLocation)
                                 throws java.rmi.RemoteException,
                                        MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • setPMWOCancelUserMainAndChildren

        public void setPMWOCancelUserMainAndChildren(int response)
                                              throws MXException,
                                                     java.rmi.RemoteException
        IV31668/61883 - issue12-14560 Set and store the User Response from Yes/No Dialog when cancelling a Work Order it could be MXApplicationYesNoCancelException.NULL, MXApplicationYesNoCancelException.YES, MXApplicationYesNoCancelException.NO. Only YES matters because it needs to resinstate the PM. If the PM work order being cancelled has child work orders, they need to follow the initial yes/no decision.
        Throws:
        MXException
        java.rmi.RemoteException
      • getPMWOCancelUserMainAndChildren

        public int getPMWOCancelUserMainAndChildren()
                                             throws MXException,
                                                    java.rmi.RemoteException
        IV31668/61883 - issue12-14560 Get the User's Stored Response from Cancel Yes/No Dialog.
        Throws:
        MXException
        java.rmi.RemoteException
      • setWoOwnerDuringStatusChange

        public void setWoOwnerDuringStatusChange(MboRemote parentWO)
                                          throws MXException,
                                                 java.rmi.RemoteException
        IV31668/61883 - issue12-14560 Store this wo as the Owner of the child wos which do not have an owner because they were gotten from mxserver
        Throws:
        MXException
        java.rmi.RemoteException
      • getWoOwnerDuringStatusChange

        public MboRemote getWoOwnerDuringStatusChange()
                                               throws MXException,
                                                      java.rmi.RemoteException
        IV31668/61883 - issue12-14560
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForActiveLabTrans

        public boolean checkForActiveLabTrans()
                                       throws java.rmi.RemoteException,
                                              MXException
        Check if this work order has any active labor transactions.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • setStoreroomStatusWOGen

        public WO.MTLStatus setStoreroomStatusWOGen(boolean changeStatus)
                                             throws java.rmi.RemoteException,
                                                    MXException
        IV37283/78664: this is almost a clone of setStoreroomStatus. Difference: the current WO is new and so is its WPMATERIAL set. Cannot discard the mboset as it is new and to be saved. Must use WPMATERIAL relationship because new wpmaterial is added in that relationship. The relationship ALLSTOREWPMATERIAL would find no WPMATERIAL records if the WO is new.
        Parameters:
        changeStatus -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • setDirectIssueStatusWOGen

        public WO.MTLStatus setDirectIssueStatusWOGen()
                                               throws java.rmi.RemoteException,
                                                      MXException
        IV37283/78664:almost same as setDirectIssueStatus - difference the WO is new and the WPMaterial Set is new too. Finds all direct issue materials and make sure the following conditions are true: 1. PR is approved 2. PO is approved 3. Receipts are complete.
        Returns:
        MTLStatus of field status
        Throws:
        java.rmi.RemoteException
        MXException
      • setAssetAndLocation

        protected void setAssetAndLocation(WO newChild)
                                    throws MXException,
                                           java.rmi.RemoteException
        IV47027: This public method was created so Oil and Gas and override to keep the action() method of FldWOAssetNum and FldWONum. The related apar IV42687 fixed the core issue but did not resolve Oil and Gas. This method is called in createOperations which is a private method. This public method provides a way for overriding.
        Parameters:
        newChild -
        Throws:
        MXException
        java.rmi.RemoteException
      • checkSynonymStatusDate

        public void checkSynonymStatusDate(java.lang.String status,
                                           java.util.Date date)
                                    throws MXException,
                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSharedMatUseTransSet

        public MboSetRemote getSharedMatUseTransSet(MboRemote wpm)
                                             throws MXException,
                                                    java.rmi.RemoteException
        IV60366: method to getsharedmboset of matusetrans in this wpmaterial set of this work order
        Parameters:
        wpm -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • isFullyIssued

        public boolean isFullyIssued(MboRemote wpm)
                              throws MXException,
                                     java.rmi.RemoteException
        IV60366: determine if this wpmaterial is fully issued - matusetrans
        Parameters:
        wpm -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • ProcessParentInVector

        public void ProcessParentInVector(MboRemote currentParent)
                                   throws MXException,
                                          java.rmi.RemoteException
        IV76966:PMR: 12581,999,744: if multiple references of child wos trying to update the same parent wo, make the oldest ones not modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • isPartiallyIssued

        public boolean isPartiallyIssued(MboRemote wpm)
                                  throws MXException,
                                         java.rmi.RemoteException
        IV73384: determine if this wpmaterial is partially issued - still invreserve recordd with matusetrans
        Parameters:
        wpm -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • hasUndeleteFRCompleted

        public boolean hasUndeleteFRCompleted()
        IV79395 - return status of undelete failurereport operation
        Returns:
        boolean
      • fireEvent

        public void fireEvent(java.lang.String type)
                       throws MXException,
                              java.rmi.RemoteException
        IV78777: Extend fireEvent to allow rollback, if rollback enabled. Throws a placeholder MXException to trigger rollback.
        Overrides:
        fireEvent in class StatefulMbo
        Parameters:
        type -
        Throws:
        MXException
        java.rmi.RemoteException
      • setChangeStatusSet

        public void setChangeStatusSet(MboSetRemote changeStatusSet)
                                throws MXException,
                                       java.rmi.RemoteException
        IV85972 - When cancelling from the list tab, only cancel most recent WO from a particular PM. Provide access to WOChangeStatusSet to prevent multiple WOs from same PM to be cancelled. Allow WOChangeStatusSet to set this on individual WOs
        Parameters:
        changeStatusSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • getChangeStatusSet

        public MboSetRemote getChangeStatusSet()
                                        throws MXException,
                                               java.rmi.RemoteException
        IV85972 - When cancelling from the list tab, only cancel most recent WO from a particular PM. Provide access to WOChangeStatusSet to prevent multiple WOs from same PM to be cancelled. Allow WOChangeStatusSet to set this on individual WOs
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • canCreateRelatedRecord

        public boolean canCreateRelatedRecord()
                                       throws MXException,
                                              java.rmi.RemoteException
        IV93688 - Prevent creation of related records when record is locked
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • setTopWOInWOGen

        public void setTopWOInWOGen(MboRemote topWO)
                             throws MXException,
                                    java.rmi.RemoteException
        IV98821
        Parameters:
        topWO -
        Throws:
        MXException
        java.rmi.RemoteException
      • getTopWOInWOGen

        public MboRemote getTopWOInWOGen()
                                  throws MXException,
                                         java.rmi.RemoteException
        IV98821 I
        Returns:
        Throws:
        MXEXException
        java.rmi.RemoteException
        MXException
      • getUnCommittedWOs

        public java.util.Vector getUnCommittedWOs()
                                           throws MXException,
                                                  java.rmi.RemoteException
        IV98812:uncomm
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • storeUnCommittedWOs

        public void storeUnCommittedWOs(MboRemote childWO)
                                 throws MXException,
                                        java.rmi.RemoteException
        12-10173/IV12943: store the uncommited child wos in vector
        Throws:
        MXException
        java.rmi.RemoteException
      • setAsyncChangeStatus

        public void setAsyncChangeStatus()
                                  throws MXException,
                                         java.rmi.RemoteException
        IJ04817 When cancelling an individual WO in background while the record is open, PM/PO Y/N/C dialog does not show, and WO is not cancelled. Assume non-interactive response for Y/N/C dialog, and reinstate PM / close PO.
        Throws:
        MXException
        java.rmi.RemoteException
      • isAsyncStatusChange

        public boolean isAsyncStatusChange()
                                    throws MXException,
                                           java.rmi.RemoteException
        IJ04817 When cancelling an individual WO in background while the record is open, PM/PO Y/N/C dialog does not show, and WO is not cancelled. Assume non-interactive response for Y/N/C dialog, and reinstate PM / close PO.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setAppDefaultValue

        public void setAppDefaultValue()
                                throws MXException,
                                       java.rmi.RemoteException
        IJ04806: if this is duplicate() and copy is called that triggers mboset.addAtIndex, do not call setAppDefaultValue because that causes duplicated records if CLASSSTRUCTUREID is in the appFieldsDefaults records. Only fixes the issue in WO but it is a framework consideration. In duplicate() call, should we call setAppDefaultValue()?
        Overrides:
        setAppDefaultValue in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • initMXYesNoHash

        public void initMXYesNoHash(java.util.HashMap hash)
        IJ11288 Initialize the WO's mxYesNoHash with the hash populated and passed from the bean.
        Parameters:
        hash - The MXYesNoCancel hash populated by the bean
      • getMXYesNoHash

        public java.util.HashMap getMXYesNoHash()
        IJ11288 Returns the WO's mxYesNoHash used to complete the reschedule
        Returns:
        HashMap
      • setMustApplyDJP

        public void setMustApplyDJP(boolean mustApplyDJP)
      • mustApplyDJP

        public boolean mustApplyDJP()
      • calculateDynamicJobPlan

        public void calculateDynamicJobPlan()
                                     throws java.rmi.RemoteException,
                                            MXException
        Main calculation Entry Point For each resource, we trigger the calculation of the dynamic resources values Each resource : All Tasks, All labors, All materials, All Tools, All Services, And the workorder itself For each records of the mbosets, it call the corresponding calculation method, according to the field CALCMETHOD, on the Job Plan record ( For TASKS -> JOBTASK.CALCMETHOD, For LABOR -> JOBLABOR.CALCMETHOD, For MATERIAL -> JOBMATERIAL.CALCMETHOD, For TOOL -> JOBTOOL.CALCMETHOD, FOR SERVICE -> JOBSERVICE.CALCMETHOD, FOR WORKODER -> JOBPLAN.CALCMETHOD ) with parameters : mbo is the workplan record (wplabor, wpmaterial, wptool, wpservice, workorder) job plan associated record ( wplabor -> joblabor, wpmaterial -> jobmaterial, wptool -> jobtool, wpservice -> jobservice, workorder -> jobplan ) calculatedField : the names of the fields on the mbo and job plan associated records that must be used to set and retrieve the values Example : if JOBRESOURCE.CALCAPPLYTO = HOURS, then we will return for WPLABOR the fields WPLABOR.LABORHRS and JOBLABOR.LABORHRS Example : if JOBRESOURCE.CALCAPPLYTO = HOURS, then we will return for WORKORDER the fields WORKORDER.ESTDUR and JOBPLAN.TASKDURATION
        Specified by:
        calculateDynamicJobPlan in interface WORemote
        Throws:
        MXApplicationException - if the workorder is not WAPPR
        java.rmi.RemoteException
        MXException
      • mustApplyLinearCalculation

        public boolean mustApplyLinearCalculation()
                                           throws java.rmi.RemoteException,
                                                  MXException
        Method use to detect if the job plan is set as dynamic and should be apply using the length of the workorder (startmeasure and endmeasure) or not. If not, the TOTAL WORK UNITS of the jobresources will be use to calculate the results.
        Returns:
        true if the jobplan is dynamic and should apply the linear calculation. Otherwise return false
        Throws:
        java.rmi.RemoteException
        MXException
      • calculateTotalWorkUnits

        public void calculateTotalWorkUnits()
                                     throws java.rmi.RemoteException,
                                            MXException
        Calculate the total length of attributes : for each linear asset in the multiassetlocci set, we add the absolute value for endmeasure - startmeasure (cause the endmeasure is not necessarely lower than the startmeasure)
        Update the field TOTALWORKUNITS
        If some assets are not linear, they are skipped, and a warning is added to the MULTIASSETLOCCI set
        Specified by:
        calculateTotalWorkUnits in interface WORemote
        Throws:
        java.rmi.RemoteException
        MXException
      • getWoHazardPrecHashMap

        public java.util.Map getWoHazardPrecHashMap()
                                             throws MXException,
                                                    java.rmi.RemoteException,
                                                    java.sql.SQLException
        For IJ36845 Initialize/get Map WoHazardPrecHashMap Key is precautionid Value is the number of hazards on the WO that have this precaution
        Throws:
        MXException
        java.rmi.RemoteException
        java.sql.SQLException
      • incrementWoHazardPrecHashMap

        public void incrementWoHazardPrecHashMap(java.lang.String precautionid)
        For IJ36845 Increment count of a precaution in WoHazardPrecHashMap
      • decrementWoHazardPrecHashMap

        public void decrementWoHazardPrecHashMap(java.lang.String precautionid)
        > 0 For IJ36845 Decrement count of a precaution in WoHazardPrecHashMap