psdi.app.workorder

Class WoAncestor

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, WoAncestorRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class WoAncestor
    extends Mbo
    implements WoAncestorRemote
    Mbo to represent a WoAncestor object See Workorder Package description.

    This Mbo is a site level object.

    The key attributes for this object are Siteid,WoNum and Ancestor.

    The attributes in this object are as follows:

    Attribute NameDescription
    Ancestor Identifier of the workorder of Ancestor workorder.
    HierarchyLevels Number of hierarchy levels between a workorder and this Ancestor workorder.
    OrgIdIdentifier of the organization for this failure.
    SiteIdIdentifier of the site for this failure.
    WoNumIdentifier of the workorder.

    Work Orders may be arranged in hierarchies, however every hierarchy must have a single work order at the top which is not owned by any other workorder. A work order can own any number of sub work orders, but no work order may be owned by more than one parent work order. The WoAncestor table is a scratch pad table, used by MAXIMO to quickly determine which work orders are descendants or ancestors of a specific work order. WoAncestors records have no unique data, and all data in this object can always be recreated by examining WorkOrder.Parent values.

    There are only three attributes of the WoAncestor object: Wonum, Ancestor, and HierarchyLevels. An entry in this table indicates that the Ancestor owns the Wonum work order. Every work order has at least one WoAncestor record, since every work order is thought to "own itself". For example, if work orders Master and 1234 are outside of any work order hierarchy, then the WoAncestor table will contain the following records:

    Wonum Ancestor HierarchyLevels
    Master Master 0
    1234 1234 0

    When a relationship is created between work orders, it is reflected in the WoAncestor table (as well as in the WorkOrder record itself). The WoAncestor records exist to show which work order are under other work orders. Suppose that Master now owns 1234, the WoAncestor table would look like:

    Wonum Ancestor HierarchyLevels
    Master Master 0
    1234 1234 0
    1234 Master 1 This record is added since Master owns 1234.

    1234 still doesn't own any sub-work orders so it only appears as an ancestor to itself. Now let us give 1234 a child, SubWo1. The updated WoAncestor table looks like this:

    Wonum Ancestor HierarchyLevels
    Master Master 0
    1234 1234 0
    1234 Master 1
    SubWo1 SubWo1 0 This was added because SubWo1 owns itself.
    SubWo1 1234 1 This was added because 1234 owns SubWo1.
    SubWo1 Master 2 Master owns 1234 which owns SubWo1, making Master an ancestor of SubWo1

    The HierarchyLevels column indicates how close a hierarchy relationship is. 0 is the initial record, 1 is direct ownership of one work order by another, 2 is a grandparent relationship, etc...

    WoAncestor records are used to determine whether work orders are in the same work order hierarchy. For example, if you wanted to select all the work orders under the Master you could use: select Wonum from WoAncestor where Ancestor = 'Master' ; This would select Master, 1234, and SubWo1 from the table above. If you only wanted to find the work orders which belonged to Master directly you should query on the WorkOrder.Parent value.

    MAXIMO uses the WoAncestor records to detect loops, validate choices for the Belongs To field and Children table, and create new WoAncestor records when work order relationships change. If the WoAncestor records are wrong or incomplete, the validation checking for work order hierarchies will not work and the application will allow you to do logically incorrect assignments.

    Also, the WoAncestor table is used like a scratch pad where records may be temporarily deleted and recreated in a operation. This only means that after MAXIMO updates the WoAncestor table, the records aren't necessarily the same ones which existed before the update, even if the contents of a record is the same as what existed before. This is why this table has no extra fields.

    The combination of Wonum and Ancestor is always unique in the WoAncestor table.

    • Constructor Detail

      • WoAncestor

        public WoAncestor(MboSet ms)
                   throws MXException,
                          java.rmi.RemoteException
        Your basic constructor.
        Parameters:
        ms - the WoAncestor MboSet.
        Throws:
        MXException - MAXIMO System error
        java.rmi.RemoteException - RMI error