none
How to set i value to element inside orchestration message assignment shape

    Question

  • Hi All,

    I want to set today's date to element i did following steps but while building project i get error as :

    Error 19 use of unconstructed message 'Message_IN_SPARES_POSTSHIP_DAILY' D:\BizTalk_Project_testing\BizTalk Server Project_Domestic\BizTalk Server Project_Domestic\BizTalk Orchestration_SPARES_POSTSHIP_DAILY.odx 250 64 

    Steps i did is promoted the element as distinguished field.

    2. Then inside message assignement share i worte

    'Message_IN_SPARES_POSTSHIP_DAILY' .DAT =

    Message_IN_SPARES_POSTSHIP_DAILY.DAT = System.DateTime.Today.Date.ToString();

     

    3.  In Construct message property i set thi
    s message.

    Pls advise how can i set element with today's date.


    -- Kind Regards Sandeep
    Tuesday, September 20, 2011 6:36 AM

Answers

  • In construct shape

     

    Outputmessage (the new message) = InputMessage(The message you want to modify)

    Then you can use the distuinguished field and assign the value.

    Messages are immutable so you cannot change an already existing message. If you want to do so you have to create a new message based on the old one

     


    Well0549, Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread
    • Proposed as answer by Well0549 Tuesday, September 20, 2011 7:27 AM
    • Marked as answer by Sandeep.Handa Thursday, September 22, 2011 4:36 AM
    Tuesday, September 20, 2011 7:27 AM

All replies

  • Did you marked the field as a distuinguished field in the schema ?

    If you do so your code would probably work


    Well0549, Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread
    • Proposed as answer by Well0549 Tuesday, September 20, 2011 6:42 AM
    Tuesday, September 20, 2011 6:42 AM
  • In the construct shape enclosing the message assignment shape(where you have specified the code in step 2 above) construct the message 'Message_IN_SPARES_POSTSHIP_DAILY' by selecting this message in the Message drop down for the construct shape. Seems you have not constructed this message.

    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Tuesday, September 20, 2011 6:56 AM
  • You will have to construct the message. This error will occur only when you are not constructing the message properly.

    As it seems you are on a Dev Server, try doing a temp send port in your orchestration with this message to a file location and see if this message is getting creating.


    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Tuesday, September 20, 2011 6:58 AM
  • Hi All,

    Pls advise how can construct the message as i already did step 3.

     I also see error while building project as

    Error 18 'Message_IN_SPARES_POSTSHIP_DAILY': message has not been initialized in construct statement D:\BizTalk_Project_testing\BizTalk Server Project_Domestic\BizTalk Server Project_Domestic\BizTalk Orchestration_SPARES_POSTSHIP_DAILY.odx 252 14 


    -- Kind Regards Sandeep
    Tuesday, September 20, 2011 7:01 AM
  • Hi All,

    Pls advise how can construct the message as i already did step 3.

     I also see error while building project as

    Error 18 'Message_IN_SPARES_POSTSHIP_DAILY': message has not been initialized in construct statement D:\BizTalk_Project_testing\BizTalk Server Project_Domestic\BizTalk Server Project_Domestic\BizTalk Orchestration_SPARES_POSTSHIP_DAILY.odx 252 14 


    -- Kind Regards Sandeep

    To Get rid of this error you need to initialize the message for help see this post on how to construct a message.

    To get rid of other error in the properties of the construct shape see the property Message and select the message Message_IN_SPARES_POSTSHIP_DAILY in the drop down.


    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Tuesday, September 20, 2011 7:24 AM
  • In construct shape

     

    Outputmessage (the new message) = InputMessage(The message you want to modify)

    Then you can use the distuinguished field and assign the value.

    Messages are immutable so you cannot change an already existing message. If you want to do so you have to create a new message based on the old one

     


    Well0549, Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread
    • Proposed as answer by Well0549 Tuesday, September 20, 2011 7:27 AM
    • Marked as answer by Sandeep.Handa Thursday, September 22, 2011 4:36 AM
    Tuesday, September 20, 2011 7:27 AM
  • Hi All,

    Pls advise how can construct the message as i already did step 3.

     I also see error while building project as

    Error 18 'Message_IN_SPARES_POSTSHIP_DAILY': message has not been initialized in construct statement D:\BizTalk_Project_testing\BizTalk Server Project_Domestic\BizTalk Server Project_Domestic\BizTalk Orchestration_SPARES_POSTSHIP_DAILY.odx 252 14 


    -- Kind Regards Sandeep

    In the construct shape select the message that you are constructing. This will be the Message property of the shape.

    If there are too many messages in this orchestration, I would suggest just rename the message and see if the target construct shows a warning.

     


    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    • Edited by DPS Bali Tuesday, September 20, 2011 7:30 AM
    Tuesday, September 20, 2011 7:30 AM