How to set value in expression for scheme in BizTalk orchestration?

1.4k Views Asked by At

When I want to compile, an error shown

use of unconstructed message

My code for expression is:

Message_2.Approved == false

XML code in scheme Article.xsd:

  <xs:element name="Approved">
  <xs:simpleType>
  <xs:restriction base="xs:boolean" /> 
  </xs:simpleType>
  </xs:element>

Message_2 is assigned to assigned to a Send shape.

And Message Type of Message_2 is BizTalk_Server_Project7.Article .

2

There are 2 best solutions below

3
On

It looks like there is something wrong with your property promotion.

You are trying to use 'Approved' as a distinguished field in your expression shape to set a value, which is perfect use of a distinguished field. Please review this tutorial on MSDN if you did everything right.

14
On

make sure that the used property is promoted or distinguished before can be used in your orchestration's expression shape. if your property will be used only in messagebox context and not outside(filters or pipelines) you can make simple and use distiguished field.