This presentation is part of the Services and Connectors Self-Study Course.
Data transformation is key to all system integration since data must be passed back and forth correctly between applications.
Transformation could be as simple as taking a string parameter and setting it into an integer property on the clipboard and for turning an incoming string of XML into a PageList; PRPC provides rules for us to easily accomplish this. To make use of data in a Service Request or a Connector Response, the data must be mapped to properties on the clipboard.
When PRPC is acting as the client, the Connector Activity may contain steps to transform the request and response.
- For simple data mapping the Property-Set method can be used
- For more complex data, Apply-Parse-Structured and Apply-Parse-Delimited methods are used to process structured files in the Connector Response.
- Apply-Parse-XML is used to parse values out of a string containing XML
- Property-Set-Stream can be used to compose a string containing XML in the Connector Request
You can also create your own custom Activities and Rule-Utility-Function rules to help with data transformation. Also, there are some specialized ways to perform data transformation that are dependent upon the integration protocol. For instance, data in Document style SOAP requests is mapped to the clipboard by using a series of Model rules.
Data transformation needs are similar when PRPC is executed as a service. The only difference is that you have the capability to configure mapping rules, such as Parse XML, directly in the Service Rule. Transformation for simple types can also be handled directly in the Service rule by mapping them directly to the clipboard. In many cases you can also perform data transformation within the Service Activity, just as in the Connector Activity, but it is easier and cleaner to do it in the Service Rule if you can.