If statement in BizTalk expression shape

DarkW1nter picture DarkW1nter · Feb 9, 2012 · Viewed 7.6k times · Source

I've read conflicting things about this so before I start the work, can anyone confirm or otherwise if If statements will work inside BizTalk expression shapes?

Answer

Richard Hanley picture Richard Hanley · Feb 9, 2012

Yes they do work, I've used them in a Biztalk 2006r2 expression shape (IF() {} else {} etc.).

You can't control the flow through the orchestration with them though. You will want to use a decide shape for that (which acts like an IF statement).

I tend to use IF statements in expressions to set a variable e.g. :

 if (somecondition)
 {
   somevariable = true;
 }
 else
 {
   somevariable = false;
 }

Hope that helps!