Unfortunately, I dont have the issues at hand. But:
I always have to copy itemdefinitions, messages, interfaces and errors to the top of the xml document (before the process tag opens), in that exact same order order.
if the messages for example are defined after the interfaces, I get the exceptions that messages are not defined.
Also, any property is usually (for example a process variable x) just before the process tag closes.
However, I always have to move the properties to the top just after the process tag opens. Basically between the <process> and <startevent> tags.
If I get my hands on my sample snippets, I ll post them.