Skip to Content
avatar image
Former Member

Parsing XML document -> generating exception for BPM ??

hi together,

i have the following problem / situation:

i have a XML document which will be sent into the XI. this document will be parsed with a javamapping. if the document is correct, than everythings looks fine. but if the document has incorrect parts in it a exception should be thrown.

this mapping is called in a transformation step in BPM.

is it possible to get a exception thrown by javamapping in the transformationstep for continues works in the BPM (e. g. for sending an error message to the sender and tells him, that something is wrong)?

please, can you give me a detailed description what i have to do?

Thanks a lot

Alex Schramm

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 05, 2006 at 12:25 PM

    Hi Alex,

    You can put the transformation in a block, and add an exception handling branch. Use this branch to capture and handle the excepion thrown by the transformation. In this branch, you can raise an alert, and send an error message to whoever you need to.

    Cheers

    Manish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 05, 2006 at 12:40 PM

    Hi,

    I think you can't catch the exception raised by java maaping in Transformation...

    Regards

    Suraj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Bhavesh Kantilal

      Hi Bhavesh and Alex,

      That is exactly what I am trying to convey.

      If you can get the entire transformation to fail by throwing a mapping exception, this will stop the transformation step in the BPM. The failed mapping transformation will trigger the exception handling branch.

      Once the exception has been triggerred in BPM, you can easily handle it. The exception handling branch can contain a Control step, which rasies an alert. This alert needs to be configured in the alert configuration, and can have dynamic text, using data from container variables from within the BPM process.

      I have used this many times, I am just not sure about how to trigger the exception inside the java mapping, but I am reasonably sure it should be possible.

      Cheers

      Manish

  • avatar image
    Former Member
    Apr 05, 2006 at 12:50 PM

    hello together,

    when i understand this in the right way it is not possible to catch an exception thrown by java mapping.

    but i can generate my own exception defining in the BPM (within a block)? and handle this in the exceptionbranch of the failed transformationen?

    right?

    Thanks a lot

    Alex Schramm

    Add comment
    10|10000 characters needed characters exceeded