Disappearing code in Logic Apps

Recently my team and I were building and debugging LogicApps. At one point we seemed to have disappearing code within our code of these apps.
Obviously something is wrong when we were editing these apps.

Please note that we’ve got many LogicApps with custom code and mappings that we code using the code view, because not all properties can be set using the designer.

The problem

The problem arises when you are in ‘Logic App Code View’, and switch to ‘Logic App Designer’.
When switching back, the following popup arises:

LogicAppProblem

In this case, we did not change anything, just switched to designer and back.
But, this is actually what triggers this problem.

Thanks to ‘Versions’ you can quickly see and use WinMerge (or any other tool) to compare the files:

codeview

In this sample, the ‘queueType’ magically disappeared, but in other cases other mappings of JSON object were deleted.

Conclusion

Always check, when the designer asks you to ‘Save changes’, if you actually made any changes.
I hope this helps someone out, it gave me and my team a real headache finding this out.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s