CREATE COMPUTE MODULE TestFlow_Compute1
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
--CALL CopyEntireMessage();
SET OutputRoot.EmailOutputHeader.To = 'abcd123@gmail.com';
SET OutputRoot.EmailOutputHeader.From = 'xyz456@gmail.com';
SET OutputLocalEnvironment.Destination.Email.SMTPServer ='smtpout.secureserver.net:25';
DECLARE sid INTEGER InputRoot.XMLNSC.emp.eid;
DECLARE track CHARACTER InputRoot.XMLNSC.emp.etid;
DECLARE sname CHARACTER InputRoot.XMLNSC.emp.ename;
DECLARE sorg CHARACTER InputRoot.XMLNSC.emp.eorg;
DECLARE ssal INTEGER InputRoot.XMLNSC.emp.esal;
SET OutputRoot.XMLNSC.Data.Result.cty=PASSTHRU('SELECT city from ITGDB.mssusr14.collector where targetid='||track TO Database.mss);
SET OutputRoot.XMLNSC.Data.Result.id1=sid;
SET OutputRoot.XMLNSC.Data.Result.nme=sname;
SET OutputRoot.XMLNSC.Data.Result.or=sorg;
SET OutputRoot.XMLNSC.Data.Result.sl=ssal;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = 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;
我使用上面的 esql 代码将数据发送到电子邮件输出节点,但它没有传播。你能告诉我代码中的错误是什么吗?