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



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

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

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

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dcs.default-mapping', NULL, '[dcs]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES 
		('dummy-res.dcs.default-mapping', 1, '/data', '/data', NULL, NULL),
		('dummy-res.dcs.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.dcs.default-mapping', 1, '@', 'copyMessage();', NULL),
		('dummy-res.dcs.default-mapping', 2, 'messageType', '${msg.messageType.''!value''.substring(0,2).concat("10")}', NULL),
		('dummy-res.dcs.default-mapping', 2, 'responseCode', '00', NULL);

INSERT INTO MWCONFIG.MAPPING (ID, DESCRIPTION, MODULE, MODIFIED_BY ,TIMESTAMP) VALUES ('dummy-res.dcs.default-transaction-mapping', NULL, '[dcs]', CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID)
	VALUES ('dummy-res.dcs.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.dcs.default-transaction-mapping', 3, 'dateCapture', '${msg.dateLocalTransaction}', NULL),
		('dummy-res.dcs.default-transaction-mapping', 3, 'reservedPrivate1', 'BTN4PRO100000000000', NULL),
		('dummy-res.dcs.default-transaction-mapping', 3, 'receivingInstitutionIdentificationCode', '20000000001', NULL);

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

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

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

-- CLIENT TARGET

INSERT INTO MWCONFIG.ADAPTOR (ID, DESCRIPTION, ASYNCHRONOUS, MODIFIED_BY, TIMESTAMP)
    VALUES ('itm-conn-cms', NULL, 1, CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.ADAPTOR_CODEX (ADAPTOR_ID, ID, CODEX_ID)
    VALUES 
        ('itm-conn-cms', 'incoming', 'iso-8583-itmibft'),
        ('itm-conn-cms', 'outgoing', 'iso-8583-itmibft');
INSERT INTO MWCONFIG.ADAPTOR_PARAM (ADAPTOR_ID, NAME, VALUE)
    VALUES
        ('itm-conn-cms', 'echo', '60000'),
        ('itm-conn-cms', 'needSignOn', 'true'),
        ('itm-conn-cms', 'timeout', '60000');

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

INSERT INTO MWCONFIG.MAPPING (ID, MODULE, MODIFIED_BY, TIMESTAMP) VALUES ('itm-conn-cms.SIGN-ON', null, CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID) 
    VALUES ('itm-conn-cms.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-cms.SIGN-ON', 1, 'systemsTraceAuditNumber', '${counter("itm-conn-cms", 5, 1, "ddMMyy")} ', 10),
        ('itm-conn-cms.SIGN-ON', 1, 'transmissionDateTime', '${getTimeZoneFormat("MMddHHmmss","GMT")}', 10),
        ('itm-conn-cms.SIGN-ON', 1, '!mid', '${tar.transmissionDateTime."!value"+"."+tar.systemsTraceAuditNumber."!value"}', 20),
        ('itm-conn-cms.SIGN-ON', 1, '!destination', '${msg.source}', null),
        ('itm-conn-cms.SIGN-ON', 1, '!nosignon', 'true', null),
        ('itm-conn-cms.SIGN-ON', 1, '!reqtimestamp', '${head.reqtimestamp}', null),
        ('itm-conn-cms.SIGN-ON', 1, '!sid', '${msg.sid}', null),
        ('itm-conn-cms.SIGN-ON', 1, 'dateLocalTransaction', '${getTimeZoneFormat("MMdd","GMT")}', null),
        ('itm-conn-cms.SIGN-ON', 1, 'messageType', '0800', null),
        ('itm-conn-cms.SIGN-ON', 1, 'networkManagementInformationCode', '001', null),
        ('itm-conn-cms.SIGN-ON', 1, 'timeLocalTransaction', '${getTimeZoneFormat("HHmmss","GMT")}', null);

INSERT INTO MWCONFIG.MAPPING (ID, MODULE, MODIFIED_BY, TIMESTAMP) VALUES ('itm-conn-cms.ECHO-TEST', null, CURRENT USER, CURRENT TIMESTAMP);
INSERT INTO MWCONFIG.MAPPING_GROUP (MAPPING_ID, ID, SOURCE, TARGET, INCLUDE_MAPPING_ID, INCLUDE_ID) 
    VALUES 
	('itm-conn-cms.ECHO-TEST', 1, '/data', '/data/body', 'itm-conn-cms.SIGN-ON', '1');
INSERT INTO MWCONFIG.MAPPING_GROUP_LINE (MAPPING_ID, MAPPING_GROUP_ID, NAME, TEXT, SEQ) 
    VALUES 
	('itm-conn-cms.ECHO-TEST', 1, 'networkManagementInformationCode', '301', null);


