Author |
Message
|
delerium |
Posted: Wed Jan 31, 2007 6:08 am Post subject: Parsing message whith Filter Node |
|
|
Novice
Joined: 27 Nov 2006 Posts: 13
|
Hi
I'am newbie in the message flows. I basically need to construct a little flow what parsing a Input Message and depending of parameter CODE, send a output message to respective Output Node. For this I have a flow composed for a Input Node, a Filter Node, and two Out Nodes.
The esql code is:
CREATE FILTER MODULE NODE_Filter
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE NAME_PROCEDURE CHARACTER;
DECLARE CODE CHARACTER;
DECLARE DESCRIPTION CHARACTER;
SET NAME_PROCEDURE = SUBSTRING(InputRoot.MRM.DATA FROM 1 FOR 22);
SET CODE = SUBSTRING(InputRoot.MRM.DATA FROM 23 FOR 25);
SET DESCRIPTION = SUBSTRING(InputRoot.MRM.DATA FROM 26 FOR 226);
SET OutputRoot.XML.Hdr.NAME_PROC = NAME_PROCEDURE;
SET OutputRoot.XML.Hdr.code = CODE;
SET OutputRoot.XML.Hdr.descript = DESCRIPTION;
-- it reviews code
IF CODE = '000' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
--RETURN TRUE;
END;
END MODULE;
I proved this code but they exist problems whith InputRoot.
Thanxs |
|
Back to top |
|
 |
gregop |
Posted: Wed Jan 31, 2007 6:19 am Post subject: |
|
|
Voyager
Joined: 24 Nov 2006 Posts: 81
|
|
Back to top |
|
 |
delerium |
Posted: Wed Jan 31, 2007 6:36 am Post subject: |
|
|
Novice
Joined: 27 Nov 2006 Posts: 13
|
I don't view this link
And a example of esql code...................
Please it's urgent
thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 31, 2007 6:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If it's urgent, then you should urgently view the link.
If you can't get to it, then you should say that.
Use a compute node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 31, 2007 6:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
delerium wrote: |
I don't view this link |
If you're a newbie, you should find out why you can't see this link and fix it.
It's a vital resource. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
john arden |
Posted: Mon Feb 12, 2007 5:12 am Post subject: ESQL Code knowledge. |
|
|
Novice
Joined: 21 Feb 2006 Posts: 19
|
I think your problem is in your understanding of the "substring" parameters. The "FOR" parameter is the length of the string you want NOT the end position as your sample seems to show.
Try the For as 3 for code and 200 for description and I think you will get a better result. _________________ John Arden |
|
Back to top |
|
 |
|