Yossi Dahan [BizTalk]


Thursday, October 06, 2005

NullPartException in a Construct shape

This is just another one of those things in an orchestration that I expected to behave a bit differently...

I've Placed a Transform shape in a construct shape to map one message to another, as I've done so many times before, and it's all been working nicely for a while now.

Suddently I've started to get NullPartException thrown in the orchestration from the construct shape.

It didn't take a while to realise what is the cause of this - The input message I was receiving from an external application had changed and cause the map to generate an invalid output (according to the output schema set in the map). note that the map did not actually fail, only that the output generated is invalid.

I don't blame BizTalk for complaining, in fact - it's quite good that it does - makes the whoel thing stop before invalid messages gets delivered to other areas in the solution, but I'd hope to get a clearer message, would acutally be nice to get an error saying the message is invalid, and I know it might be too much to ask - but maybe also which node is causing it to fail?

This exception makes sense if you use an assign shape in a construct and, say, call a custom code to construct a message. or even assign a variable or another message to the constructed message.

In these cases its your responsibility to make sure what you're doing makes sense and that the assigned message is valid.

But I did expect the transform shape to provide a fuller error handling approach and a more specific information when errors are caused.