I had a map to a webservice update message that used two input messages: the input message of the orchestration and the response message of a webservice get method. The call to the get method was contained in the If branch of a decide shape. The map to the update message was added after the decide shape. Then I got the error “message part has not been initialized in a construct statement“.
What’s the problem? Because the map to the update message was added after the decide shape, I was effectively saying the map had to be performed after either the If branch or the Else branch was executed. In the else branch no call the the webservice get method is made, so … no response message is constructed.
The solution was to reorganize the orchestration. The map to the webservice update message was moved to the If branch instead of being added after the decide shape. That solved the problem.