Skip to Content
0
Former Member
Mar 21, 2012 at 10:08 AM

SUP 2.1 - Hybrid Web Container - SAP Backend Dynamic MBO Operation Authentication Issue

24 Views

Hi everyone,

Topic: SUP 2.1 - Hybrid Web Container - SAP Backend Dynamic MBO Operation Authentication Issue

Our Objective
We are implementing a Leave Approval application on the Hybrid Web Container based on SUP 2.1. The app connects to the SAP backend to retrieve the leave details via SAP exposed Web Services (Function Modules built in SAP itself). The MBO authentication from SUP to SAP should be dynamic, thus the username and password used by the MBO (SAP Web Service) should come from the user via the Credential Screen and not static.

Our MBO'S
We have 3 MBO's in our Sybase Workspace environment:

.

We have 2 starting points in the workflow, a Credential Request and a Server Initiated point:


All the 3 MBO's have been set to CacheGroup of type On Demand.

When we trigger a Notification from Sybase workspace as per the jumpstart rules, we receive a message in the device containing the Leave Item ID.
This leave item ID is used by the MBO to retrieve all the other details from the SAP backend.

If the notification is loaded for the 1st time, it shows up a Credential Screen, allowing the user to key in a username and password.
This screen is then submitted as Submit Workflow with the username & password saved as Cache Credentials in its properties:

Then, the 1st page showing all the leave details is shown (Leave Approval screen). We are able to get all the data correctly.

The Problem
When user taps on Reject button, which calls the RejectLeave MBO, it will send over the Leave Item ID and comments to the SAP to perform the rejection. This works perfectly fine if we hard code the Authentication Username and Password of this MBO operation. When we check on the SAP side, the leave has been rejected.

However, when we switch to a dynamic one (username and password from the Credential screen to be used), the app quits as usual but the rejection does not take place in SAP.
The Definition screen of the MBO RejectLeave in Dynamic authentication mode as below:

Any help on this are highly appreciated.

Thank you.

Regards,
Haridev

Appendix
In the SCC site, we get the following error log when the RejectLeave MBO is triggered each time:

2012-03-21 16:39:34.558 WARN Other sup.mbs.17 [MAP_LeaveApproval.server.MAP_LeaveApprovalDB]{"entityKey":"0","requestId":"005818645561468fa151903c8cc9a184","replayFailure":0,"code":500,"pendingChange":"N","_rc":0,"message":"java.lang.RuntimeException:SOAP Fault from Web Service : Operation not supported","timestamp":"2012-03-21 08:39:28.66","operation":"Reject","level":5,"component":"RejectLeave","pending":false,"replayPending":0,"_op":"C","messageId":0,"disableSubmit":false,"eisCode":"0"}

2012-03-21 16:39:34.557 WARN Other sup.mbs.17 [MAP_LeaveApproval.server.RejectLeave] [RejectLeave]com.sybase.djc.transaction.TransactionContext.*AnonymousTransaction*
... 24 more
at com.sybase.vader.da.ws.soap.SoapInteractionOperation.execute(SoapInteractionOperation.java:551)
at com.sybase.vader.da.ws.soap.SoapInteractionOperation.invokeResultChecker(SoapInteractionOperation.java:1064)
Caused by: java.lang.RuntimeException: SOAP Fault from Web Service : Operation not supported
... 22 more
at com.sybase.vader.mms.DataServiceImpl.execute(DataServiceImpl.java:226)
at com.sybase.vader.statistics.MonitoringOperation.execute(MonitoringOperation.java:69)
at com.sybase.vader.da.ws.soap.SoapInteractionOperation.execute(SoapInteractionOperation.java:595)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: SOAP Fault from Web Service : Operation not supported
... 13 more
at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:845)
at MAP_LeaveApproval.server.RejectLeaveRejectOperation$1.invoke(RejectLeaveRejectOperation.java:834)
at MAP_LeaveApproval.server.RejectLeaveRejectOperation.replayInternal(RejectLeaveRejectOperation.java:56)
at MAP_LeaveApproval.server.RejectLeaveRejectOperation.create(RejectLeaveRejectOperation.java:538)
at $Proxy0.execute(Unknown Source)
at com.sybase.vader.mms.TimedDataServiceImpl.invoke(TimedDataServiceImpl.java:54)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at sun.reflect.GeneratedMethodAccessor396.invoke(Unknown Source)
at com.sybase.vader.mms.DataServiceImpl.execute(DataServiceImpl.java:238)
at com.sybase.vader.mms.DataServiceImpl.throwDSException(DataServiceImpl.java:163)
Caused by: com.sybase.dataservices.DSException: Failed to execute operation d1_map_leaveapproval_1__24213.create
at com.sybase.sup.server.runtime.AbstractMessageReceiver.run(AbstractMessageReceiver.java:103)
at com.sybase.sup.server.mbs.MessageReceiver_DJC.process(MessageReceiver_DJC.java:41)
at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:747)
at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:845)
at com.sybase.sup.server.mbs.MessageReceiver_DJC$1.invoke(MessageReceiver_DJC.java:27)
at com.sybase.sup.server.mbs.MessageReceiver_DJC.access$001(MessageReceiver_DJC.java:4)
at com.sybase.sup.server.mbs.MessageReceiver.process(MessageReceiver.java:600)
at MAP_LeaveApproval.server.intrnl.MAP_LeaveApprovalDB_ML.onMessage(MAP_LeaveApprovalDB_ML.java:13)
at MAP_LeaveApproval.server.MAP_LeaveApprovalDB.dispatchReceivedMessage(MAP_LeaveApprovalDB.java:172)
at MAP_LeaveApproval.server.intrnl.RejectLeaveRejectOperation_ML.onMessage(RejectLeaveRejectOperation_ML.java:21)
at MAP_LeaveApproval.server.RejectLeaveRejectOperation.replayHandler(RejectLeaveRejectOperation.java:838)
at com.sybase.sup.server.runtime.DeadLockRetryHelper.invokeInNewTransactionWithRetry(DeadLockRetryHelper.java:17)
at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:747)
at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:1011)
com.sybase.djc.transaction.TransactionRolledbackSystemException: com.sybase.djc.transaction.TransactionContext.*AnonymousTransaction*

2012-03-21 16:39:28.841 INFO DataServices sup.mbs.17 [com.sybase.vader.da.ws.soap.SoapInteractionOperation]66#LeaveRequestForm:1 harideva d1_map_leaveapproval.1_0 (sup.mbs.17) com.sybase.vader.da.ws.soap.SoapInteractionOperation::execute:350 - Executing SOAP operation - service address [http://mbsapdev.malakoff.com.my:8080/sap/bc/srt/rfc/sap/ZREJECT_LEAVE?sap-client=800], SOAP action []

Attachments

workflow.png (10.2 kB)
mbo-definition.png (46.6 kB)
mbo-s.png (16.1 kB)