cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (12)

Answers (12)

Former Member
0 Kudos

Hi Naveen,

My secnario is still not working. I am still not getting red flag error in Tcode-SXMB_MONI when we don't receive acknowledgement for database for the update.

Program you mentioned is running background but looks like alerts are not getting triggered so my secnario is not working.

Any help would be appreciated!

Thanks!

Mrudula

Former Member
0 Kudos

Hi Naveen,

BPM is sending messages to database but we are still getting error in receiving confirmation due to certificate problem so the message's acknowledgment status is still "in waiting acknowledgment status" and it is triggering system error because it has not received acknowlegement from database and even I don't see any alerts in my alert inbox. I checked many different tcodes and it looks like alert is not getting triggered.

Do you know where can I look to find why alert is not getting trigger when message has not received acknowlegement from database for update?

I really appreciate your help! Thanks!

Mrudula

Former Member
0 Kudos

Did you forget to award me some points

Nice to know that ur scenario is working. Did you check if the report SXMSALERT_PROCESS_DATA_Get is scheduled ??

look at this blob from Micheal , really good one for trouble shooting alerts.

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

Naveen

Former Member
0 Kudos

Hi Mrudula,

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

Naveen

Former Member
0 Kudos

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

Former Member
0 Kudos

<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

<i>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

Former Member
0 Kudos

Hi Naveen,

I sent you mail again!

Please check it out.

Thanks again!

Mrudula

Former Member
0 Kudos

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

Former Member
0 Kudos

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)

Former Member
0 Kudos

Hi Naveen,

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

Please verify your mail account.

Mrudula

Former Member
0 Kudos

Hi,

i am sorry its pandrangip@yahoo.com, can you also send me the setting you have for the send step along wth the image.

Naveen

Former Member
0 Kudos

Hi Naveen,

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

Thanks for your help!

Mrudula

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

can you send me the image of your bpm to pandranigp@yahoo.com

cheers,

Naveen

Former Member
0 Kudos

select your BPM in repository and do a F7 . I think the error you are facing is because you have left one of the "mandatory" properties unassigned in one of your BPM steps.

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks Navine I would try your solution!

Mrudula

Former Member
0 Kudos

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