none
Distinguished Fields -- Construct Shape RRS feed

  • Question

  • Hi All,

    Trying the set some values of message by reading from SSO, 
    I have promoted the fields as distinguished and assign values in construct shape

    getting SSO in Expression
    strAgency= SSOClientHelper.SSOClientHelper.Read("BTSApplication", "AgencyName");

    I have map generates DestMessage before the construct

    Contruct shape
    DestMessage.Security.Agency=strAgency;

    But Getting Error Use of Unconstructed Message 'DestMessage'
    Error 141 'DestMessage': message has not been initialized in construct statement

    Any suggestions
    Thursday, September 3, 2015 8:17 AM

Answers

  • Hi BTSUser,

    This is happening because you have created a message(by map) and now you are trying to modify the message without initializing it. This error is because messages are immutable and you are trying to modify the message.

    Try moving the message assignment shape into the construct shape below the transform shape. 

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards

    Rahul Madaan

    biztalkvillage.blogspot.com

    • Proposed as answer by SMSVikasKEditor Saturday, September 5, 2015 8:53 AM
    • Marked as answer by BTS User Tuesday, September 8, 2015 8:43 AM
    Thursday, September 3, 2015 9:49 AM

All replies

  • can you provide a snapshot of your orchestration?

    Do you have ONE Construct Shape with TWO shapes (Transform followed by Assignment) or do you have TWO Construct shapes (one with Transform and One with Assignment). IMHO the later is the probable cause of this error.

    Regards.

    • Marked as answer by BTS User Thursday, September 3, 2015 8:40 AM
    • Unmarked as answer by BTS User Thursday, September 3, 2015 8:40 AM
    Thursday, September 3, 2015 8:26 AM
  • Hi BTSUser,

    This is happening because you have created a message(by map) and now you are trying to modify the message without initializing it. This error is because messages are immutable and you are trying to modify the message.

    Try moving the message assignment shape into the construct shape below the transform shape. 

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards

    Rahul Madaan

    biztalkvillage.blogspot.com

    • Proposed as answer by SMSVikasKEditor Saturday, September 5, 2015 8:53 AM
    • Marked as answer by BTS User Tuesday, September 8, 2015 8:43 AM
    Thursday, September 3, 2015 9:49 AM
  • Hi,

    You are getting this error in the Contrcut shape where you are using:

    DestMessage.Security.Agency=strAgency;

    Move the "Message Assignment shape" containg the above expression in the "Construct Shape" that contains the map that generates the DestMessage after the "Transform Shape".

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Rahul

    • Proposed as answer by SMSVikasKEditor Saturday, September 5, 2015 8:52 AM
    Thursday, September 3, 2015 10:25 AM
  • Hi BTSUser,

    Configure the messages constructed property (Transform shape - destination message)

    Construct shape

    - Transform Shape.

    - Assignment shape with your expression.

    Looks like 

    Mapping and Assigning values to fields

    Note

    Make sure that the field you are trying to update is constructed in mapping.

    Thanks, SMSVikasK

    Friday, September 4, 2015 11:20 AM
    Answerer