There are loads of things that we can't do in expression shape (more info)
Most obvious of them are can't use If/while for message assignment
e.g if(count==1)
{
somevariable = 1;
} is invalid but
if(count ==1)
{
//dosomethingbutassignment;
} is valid ;
I was just wondering why there are these limitations on expressions? One could argue that if it supports all constructs then we can have one expression shape in orchestration and thats it. I believe that discretion should be with developers.
Cheers
Vishy