sorengranfeldt / mare

FIM/MIM MA Rules Extension Framework
MIT License
3 stars 5 forks source link

Comparing CS-value to MV-value before Export #25

Open alfgil opened 4 months ago

alfgil commented 4 months ago

Hi, We have an issue with one of our target systems where some data-fields are sometimes accepted as written, but in other cases converted to "TitleCase" or the change may be completely ignored during MIM-export. We are using the vendors official REST-API for this.

Typically when we add a new entry, we are allowed to say "Address"="OSLO", but if MIM later change this to "Address"="Oslo", the update is discarded. If we manually enter the value "Address"="OSLO" in the products own GUI, it will immideatly be changed to "Oslo", so it is really confusing.

We don't actually care in what format the "Address" ends up, but this if causing a lot of "Exported change not reimported" in MIM, and here is where we are looking to use MARE to solve the issue but is it possible?

What we would like is something like this: After Import from the System, ConnectorSpace (CS) contains the current value out there, and if the caseIgnored content of this is what we already have in MetaVerse (MV) we would be happy to Export the CS-value to avoid the looping of "exported change not reimported"

Pseudo code for our MARE-rule:

IF (UpperCase(CS\Address)) = (UpperCase(MV\Address)) Export CS\Address Else Export MV\Address EndIf

Can MARE do this?