Skip to Content
Author's profile photo Daniel Graversen

PI mapping diff tool

Last year I published the The easy PI message mapping documentation service. This tool can create documentation of PI mappings in Excel form. Since the release in December there have been some miner improvements to support PI 7.1 better.

I wrote about how to Thoughts on versioning of PI components, so share some of my ideas.  One of the comments where was how to find the difference between two mappings. Sebastian Simon described they used downloaded two mappings from the “display text” function and compared this using Ultraedit.

I’m not very glad for using diff tools, it can for some people be difficult to see what is the new and the old text. It requires some knowledge to get started and to understand some of the output of a line diff tool, and it should also be triggered with the right commands.

I therefore thought about making a diff tool using the technology behind the mapping documentation. In the mapping documentation, I had a way to represent source elements, context changes and configuration in functions.

I have finally been able to create a tool, which makes the comparison between two mappings a lot easier. Simply upload two XIM files and you get an Excel spreadsheet with the two mappings and a marker if the mapping has changed.

The document could look something like this.


Notice that this is the first draft of the tool and there is room for improvement. 

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Ranjit Deshmukh
      Ranjit Deshmukh
      Hi Daniel,
      The tool is excellent! thanks a lot!
      about the improvements, i dont think much work is required, just 'Auto filters' for the header and different color fill for the rows with status 'Changed = Yes' would be a pleasant enhancement
      Also you can add Legends for more info
      once again thank you and congratulations for this good piece of work!


      Author's profile photo Daniel Graversen
      Daniel Graversen
      Hi  Ranjit,

      Thanks for the improvements.
      I'll try to find a way to create a auto filter.

      I will see what I can do with colors to make the changes more clear.


      Author's profile photo Former Member
      Former Member
      Hi Daniel,
      effectively it's a nice tool. To improve it, I suggest you these points:
      1. the report is done with Excel 2007. Like your PI Documenter, could we have the choice between different Excel version ? There are many people who use again the 2003.
      2. inside the report, put the column "Change" at the first column "A" instead of "D", coz path for target, old mapping, new mapping are sometime very long. The reading will be easier.
      3. I don't know if there are present in the XIM, but inside the header of report, as you retrieve some info, have you also the possibility to provide the "Status" (e.g version 11) and the "Object Version Id" that we have inside PI menu "Message Mapping > History".

      Else have you plan to sell this tool ? coz due to a matter of security (your tool uses PHP), maybe some clients will not accept to use it as you can collect some info regarding their business. Indeed most of the time SWCV, Namespace and/or Mapping names precise this type of info.


      Author's profile photo Daniel Graversen
      Daniel Graversen
      Hi Mickael,
      Thanks for the comments, they are most interesting.

      1. Yes it is fairly easy to make convert the document to excel 2003. I thought that Excel 2007 was more widely used, and therefore did not want to implement the feature. I'll add that feature in the next release.
      2. You have a point there with displaying the changed column first.
      3. I don't know if i got the full history information or can extract some more useful informations about the tool.

      4. I have heard the comment before, about potential confidential issues. I'm considering how to use some standalone tool, which can run on users computers, but have not reached a solution yet.


      Author's profile photo Ranjit Deshmukh
      Ranjit Deshmukh
      Hi Daniel,
      >>3. I don't know if i got the full history information or can extract some more useful informations about the tool.

      Surprisingly why the OBJECT_INFO.xml does not give information about the version id??
      ..So also this would have been possible only when the Object properties of the mapping would have been accessible.
      Unfortunately I couldnt find the location where they are stored 🙁
      Let me know when you find it.


      Author's profile photo Daniel Graversen
      Daniel Graversen
      Hi All,
      Thanks for the input, I have implemented them in the solution. If you have any further improvements please let me know.