Author |
Message
|
mehedi |
Posted: Thu Apr 12, 2012 10:08 am Post subject: Syntax for Filter expression using substring in Route Node |
|
|
Centurion
Joined: 11 Nov 2001 Posts: 102 Location: PSTech
|
The flow contains a RouteNode.
In the route node a field value is matched for and sent to destination.
Here is the path expression
$Body/A = 'ABCDEF'
The above deploys successfully.
When the path expression is changed as follow it fails to deploy
substring($Body/A,1,5) = 'ABCDEF'
So what is the valid syntax to use in the Route Node when SUBSTRING is used.
Error message on deploy
BIP6229E: Generic expression: It was not possible to parse an ESQL expression, in node 'RouteDownstreams'. An incorrect ESQL expression was supplied. An ESQL path element was expected.
Thanks
Mehedi |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 12, 2012 7:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Try not to pack everything into an inline function.
Go ahead and write 5 more lines of ESQL.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Omuch |
Posted: Mon Apr 16, 2012 10:55 pm Post subject: Re: Syntax for Filter expression using substring in Route No |
|
|
Acolyte
Joined: 23 Mar 2012 Posts: 54
|
mehedi wrote: |
When the path expression is changed as follow it fails to deploy
substring($Body/A,1,5) = 'ABCDEF'
Mehedi |
Don't you think that its impossible to check 5 length string with one of 6??
Try one of 5 like 'ABCDE' , it should work. |
|
Back to top |
|
 |
mehedi |
Posted: Tue Apr 17, 2012 6:54 am Post subject: |
|
|
Centurion
Joined: 11 Nov 2001 Posts: 102 Location: PSTech
|
Omuch, thanks for noticing that , but even if that is corrected it fails to deploy.
It seems this usage is not supported in the Route Node.
substring($Body/A,1,5) = 'ABCDE'
Thanks
Mehedi |
|
Back to top |
|
 |
Omuch |
Posted: Tue Apr 17, 2012 9:19 am Post subject: |
|
|
Acolyte
Joined: 23 Mar 2012 Posts: 54
|
mehedi wrote: |
It seems this usage is not supported in the Route Node.
substring($Body/A,1,5) = 'ABCDE'
|
It worked for me.
From the error message it looks like your Xpath is wrong, are you sure about your filed reference? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 17, 2012 7:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mehedi wrote: |
Omuch, thanks for noticing that , but even if that is corrected it fails to deploy.
It seems this usage is not supported in the Route Node.
substring($Body/A,1,5) = 'ABCDE'
Thanks
Mehedi |
You are quite right. Seems like you are trying to assign a value to something in the $Root tree. In a filter node this tree cannot be change. Put variables into the Environment!
Note that even without changing anything on the tree but just changing a reference (move and return as out) will cause a failure in the filter node. Had to replace it with a compute node...and it worked like a charm...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|