The ‘Xslt’ action failed due to incompatible map

Posted: June 28, 2023  |  Categories: Azure
Tags: XSLT

This blog tells you about what do if you get this error “BadRequest. The ‘Xslt’ action failed due to incompatible map” in an Azure Logic app”. This is all to do with .NET Framework assembly support in to Azure Logic Apps XSLT transformations.

The Problem

In the first place we failed to DR recently and many of our Logic Apps started to fail with this error.

BadRequest. The 'Xslt' action failed due to incompatible map 'XSLT name'. Error details: 'An error occurred while processing map. 'XSLT compile error.''.

All Logic Apps were in the consumption tier , not the standard tier. On failing to DR we deploy all our maps and other artifacts to an Azure Integration account. We have a cold ‘Free Tier’ integration account which we upgrade to Standard on a DR failover. The final step is to load all the Azure Integration account artifacts.

What is going on because we loaded the same XSLT that was in Production?

Solution for ‘Xslt’ action failed due to incompatible map

In the first place, we had a clue. Not only does each map translate UOM’s but also every XSLT uses an Assembly call from Logic App XSLT. I have previously described how we replace BizTalk XRef functionality mapping UOM’s with APIM and a custom .NET assembly here and here.

With this in mind, the solution was add the XSLT to the Integration account again. The error then disappears. Thanks to my colleague Harris Kristanto for working this out.

Conclusion

I think this has occurred because we deployed the XSLT before we added the assembly to an Integration Account. My theory is that behind the scenes the XSLT is compiled once. If the assembly is not present before the compilation then you will get the error “The ‘Xslt’ action failed due to incompatible map”. If you load the the XSLT to the Integration Account again it forces recompilation.

While my experience is with consumption Logic Apps I would like to know whether standard Logic Apps could show the error.

In summary if you are using XSLT that calls an Assembly makes you deploy the assembly before the XSLT.

turbo360

Back to Top