An activatable receive must be the first executable statement in a service

Whenever we add the Orchestration to a project, the first thing which is done almost every time is to add Receive shape as the first shape.  That’s because we need to apply some process when some particular piece of info (message) is obtained. Thus initiating the process designed in the orchestration.

Well this raised a question, can’t other shapes be used as the first shape in Orchestration?

To find out, I added a loop shape as a first shape with a Receive shape within it. Logically it seemed correct as I want to receive messages until the loop condition is satisfied.

orchestration with loop

When clicked on build following error appeared

first executable statement

With all said it’s obvious to think that  the first shape has to be Receive Shape . Well there are exceptions, shapes  like Group shape, Scope Shape, Listen Shape, Parallel shape  and orchestrations configured with parameters to enable invocation from other orchestration.

Will keep sharing as and when find something!!!!! Happy New year to all !!!!!!!

Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post