none
Message has not been initialized in construct statement, Orchestation error RRS feed

  • Question

  • Hi All,

    I am getting following orchestration error when trying to build my project....

    1) DEFRequest': message has not been initialized in construct statement
    2) use of unconstructed message 'ABCRequest
    3) 'ABCRequest': message has not been initialized in construct statement
    4) use of unconstructed message 'DEFResponse'
    5) 'DEFResponse': message has not been initialized in construct statement




    Thanks and Regards, Nitin.

    Tuesday, July 28, 2015 7:11 AM

Answers

  • Hi ohawari,

    thanks to your and all for help on this...

    it's working fine now.... 


    Thanks and Regards, Nitin.

    • Marked as answer by Nitin Surya Tuesday, July 28, 2015 9:14 AM
    Tuesday, July 28, 2015 9:14 AM

All replies

  • Hi Nitin,

    This kind of error is thrown when BizTalk cannot guarantee that a specific message is constructed before it's used inside the orchestration.

    Please, to be more precise in the response, you should tell us which message is received first in the orchestration, and check which message is constructed on each Construct Shape.

    Regards.


    When an answer is helpful, please vote as helpful, propose as answer and/or mark as answer



    • Edited by ohawari Tuesday, July 28, 2015 7:27 AM
    Tuesday, July 28, 2015 7:25 AM
  • What is the message you receive in Receive_1 ?

    What is the message you're constructing in ConstructMessage_1 ? Can you post the contents of MessageAssignment_1?

    What message are you constructing in ConstructMessage_2 ? What is the source/destination of the Transform_1?

    and finally what are sending in Send_2?

    Regards.

    Tuesday, July 28, 2015 7:28 AM
  • Nitin,

    It will be easier to answer or for future reference if orchestration follows naming conventions. It would be total guess to answer:

    1)DEFRequest': message has not been initialized in construct statement

    In the ConstructMessage_2, select the properties and make sure the message type is DEFRequest
    2) use of unconstructed message 'ABCRequest'

    Check if in the ConstructMessage_1, if ABCRequest is properly declared. According to the image, ABCRequest is not a multipart message, so it could be that the in the XPath or similar in ConstructMessage_1 is not properly defined
    3) 'ABCRequest': message has not been initialized in construct statement

    Check if the ABCRequestResponsePort actually has ABCRequest as which you expect before construct message
    4) use of unconstructed message 'DEFResponse'

    This is at the later part of the image, DEFRequestResponsePort's response value's message type dont match the declared value in expression/Construct
    5) 'DEFResponse': message has not been initialized in construct statement

    Due to the above, the compiler do not understand the uninitialized object here DEFResponse. 

    Tuesday, July 28, 2015 8:01 AM
  • In Receive_1 message type is ABCRequest

    ABCRequestResponsePort :
    Request is of type : ABCRequest
    Response is of type : ABCResponse

    DEFRequestResponsePort :
    Send is of type : DEFRequest
    Resposne is of type : DEFResponse

    In ConstructMessage_1 i am assigning ABCRequest = system.xml.xmldocument;

    In ConstructMessage_2 i am executing Map ABC_To_DEF and assigning the message of type ABCRequest and DEFRequest.

    Source to this map is ABCRequest Schema and Destination is DEFRequest schema.

    the response receiving back from DEF application is executing the DEF_To_ABCMap and send the response back to ABC application.


    Thanks and Regards, Nitin.

    Tuesday, July 28, 2015 8:32 AM
  • Hi Nitin

    If you are receiveing the ABCRequest message in the ABCRequestResponsePort Receive_1 shape, why are you assigning it to System.Xml.XmlDocument?

    I think you can remove this ConstructMessage_1 shape and use the ABCRequest message as input in the ConstructMessage_2 shape.

    Regards.


    When an answer is helpful, please vote as helpful, propose as answer and/or mark as answer

    Tuesday, July 28, 2015 8:43 AM
  • Hi all,

    Sorry for the confusion...

    here is what i am trying to do ...

    Want to send the Message cmg from ABCApplication to DEFApplication through the Biztalk application.

    For this ...

    Four Schema : ABCRequest, ABCResponse, DEFRequest, DEFResposne.

    2 Maps : ABC_To_DEFRequestMap, DEF_To_ABCResposenMap.

    One Orchestration to execute this....(i am using orchestration cause i will implement some busyness logic in here in future)

    Orchestation contains : 

    Four Messages 2 for ABCApplicaiton(Request and Response)  and Two for DEFApplication.

    Two Ports one for ABC (receive and send message ) / Port Type and one for DEF application (Will send and receive) / PortType.

    Shapes :

    Receive - ABCRequest Message

    Construct - Message Assignment - ABCRequest Message and DEFRequest Message to initialize the message

    Construct - Transform Shape -  ABCRequest Message and DEFRequest Message to execute the Map ABC to DEF

    Send  - DEFRequest Type

    Receive - DEF Response Type

    Construct - Transform Shape -  DEFResposne Message andABCResponse Message to execute the Map DEF to ABC Resposne map.

    Send - ABCResponseType to send the response back to ABCApplicaiton

    Hope this will help you to understand what i am trying to do.....

    thanks....


    Thanks and Regards, Nitin.

    Tuesday, July 28, 2015 8:48 AM
  • Hi Nitin,

    You should do the following:

    • First receive shape will receive the ABCRequest message from the ABCRequestResponse port.
    • The ConstructMessage_1 shape should be removed so it's not needed.
    • The ConstructMessage_2 shape will construct DEFRequest message. It runs the map ABC_To_DEFRequestMap that receives as input the ABCRequest message and creates the DEFRequest message.
    • Send the DEFRequest message in the Send shape of the DEFRequestResponse port.
    • Receive the DEFResponse message in the Receive shape of of the DEFRequestResponse port.
    • The ConstructMessage_3 shape will construct the ABCResponse message. It runs the map DEF_To_ABCResposenMap that receives as input the DEFResponse message and creates the ABCResponse one.
    • ABCResponse message will be sent as the response to the ABCRequestResponse port

    Regards


    When an answer is helpful, please vote as helpful, propose as answer and/or mark as answer

    Tuesday, July 28, 2015 8:58 AM
  • Hi ohawari,

    thanks to your and all for help on this...

    it's working fine now.... 


    Thanks and Regards, Nitin.

    • Marked as answer by Nitin Surya Tuesday, July 28, 2015 9:14 AM
    Tuesday, July 28, 2015 9:14 AM
  • Can you let us know if any Post assisted you in solving you problem so it can be marked as Helpful or as the Answer?
    Tuesday, July 28, 2015 11:32 AM
    Moderator