>>>>>InitialURL
--Is WSRR Logging ON
--Read WSRR configure or Read file configure
--true:WSRR, false:file
CREATE FILTER MODULE LogginOn_Filter
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE WSRR_FLAG CHARACTER;
CALL Common.GetESBProperty('WSRR_FLAG') INTO WSRR_FLAG;
IF WSRR_FLAG = 'true' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;
END MODULE;
--Initialise Request HTTP URL
CREATE DATABASE MODULE Initialise_Request_URL
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
--获取对应的URL的KEY值
DECLARE URL_KEY CHARACTER Common.GetEndPointByKey(Environment.Variables.operation);
IF URL_KEY IS NULL THEN
THROW USER EXCEPTION CATALOG 'BUS' MESSAGE 3998 values('Can not found operation:' || Environment.Variables.operation);
END IF;
--write debug log
CALL Common.WriteDebugLog('Begin invoke '|| Environment.Variables.operation ||' service, action = '|| URL_KEY);
DECLARE tmp CHARACTER;
DECLARE I INTEGER POSITION(',' IN URL_KEY);
WHILE I > 0 DO
SET tmp = SUBSTRING(URL_KEY BEFORE ',');
SET URL_KEY = SUBSTRING(URL_KEY AFTER ',');
CALL addInitURL(tmp);
SET I = POSITION(',' IN URL_KEY);
END WHILE;
IF URL_KEY IS NOT NULL THEN
CALL addInitURL(URL_KEY);
END IF;
RETURN TRUE;
END;
CREATE PROCEDURE addInitURL(IN key CHARACTER)
BEGIN
DECLARE URL CHARACTER Common.GetEndPointByKey(key);
-- Set HTTP/SOAP/SCA URL
CALL addRequestURL(LocalEnvironment,URL);
CALL addWebServiceURL(LocalEnvironment,URL);
CALL addSCAURL(LocalEnvironment,URL);
END;
END MODULE;
--Is WSRR Logging ON
--Read WSRR configure or Read file configure
--true:WSRR, false:file
CREATE FILTER MODULE LogginOn_Filter
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE WSRR_FLAG CHARACTER;
CALL Common.GetESBProperty('WSRR_FLAG') INTO WSRR_FLAG;
IF WSRR_FLAG = 'true' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;
END MODULE;
--Initialise Request HTTP URL
CREATE DATABASE MODULE Initialise_Request_URL
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
--获取对应的URL的KEY值
DECLARE URL_KEY CHARACTER Common.GetEndPointByKey(Environment.Variables.operation);
IF URL_KEY IS NULL THEN
THROW USER EXCEPTION CATALOG 'BUS' MESSAGE 3998 values('Can not found operation:' || Environment.Variables.operation);
END IF;
--write debug log
CALL Common.WriteDebugLog('Begin invoke '|| Environment.Variables.operation ||' service, action = '|| URL_KEY);
DECLARE tmp CHARACTER;
DECLARE I INTEGER POSITION(',' IN URL_KEY);
WHILE I > 0 DO
SET tmp = SUBSTRING(URL_KEY BEFORE ',');
SET URL_KEY = SUBSTRING(URL_KEY AFTER ',');
CALL addInitURL(tmp);
SET I = POSITION(',' IN URL_KEY);
END WHILE;
IF URL_KEY IS NOT NULL THEN
CALL addInitURL(URL_KEY);
END IF;
RETURN TRUE;
END;
CREATE PROCEDURE addInitURL(IN key CHARACTER)
BEGIN
DECLARE URL CHARACTER Common.GetEndPointByKey(key);
-- Set HTTP/SOAP/SCA URL
CALL addRequestURL(LocalEnvironment,URL);
CALL addWebServiceURL(LocalEnvironment,URL);
CALL addSCAURL(LocalEnvironment,URL);
END;
END MODULE;