An invoke transmits data and can also receive a response from the target Web service.
The invoke activity adds an additional attribute to the correlation usage to account for its dual nature. The
pattern
attribute describes when the correlation set should be used.
If it is set to
request
, it applies only to the outbound message. In this case the input variable for the invoke is validated against the correlation set to ensure that the correct data is being transmitted.
If it is set to
response
, it ensures that the output variable populated from the invoked Web service matches the data in the correlation set.
If it is set to
request-response
, the data is validated on the way out and the way in.
If a correlation set is used prior to its initiation (that is, the initiate attribute is
no
) the BPEL engine throws a
bpel:correlationViolation fault
. This error is also thrown if a correlation set tries to validate the transmission of data that does not match.