Skip to Content

Conditions during interface determination (urgent)

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2005 at 03:13 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2005 at 07:14 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.