BizTalk Server Orchestration - A tougher case of "message part has not been initialized in constr

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > January 2005 > A tougher case of "message part has not been initialized in constr





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author A tougher case of "message part has not been initialized in constr
Neal Walters

2005-01-26, 5:54 pm

I have an orchestration that has grown from it's original simple form to
something much more complex. I'm going to try to describe the problem in
detail - but I realize it may not make much sense to anybody but me.

I had some error handing code that was repeated three times in the orch, so
I decided to set a flag, let the logic fall through, then at the bottom of
the orchestration, I have a Decide shape that then handles 3 possible
conditions:
1) Call Web Service method1 to good results from a previous WebService in a
thirdy party system
2) Call Web Service method2 to store any application exception from a
previous WebService into third party system (this was the case that I had
previously repeated 3 times in three different branches of the
orchestration).
3) Or just fall through and do nothing.

In case 1 and 2, I also need error handling to save the results in the
freaky case that the Case1 or Case2 webservice is unavailable after x
retries.

So in Case1, I want to write a previous message to a flat file port.
I'm getting this compiler message:
error X2149: 'mRedSubmitResp.SubmitOrderForRedScoreResult': message part
has not been initialized in construct statement.

Now I know for a fact, that it is impossible to get to Case 1 without this
message being returned from a previous WebService.

I'm thinking that the compiler doesn't trust my flags, and the compiler is
thinking that I may be running Case1 but the compiler cannot guarantee that I
ran through the logic to build the message I want to send in Case1.

Thus, I have to "fool the compiler".

I have added the following code (in a msg-Assignment inside a construct) at
the very top of the orchestration in a group box called "Fool the Compiler"
and it seems to make the compiler happy so far.

vXmlDoc.LoadXml("<FakeOutCompiler></FakeOutCompiler");
mRedSubmitResp.SubmitOrderForRedScoreResult = vXmlDoc;

This has got me past the compiler errors, but I haven't started my testing
yet. I also know the message are immutable, and I'm surprised I can
construct this message and also use it later on a "Receive" shape.

Any ideas or suggested would be appreciated.

Thanks,
Neal Walters
http://Biztalk-Training.com





Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com