Samples
SPE includes samples of patterns for enveloping, de-enveloping, and transforming documents in IBM® Integration Bus message flows.
Envelope node samples
Patterns are available for immediate enveloping, for preparing messages for later enveloping, and for enveloping messages that were previously deferred and prepared for later enveloping.
The "ImmediateEnvelope" sample demonstrates how to envelope messages by using the Envelope node. The Envelope node's enveloping activity property is set to envelope documents immediately. All of the input messages are placed into an envelope and sent to the Out output terminal. Any messages that cannot be enveloped are passed to the error output terminal.
The "DeferredEnvelope" sample demonstrates how to prepare messages for later enveloping by using the Envelope node. Each message is passed into the Envelope node. Documents are prepared for later enveloping such that all of the input messages are persisted by SPE. Any messages that cannot be enveloped are passed to the error output terminal.
The "GetDeferredEnvelopes" sample demonstrates how to envelope messages that were previously prepared for later enveloping. A timer triggers the message flow. An activity property is set to envelope previously prepared documents so any documents persisted by SPE and that meet specified criteria are retrieved and enveloped. The documents are placed into an envelope and sent to the Out output terminal Any messages that cannot be enveloped are passed to the error output terminal.
De-envelope node samples
The "Deenvelope" sample demonstrates how to de-envelope a message by using the De-envelope node. Data is passed into the De-envelope node. Good data is sent to the Out output terminal. Bad data is sent to the error output terminal. Any acknowledgments that are generated by SPE are sent to the Ack output terminal.
The "LocalEnvironment" sample demonstrates how to find correlations, ProcessData, and Interchange Compliance Reports that are produced by IBM Standards Processing Engine as it de-envelopes, validates, and optionally transforms data.
Transform node samples
The "Transform" sample demonstrates how to run a simple transformation by using the Transform node. A Compute node demonstrates how to dynamically specify the map either by name, by location, or as an array of bytes. A second Compute node demonstrates how to extract the translation report that is produced by SPE in the event of a map failure.
The "ComplexTransformation" sample demonstrates how to run a map that has multiple inputs and outputs. A Collector node is used to assemble the various inputs into a message collection that can be passed to the input terminal on the Transform node. Output terminals can be added to the Transform node for each output that is produced by the map.