INSERT INTO MWCONFIG.ADAPTOR (ID, DESCRIPTION, ASYNCHRONOUS, MODIFIED_BY, TIMESTAMP)
	VALUES ('dtm-30803', 'Dummy ITM Conn', 1, CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.ADAPTOR_CODEX (ADAPTOR_ID, ID, CODEX_ID)
	VALUES 
		('dtm-30803', 'incoming', 'iso-8583-itmibft'),
		('dtm-30803', 'outgoing', 'iso-8583-itmibft');

INSERT INTO MWCONFIG.ADAPTOR_PARAM (ADAPTOR_ID, NAME, VALUE)
	VALUES ('dtm-30803', 'maxConnection', '1');

INSERT INTO MWCONFIG.SERVER_PORT (ADAPTOR_ID, PORT, SERVER, GROUP)
	VALUES ('dtm-30803', 30803, 'dummy-server', 'dtm');

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.default-mapping', NULL, '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dtm.default-mapping', 1, '/data', '/data', NULL, NULL),
		('dummy-res.dtm.default-mapping', 2, '/data/body', '/data/body', NULL, NULL);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE (MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ)
	VALUES 
		('dummy-res.dtm.default-mapping', 1, '@', 'copyMessage();', NULL),
		('dummy-res.dtm.default-mapping', 2, 'messageType', '${msg.messageType.''!value''.substring(0,2).concat("10")}', NULL),
		('dummy-res.dtm.default-mapping', 2, 'responseCode', '00', NULL);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.default-transaction-mapping', NULL, '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES ('dummy-res.dtm.default-transaction-mapping', 3, '/data/body', '/data/body', NULL, NULL);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE (MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ)
	VALUES 
		('dummy-res.dtm.default-transaction-mapping', 3, 'dateCapture', '${msg.dateLocalTransaction}', NULL),
		('dummy-res.dtm.default-transaction-mapping', 3, 'reservedPrivate1', 'BTN4PRO100000000000', NULL),
		('dummy-res.dtm.default-transaction-mapping', 3, 'receivingInstitutionIdentificationCode', '20000000001', NULL);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.0800.000001', 'SIGN ON', '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dtm.0800.000001', 1, '/data', '/data', 'dummy-res.dtm.default-mapping', 1),
		('dummy-res.dtm.0800.000001', 2, '/data/body', '/data/body', 'dummy-res.dtm.default-mapping', 2);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.0800.000301', 'ECHO TEST', '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dtm.0800.000301', 1, '/data', '/data', 'dummy-res.dtm.default-mapping', 1),
		('dummy-res.dtm.0800.000301', 2, '/data/body', '/data/body', 'dummy-res.dtm.default-mapping', 2);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.0200.450000', NULL, '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dtm.0200.450000', 1, '/data', '/data', 'dummy-res.dtm.default-mapping', 1),
		('dummy-res.dtm.0200.450000', 2, '/data/body', '/data/body', 'dummy-res.dtm.default-mapping', 2),
		('dummy-res.dtm.0200.450000', 3, '/data/body', '/data/body', 'dummy-res.dtm.default-transaction-mapping', 3);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE (MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ)
	VALUES 
		('dummy-res.dtm.0200.450000', 2, 'responseCode', '00', 10);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dtm.0200.650000', NULL, '[dtm]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dtm.0200.650000', 1, '/data', '/data', 'dummy-res.dtm.default-mapping', 1),
		('dummy-res.dtm.0200.650000', 2, '/data/body', '/data/body', 'dummy-res.dtm.default-mapping', 2),
		('dummy-res.dtm.0200.650000', 3, '/data/body', '/data/body', 'dummy-res.dtm.default-transaction-mapping', 3);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE (MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ)
	VALUES 
		('dummy-res.dtm.0200.650000', 2, 'responseCode', '00', 10);
-- CLIENT TARGET

INSERT INTO MWCONFIG.ADAPTOR (ID, DESCRIPTION, ASYNCHRONOUS, MODIFIED_BY, TIMESTAMP)
    VALUES ('itm-conn', NULL, 1, CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.ADAPTOR_CODEX (ADAPTOR_ID, ID, CODEX_ID)
    VALUES 
        ('itm-conn', 'incoming', 'iso-8583-itmibft'),
        ('itm-conn', 'outgoing', 'iso-8583-itmibft');
		
INSERT INTO MWCONFIG.ADAPTOR_PARAM (ADAPTOR_ID, NAME, VALUE)
    VALUES
        ('itm-conn', 'echo', '60000'),
        ('itm-conn', 'needSignOn', 'true'),
        ('itm-conn', 'timeout', '60000');

INSERT INTO MWCONFIG.CLIENT (ADAPTOR_ID, IDLE_WAIT, TIMEOUT, CLOSE_QUEUE, CONTROL_QUEUE, KEEP_CONN, REUSE_DELAY, NODE)
    VALUES('itm-conn', 0, 0, NULL, NULL, 1, 0, 'billpayClientNode');
INSERT INTO MWCONFIG.CLIENT_TARGET (CLIENT_ID, ID, HOST, WEIGHT, SEQ)
    VALUES ('itm-conn', 'itm-conn', 'DUMMY:30803', 0, 1);

INSERT INTO MWCONFIG.MAPPING(ID, DESCRIPTION, MODIFIED_BY, TIMESTAMP, MODULE) VALUES ('itm-conn.SIGN-ON', null, CURRENT USER, CURRENT TIMESTAMP, '[sms]');
INSERT INTO MWCONFIG.MAPPING_GROUP(MAPPING_ID, ID, "SOURCE", TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID) VALUES ('itm-conn.SIGN-ON', 1, '/data', '/data/body', null, null);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, '!destination', '${msg.source}', 1);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, '!mid', '${tar.transmissionDateTime."!value"+"."+tar.systemsTraceAuditNumber."!value"}', 9);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, '!nosignon', 'true', 6);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, '!sid', '${msg.sid}', 7);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, 'messageType', '0800', 2);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, 'networkManagementInformationCode', '001', 5);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, 'systemsTraceAuditNumber', '${counter("itm-conn", 5, 1, "ddMMyy")} ', 3);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.SIGN-ON', 1, 'transmissionDateTime', '${getTimeZoneFormat("MMddHHmmss","GMT")}', 4);


INSERT INTO MWCONFIG.MAPPING(ID, DESCRIPTION, MODIFIED_BY, TIMESTAMP, MODULE) VALUES ('itm-conn.ECHO-TEST', null, CURRENT USER, CURRENT TIMESTAMP, '[sms]');
INSERT INTO MWCONFIG.MAPPING_GROUP(MAPPING_ID, ID, "SOURCE", TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID) VALUES ('itm-conn.ECHO-TEST', 1, '/data', '/data/body', null, null);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, '!destination', '${msg.source}', 1);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, '!mid', '${tar.transmissionDateTime."!value"+"."+tar.systemsTraceAuditNumber."!value"}', 9);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, '!nosignon', 'true', 6);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, '!sid', '${msg.sid}', 7);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, 'messageType', '0800', 2);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, 'networkManagementInformationCode', '001', 5);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, 'systemsTraceAuditNumber', '${counter("itm-conn", 5, 1, "ddMMyy")} ', 3);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('itm-conn.ECHO-TEST', 1, 'transmissionDateTime', '${getTimeZoneFormat("MMddHHmmss","GMT")}', 4);
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE(MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) VALUES ('pslpay-itm-conn.ECHO-TEST', 1, 'networkManagementInformationCode', '301', null);



