on 05-28-2014 3:55 AM
Hi Experts.
I'm new at SAP.
We are using SUP 2.2 SP04.
We created an application that uses online request (MBO objective query) and works on HWC .
We could call query and process incoming data in such a way that at the following URL : SyBooks Online .
But we have a problem when client receives two or more results almost at the same time - The results from query which received in advance vanish.
For example,we receive results from query1(receive results in advance) and query2(receive results later) almost at the same time ,and results from query1 are vanished.
Now we're deal with this problem by generating the waiting time by the synchronization process.
Are there any solutions?
Thank you in advance.
Hi,
Can you clarify what you mean by "the results from query1 are vanished"?
Your hwc.processDataMessage() function should be called for each online request.
Thanks,
Andrew.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,andrew.
After call two query in rapid succession,
we are confirmed that hwc.processDataMessage() calls twice.
But we couldn't process data incoming first,
because the second processing may start before the first one is finished...
Be synchronized so as not to overlap two processes is the best practice ?
Thanks.
Is it possible for you to share what exactly you have written the logic/code? Did you try to put alert message for incoming request?
You can check below link how I have put alert to verify an incoming call request
Rgrds,
JK
Hi jitendra,
I apologize to everyone that confirmation before the consultation was insufficient first.
I started this discussion at the request from the project members,
but after a review of the code, it was found that
the problem we are facing is different from what I had heard...sorry.
The problem is that It's not possible for us to distinguish
between the two response after we call the same query of MBO twice.
function test(my_account){
//create MBO object
getprofileObj = new GetProfile();
// set param
getprofileObj.my_user_account = my_account;
//call MBO
registrationmember_findByUserAccount(
getprofileObj , "username&pwd", "function() { alert(“error occurred”)};"
);
}
hwc.processDataMessage = function (incomingDataMessageValue) {
console.log("start processDataMessage");
if(incomingDataMessageValue.indexOf("GetProfile_findByUserAccount"){
var workflowMessage = new WorkflowMessage(incomingWorkflowMessage);
var values = workflowMessage.getValues();
var Name = values.getData("GetProfile_NAME_attribKey").value;
alert(firstName);
}
}
-----
1. Call test("user1").
2. Before the results of user1 come back,call test("user2").
-----
After an operation such as that described above, hwc.processDataMessage() function is called twice,
but I do not have a means distinguish between the response of the response of user1 and user2.
Is hwc.processDataMessage() always called in order ?
Thanks,
Tann
So the user is allowed to call the same function twice (or more) on the same screen? Would it be possible to control the UI so that action is disabled until the first results come back.
Currently, the hwc.processDataMessage() is called in order, but it is not a good idea to depend on that as it is an internal detail that may or may not change in the future.
There are other properties on the WorkflowMessage that may be able to distinguish the request.
For example, if the action is on two different screens, you may consider comparing the values of workflowMessage.getWorkflowScreen(). Or do you see different values for workflowMessage.getHeader()?
Hybrid App Message Data Functions
Thanks,
Andrew.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.