...and everything in between RSS 2.0
# Friday, June 06, 2008

Recently I implemented a BizTalk web services interface that required the need to support SoapFault messages. I quickly fell into a common trap and received a compiler error:

error X2162: must receive before sending a fault message on an implemented port

(see Scott Colestock's post that nicely outlines his experience with the same issue)

As Scott describes, the solution involved using the succeeded() function to first test if a transaction scope had succeeded or not in order to send out my soap-fault correctly. I vaguely recalled this function but never used it in anger before. After having spent a hour or so I will never get back, I made a note-to-self to seek out and reacquaint myself with the other operators and functions available to use in expression shapes within an orchestration.

Here is the full list taken from the online documentation:

Operator

Description

Example

checked()

raise error on arithmetic overflow

checked(x = y * 1000)

unchecked()

ignore arithmetic overflow

unchecked(x = y * 1000)

new

create an instance of a class

myObject = new MyClass;

typeof

Type retrieval

myMapType = typeof(myMap)

succeeded()

test for successful completion of transactional scope or orchestration

succeeded(<transaction ID for child transaction of current scope or service>)

exists

test for the existence of a message context property

BTS.RetryCount exists Message_In

+

unary plus

+(int x)

-

unary minus

-(int x)

!

logical negation

!myBool

~

bitwise complement

x = ~y

()

cast

(bool) myInt

*

times

Weight = MyMsg.numOrders * 20

/

divided by

x / y

+

plus

x + y

-

minus

x - y

<<

shift left

x << 2

>>

shift right

x >> 2

<

less than

If (MyMsg.numOrders < 10)...

>

greater than

If (MyMsg.numOrders > 10)...

<=

less than or equal to

If (MyMsg.numOrders <= 10)...

>=

greater than or equal to

If (MyMsg.numOrders >= 10)...

==

equal to

If (MyMsg.numOrders == 10)...

!=

not equal to

If (MyMsg.numOrders != 10)...

&

and

If (myByte & 255)...

^

exclusive or

If (myByte ^ 1)...

|

or

If (myByte | 1)...

&&

conditional and

If (MyMsg.numOrders > 10) && (MyMsg.numOrders < 100)

||

conditional or

If (MyMsg.numOrders < 10) || (MyMsg.numOrders > 100)

//

commenting

//This is the comment

Since then, this little exercise has helped in a few occasions, particularly the need for the exists function when working with optional property schema fields.

I knew I should of read the manufacturers instructions smile_wink

Friday, June 06, 2008 12:42:47 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General
Navigation
Archive
<June 2008>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2014
Breeze
Sign In
Statistics
Total Posts: 64
This Year: 0
This Month: 0
This Week: 0
Comments: 182
Themes
Pick a theme:
All Content © 2014, Breeze
DasBlog theme 'Business' created by Christoph De Baene (delarou)