on 2005 May 18 3:39 PM
Hi all,
well i am using <b>conditions</b> during <b>Interface Determination</b> and according to the result of the condition a mapping program is triggered.
Now i am using <b>XPath.</b>
In my file i have a field called amount. The total of the amount field is stored in the trailer in a field called total.
Is there anyway that using XPath i can check if the sum of the amount field that r in the file is equal to the value in the total field?
a sample file would be as shown below ...
01xxxxxxxxxxxxxxxxxx -
header
02xxxxxxx10000xxxxxx ---
02xxxxxxx20000xxxxxx | body
02xxxxxxx10000xxxxxx ---
03xxx40000xxxxxxxxxx -
trailer
eg.
the sum of the amount field in the body (100002000010000) should be compared to that
in the trailer (40000) [the values in the amount field
will vary so does the total accordingly ]
can anybody suggect a solution ??
Regards,
ShabZ
Hi,
1) Create an message interface for intermediate purposes.(which will have a field "flag" ).
2) Design a mapping which performs your validations, (sum of body == trailers) (success/ failure) and assign the same to the intermediate Message interface ( set the flag).
3) Now you can use this flag value and perform a interface determination.
Hope this helps you.
Regards,
Siva Maranani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabarish,
The only thing I can think off at the moment is to check the calculation in a BPM and set the "send context" property of the send step (so two send steps, one for equal, one for not equal) and check this value in the interface determination.
Cheers,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frank,
Would xpath functions work, eg. compare , sum etc ?
the twist in the scenario is that if the validations fail then a output say A has to be generated and if its a success a different one say B has to be generated. And accordingly are to be sent to two different folders (2 diff. Comm. Channels).
Thanks,
ShabZ
We did try using some functions and it gave surprising results...... eg. use compare and an error is thrown during interface determination in sxmb_moni, then we tried sum, and wow no error at all, but guess what the sum operation is not at all executed :-((
anyway, thanx all for your inputs....
ShaBZ
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.