500 WebSphere Business Integration Adapters
IF InputRoot.MRM.verb = 'Retrieve'
AND InputRoot.Properties.MessageType = 'RM_Tenant' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname
='ResponseRetrieve';
ELSE
-- CREATE MAINTENANCE RESPONSE
IF InputRoot.MRM.verb = 'Create' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname
='ResponseCreate';
ELSE
-- RESPONSE FROM CONTRACTOR UPDATE REQUEST
IF InputRoot.MRM.verb = 'Update' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname
='ResponseUpdate';
END IF;
END IF;
END IF;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
7. Save this ESQL.
8. Open properties of the ResponseRetrieve label (see Figure 26-30 on
page 501).