Skip to Content
author's profile photo Former Member
Former Member

BPM - JDBC adapter - How to trigger system errors thro' adapters?

I have designed the BPM in following way :

1. Receive step - Receive Asynchronous message

2. Defined the Block - DB

3. Send step 'A' to JDBC - inside the Block-'DB' - Acknowledgement-Transport, Exceptions System Error-'DB', Receiver from-Send context.

4. Created an exception handler and Selected 'DB' as exception handler for the property of the exception handler branch.

5. Inserted the Send step-'B' to Mail inside the exception handler branch by using the mail receiver adapter.

We want send the message to update database by using JDBC adapter but if it fails to update database then we want send an e-mail to outlook.

Due to some problem we are not able to receive confirmation for the update of database in the "SEND" step-'A' and it is not red flag error it means it is not system error in Tcode-SXMB_MONI. Does anyone can help me to get a system error triggered by the JDBC adapter which would basically throws up the red flag and tells XI that the message could not be delivered successfully to database and the message would route to "SEND" step-'B' to send an email to outlook?

Thanks in advance!

Mrudula

Add a comment
10|10000 characters needed characters exceeded

Related questions

12 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 09:27 PM

    Hi Mrudula,

    Extract from SAP HELP

    <i>Sending an Acknowledgment

    In Acknowledgment mode, a send step can send a positive or a negative acknowledgment for a particular message.

    You usually use a positive acknowledgement in a branch that defines the normal case. A negative acknowledgment on the other hand is usually used in an exception handler.

    The system automatically determines the receiver of the acknowledgment from the header of message, for which the acknowledgment was sent.</i>

    Hence you design looks sound and should be working. I have a suggestion for breaking the scenario to see if the mail is sent. In the reciever communication channel (JDBC Driver) maintain wrong userid/pwd for your database. This will me the database call to fail.

    Since you set ack to transport in Send Step, this should result in a -ve response hence raising an exception.

    This should work, try out !!

    Cheers,

    naveen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2005 at 02:34 PM

    Thanks Navine I would try your solution!

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2005 at 03:32 PM

    I doubt you will get an exception even if we specify invalid connection parameters.You will get a System Error only if an error occurs during transfer to the pipeline. Unless there is an internal error in delivery of message from BPM to AdapterFramework, you may not get a system error.

    chk this link

    http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm

    You can configure an alertrule in RWB in such a way that it will raise an alert for errors in AE and then send an email.

    Thanks

    Saravana

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 02:55 PM

    Hi Naveen,

    In the Send step-A to send message to Database by JDBC adapter - I have defined Mode-Acknowledgement and Acknowlegement Type-Positive and I am getting Syntaxt error-ava.lang.NullPointerException while generating the BPM in IR. I still have a block for exception and Send step-A is in the block? Do I need to remove block?

    Is that the way you want me to design or am I doing something wrong in designing?

    Thanks!

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 03:41 PM

    Hi Naveen,

    I sent you the BPM image file to your yahoo account.

    Thanks for your help!

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 03:47 PM

    Hi Naveen,

    Mail is not delivered to "pandranigp@yahoo.com" account.

    Please verify your mail account.

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 03:52 PM

    Hi Sarvana,

    I have defined the all the mandatory fields in the BPM.

    Following is the error log if you could help me in resolving it.

    Thanks in advance!

    MESSAGE ID: com.sap.aii.ib.sbeans.oa.rb_all.RUNTIME_EXCEPTION_OCCURED

    com.sap.aii.utilxi.swing.framework.FrameworkException: Runtime error (RuntimeException). See details

    at com.sap.aii.ib.gui.editor.XiDocument.checkConsistency(XiDocument.java:780)

    at com.sap.aii.ibrep.gui.bpm.BusinessProcessDocument.checkConsistency(BusinessProcessDocument.java:479)

    at com.sap.aii.ib.gui.editor.XiDocument.checkObject(XiDocument.java:799)

    at com.sap.aii.ib.gui.editor.CheckObjectCommand.execute(CheckObjectCommand.java:38)

    at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:196)

    at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:134)

    at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:69)

    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

    at javax.swing.AbstractButton.doClick(Unknown Source)

    at javax.swing.AbstractButton.doClick(Unknown Source)

    at com.sap.plaf.frog.FrogMenuItemUI$ClickAction.actionPerformed(FrogMenuItemUI.java:960)

    at javax.swing.SwingUtilities.notifyAction(Unknown Source)

    at javax.swing.JComponent.processKeyBinding(Unknown Source)

    at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)

    at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)

    at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)

    at javax.swing.JMenuBar.processKeyBinding(Unknown Source)

    at javax.swing.KeyboardManager.fireBinding(Unknown Source)

    at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)

    at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)

    at javax.swing.JComponent.processKeyBindings(Unknown Source)

    at javax.swing.JComponent.processKeyEvent(Unknown Source)

    at java.awt.Component.processEvent(Unknown Source)

    at java.awt.Container.processEvent(Unknown Source)

    at java.awt.Component.dispatchEventImpl(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)

    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

    at com.sap.aii.utilxi.swing.toolkit.AccessibleKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)

    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)

    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)

    at java.awt.Component.dispatchEventImpl(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Window.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.EventQueue.dispatchEvent(Unknown Source)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.run(Unknown Source)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 08:01 PM

    Hi Naveen,

    I sent you mail again!

    Please check it out.

    Thanks again!

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      after looking at the BPM and from this\previous thread you had for this probem here are my observations and recomendations,

      1. <i>initially i think you had a simple send step with acknowledgment set to transport, then on execution you observed that the send step was waiting for acknowledgment and there was a JDBC error.</i>

      BPM is behaving exactly as it was designed for, when there is a system error during JDBC update, the recieving adapter in ur case JDBC adapter will not generate acknowledgement unless defined in sxmb_adm

      <u>If a system error has occurred, an acknowledgment message is only generated if the configuration parameter ACK_SYSTEM_ERROR in the RUNTIME category has the value 1 in the system in which the error occurred.</u>

      2. as for the current bpm you have, send step has to be set to asychrous mode. i got it all mixed up and suggested to of how to send acknowledgements whch doesnt apply to ur scenario.

      what i would recomend

      1. have a simple send step to do databse update with ack set to transport

      2. change sxmb_adm setting as specified above.

      3. create an alert category external to the BPM for raising alerts on failure to database update.

      4. in the alert you could send mails to outlook email group.

      This is my best bet, Sorry couldnt be more helpful

      Cheers,

      Naveen

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 01:56 PM

    Hi Naveen,

    I have created simple send step to do database update with ack set to transport. Do I need to have exception handler branch for throwing an alert?

    Changed SXMB_ADM setting to ack system error in RUNTIME category.

    I have created alert category under "Unclassified" section or I need to create under "Webflow" Section and use it in BPM.

    In alert category I have written testuser@xyz.com under "Long Tex(email, fax) section, is this correct?

    Do I need to do any alert configuration in RWB?

    Thank you very much for all your help!

    Mrudula

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      <i>have created simple send step to do database update with ack set to transport. Do I need to have exception handler branch for throwing an alert?</i>

      no you dont need any exception branch in ur BPM

      <i>I have created alert category under "Unclassified" section or I need to create under "Webflow" Section and use it in BPM.</i>

      /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step

      In alert category I have written testuser@xyz.com under "Long Tex(email, fax) section, is this correct?

      Do I need to do any alert configuration in RWB?</i>

      /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step

      /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide

      Naveen

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 04:33 PM

    Hi Mrudula,

    Were you able to get ur BPM working without alerts?? Is the step send able to update database??

    Naveen

    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.