Sometimes, particularly after assignments (if we did not use the validation in the assignments), it makes sense to validate the variables against their associated XML Schemas and WSDL definitions. By validation, we mean verifying whether the XML stored in a variable corresponds to the XML schema definition (for element type variables) or XML type (for type variables) or WSDL message (for message type variables). Typical scenarios for validation include the following:
We can validate the variables explicitly using the <validate>
activity.
It is very simple to validate variables. We just have to list all of the variable names that we would like to validate. We separate the variable names with a space. The syntax is as follows:
<validate variables="BPELVariableNames" />
For example, if we would like to validate the variables BookstoreAResponse
and BookstoreBResponse
, we would write the following:
<validate variables="BookstoreAResponseBookstoreBResponse" />