Handle a response received within a <call> element.
A <response> element is an optional child element of <call>. Inside the <call> context, the <response> element specifies the type (class name) of the response to return from the call. The <response> element can also contain one or more <assign> elements. For example:
<call name="FindSalary" target="MyApp.PayrollApp" async="1">
<assign property="callrequest.Name" value="request.Name" />
<assign property="callrequest.SSN" value="request.SSN" />
<assign property="context.Salary" value="callresponse.Salary" />
When a call returns a response to the calling business process, any output parameters from the message type named in the <response> element become properties of the callresponse object in the business process execution context. Since callresponse only has meaning inside the <response> element, to preserve these values the <response> element must provide <assign> elements that assign callresponse values to properties of other, more permanent objects in the business process execution context, usually context or response.
For further discussion, see the documentation for <call> and <assign>.
While a <request> element is required inside every <call>, a <response> is not. If the <response> element is omitted from a <call> element, no response is returned from the <call>, even if the <request> type is designed to return a response. When the <request> is asynchronous, the <assign> elements within the body of the <response> element are executed only after the call response is received. There is no guarantee when this will occur, so a business process will typically use the <sync> element to wait for an asynchronous response.
If a response is not received within the timeout period specified by the <sync> element, then the assignments defined by the corresponding <response> block will not be executed. The response itself will be marked with a status of Discarded.