Maximo Open Forum

 View Only
  • 1.  Integration and Field level validation

    Posted 05-27-2021 00:53
    Hi All,

    I have a query on how will data load via MIF takes care of Field level validations that are defined in an attribute launch point automation script.
    We have this functionality where if a field value is some AAA then set the other field boolean value to 1 and its default value is 0.
    And the auto script is not setting the other field as expected when data is coming from MIF and it works good with UI.
    so far I have observed that, when I try to load a new record via MIF, with Field 1 as AAA excluding Field 2 in csv file, then the script is setting the Field 2 value as 1which is expected, but when I tried to load new record including Field 1 and Field 2 in csv files, then the script is not setting the Filed 2 value as expected.

    Can anyone help me on how can I make the script work as expected even if the data is coming via MIF?




    #Integrations

    ------------------------------
    Meghana Siriveli
    ------------------------------


  • 2.  RE: Integration and Field level validation

    Posted 05-28-2021 08:30
    Hi Meghana,

    I think it is working as expected.
    So, you are setting 2 fields from  MIF i.e. Field1 and field 2. Now, I do not know  how the order of processing these fields is decided by mif but i believe field1 is getting processed 1st and field 2 is getting processed 2nd.
    My suggestion is to add some logs in the script to check if the order of processing these fields. You will have your answers there.

    Thanks,
    Biplab

    ------------------------------
    Biplab Choudhury
    Tata Consultancy Services
    ------------------------------



  • 3.  RE: Integration and Field level validation

    Posted 05-28-2021 09:18
    Hi Biplab, 
    Thanks for your response.

    When I am loading .csv file with Field 1 as AAA and Field 2 as 0  , ideally our autoscript should set field 2 value as 1 because Field 1 is AAA.
    but the Field 2 value is being set as 0 .
    I just wanted to get some idea on how MIF processes data before enabling the loggers.

    Thanks again.

    ------------------------------
    Meghana Siriveli
    ------------------------------



  • 4.  RE: Integration and Field level validation

    Posted 05-28-2021 12:30
    If you're providing both values in the MIF, the value provided for the field is going to win or you're going to have to write special processing to handle it the way you want. For example, you could potentially write your logic on object save (instead of just on the attribute being set) and then overwrite the value in Field 2. Or you could write a script specific for your integration (either at the object structure or enterprise service level) to adjust it that way. 

    You could also prevent Field 2 from being set in the MIF (by either excluding it from the object structure or setting it as restricted). By making it restricted, the MIF framework wouldn't automatically set the value in the MBO but you could set it as part of the object structure processing script (such as seeing if it's null and it was provided in the message payload and only setting it then). This is how more complicated logic (such as statuses) are typically handled. 

    What you're seeing is essentially from a UI perspective having someone set Field 1 (which causes Field 2 to be set) and then going to Field 2 and replacing it with the value that they want. In the UI you may have access restrictions or something to prevent it, but that's what is happening. The only way to avoid it is to change how it's processed to override it. There are fortunately (and unfortunately) many ways to adjust the processing, with there not always being a "correct" answer.

    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------



  • 5.  RE: Integration and Field level validation

    Posted 05-31-2021 04:02
    Hello Steven,
    Thanks a lot for your response.

    Earlier I have tried preventing Field 2 from being set in the MIF  by excluding the field 2 in object structure and the script worked as expected.
    Now after your response I have tried changing my attribute launch point  automation script to object Launch point script (object save, Add/Update).
    I have included the field2 in object structure and in csv file its value is sent as 0.Ideally the script should set the value to 1, But I see the script is not setting the field2 value to 1.

    Could you please tell me if I am missing something?



    ------------------------------
    Meghana Siriveli
    ------------------------------



  • 6.  RE: Integration and Field level validation

    Posted 06-01-2021 10:05
    Yeah you're correct. I didn't think that through properly. You will need to do an object structure processing script and set this field to RESTRICTED if you want to let your other process set it normally and use the value provided in the integration when it's not set.

    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------