Wednesday 15 October 2014

Save Record on selecting tabs

Purpose: Save the record on selecting a tab ex. Save Work Order on selecting "Plans" Tab.

Solution: Add tabchangeevent="save" for Plans tab as below:

              <tab id="plans" label="Plans" tabchangeevent="save">

Thursday 24 April 2014

Import Maximo Asset Specifications through MIF



Purpose:  Loading of Asset Specifications

Versions: 7.x. I have not tried the procedure in Maximo 6.x but might work.

Solution:
I am providing two options to load Asset Specifications. Choose the options suitable to you.

Method 1:
1.       Create Object Structure MC_ASSETSPEC as below
a.       Parent: ASSET
b.      CHILD: ASSETSPEC
2.       Copy the Inbound processing class from MXASSET object structure and use the same class for MC_ASSETSPEC object structure.
3.       Create the Enterprise Service and associate with External System.
4.       Import the date using the below template. You will not be able to load the asset along with specification at the same time. You need to load the data in two steps using the same object structure. Create two copies of the same template.
a.       First template will contain the Asset and classification.
b.      Second template will contain Asset, Classification and attributes.

For Ex: First template looks as below:
MCDataLoad,MC_ASSETSPEC,AddChange,EN
ASSETNUM,ASSETATTRID,NUMVALUE,MEASUREUNITID,ALNVALUE,HIERARCHYPATH,SITEID,ORGID
PUMP001,,,,,SECURITY \ EPS,MC,MCORG

Second template looks as below:
MCDataLoad,MC_ASSETSPEC,AddChange,EN
ASSETNUM,SECTION,ASSETATTRID,NUMVALUE,MEASUREUNITID,HIERARCHYPATH,ALNVALUE,SITEID,ORGID,LINEARASSETSPECID
PUMP001,,TEST,,,SECURITY \ EPS,1480,MC,MCORG,0
PUMP001,,TEST-NUMERIC,213,,SECURITY \ EPS,,MC,MCORG,0
PUMP001,,RAM,,,SECURITY \ EPS,512, MC,MCORG,0

Note: In the above templates for HIERARCHYPATH field, I have provided the entire hierarchy. This procedure requires to enter the entire classification hierarchy. Entering just the classification will not work.
In the second template, hierarchy path is optional. Add the hierarchy path i.e. classification if you want add an attribute that does not exist in the classification.

Method 2:
1.       Create Object Structure MC_ASSETSPEC as below
a.       Parent: ASSET
b.      CHILD: ASSETSPEC
2.       Create the Enterprise Service and associate with External System.
3.       In Asset Object , Create a relationship as below
    Name: RWS_ASSET_CLASS_STRUCT
   Child Object: CLASSSTRUCTURE
   Relationship: classificationid=:classtructureid
 In Enterprise Service > Asset Object, create a processing rule as below:





5.       Import the date using the below template. You will not be able to load the asset along with specification at the same time. You need to load the data in two steps using the same object structure. Create two copies of the same template.
a.       First template will contain the Asset and classification.
b.      Second template will contain Asset, Classification and attributes.

For Ex: The first template looks as below:
MCDataLoad,MC_ASSETSPEC,AddChange,EN
ASSETNUM,ASSETATTRID,NUMVALUE,MEASUREUNITID,ALNVALUE,CLASSSTRUCTUREID,SITEID,ORGID
PUMP001,,,,,EPS,MC,MCORG

Note: In classstructureid field, enter the required classification. The processing rule will set the correct Classstructureid for the asset.

For Ex: The second template looks as below:
MCDataLoad,MC_ASSETSPEC,Change,EN
ASSETNUM,SECTION,ASSETATTRID,NUMVALUE,MEASUREUNITID,HIERARCHYPATH,ALNVALUE,SITEID,ORGID,LINEARASSETSPECID
PUMP001,,TEST,,,EPS,1480, MC,MCORG,0
PUMP001,,TEST-NUMERIC,213,,EPS,,MC,MCORG,0
PUMP001,,RAM,,,EPS,512,MC,MCORG,0

Note: In hierarchypath field enter the required classification. Need not enter the full classification hierarchy as in Method 1.
In the second template, hierarchy path is optional. Add the hierarchy path i.e. classification if you want add an attribute that does not exist in the classification.





Thursday 10 April 2014

Import Maximo Classifications using MXCLASSIFICATION Object Structure


Purpose: This technote will explain the procedure to import Classifications using MXCLASSIFICATION Object Structure.

Issue: Many times, I has problem loading classifications along with its hierarchy in Classifications application using MXCLASSIFICATION object structure. Hence, I tried other alternative ways successfully by creating additional fields + Processing rules and importing the classification along with its hierarchy. With this procedure you will not require any additional fields and make use of the standard MXCLASSIFICATION Object Structure.

Applicable To: All versions of Maximo.

Solution
    1. In MXCLASSIFICATION Object Structure, remove the default Inbound     processing class.
    2. In ‘Restrict Attributes’ menu option, In the Source Object List, select   CLASSSTRUCTURE.
    3. Uncheck Restrict checkbox and check Override checkbox for below fields:
a.  Classstructureid
b.  Parent
    4. Select Action > Exclude / Include Fields
    5. In the Source Object List, select CLASSSTRUCTURE
    6. In the Persistant Fields sub-tab, look for HASCHILDREN and UNCHECK the       EXCLUDE checkBox. This will include the field in the schema.
    
    Please note MXCLASSIFICATION Object Structure should support flat file as I am using flat file to import data.

As, I am unable to attach templates with this blog; hence for template, export few classification records from the publish channel using MXCLASSIFICATION object structure and use the same template for importing classifications.

You can use the same template for loading Classstructure, Classusewith & Classspec. In the templates, the value in classstructureid should be the same as classificationid as below.