on 08-31-2009 7:21 PM
Hi Everybody
Can we call BLS from another BLS or from Irpt/html as Asynchronously. I have the requirement where in it doesn't matter the step executes or not . And that particular step is inserting data into table so its taking long time execute.
So, wondering whether I can execute BLS transaction asynchronously..
Let me know if any body doesn't understand my question.
Thanks
Hari
Hi Hari,
Sure you can. Here is a bit of an extreme example, maybe, using jQuery's ajax method. This JS function basically creates an Employee object from a asynchronous call to a BLS transaction where I pass in an employee's identification. Actually, this is a non-asynchronous AJAX call for reasons to large for this post. But, if you are going to use jQuery you can set the async to true or omit it (as it is the default).
function Employee(employeeId) {
var theEmployee = {};
if(employeeId != "") {
var urlForEmployeeInfo = '/XMII/Runner?Transaction=SomeCompany/Production/GetOperatorInformation&Employee='+employeeId+'&OutputParameter=EmployeeXML';
$.ajax({
type: "GET",
url: urlForEmployeeInfo,
async: false,
success: function(data){
if($(data).find('FatalError').text() == "") {
if($(data).find('Messages').text() == "") {
if ($(data).find('EmpNo').text() != '') {
theEmployee.firstName = $(data).find('FirstName').text();
theEmployee.lastName = $(data).find('LastName').text();
theEmployee.fullName = $(data).find('FullName').text();
theEmployee.error = '';
} else {
theEmployee.error = 'Invalid Employee';
}
} else {
theEmployee.error = $(data).find('Message').text();
}
} else {
theEmployee.error = $(data).find('FatalError').text();
}
}
});
}
return theEmployee;
}
Of course, you don't need the jQuery library to make an AJAX call to a BLS transaction. It was just code I had handy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ryan and Kevin for the reply.
The above Code looks promising though but i need some learning curve to use AJAX.
But now.., i am more interested in calling transaction in a transaction Asynchronously.
From the Kevins Ponter..,Seems like this this functionality not there in 12.0 but Targeted in 12.1 .
So,Any body know the time lines for ver 12.1 ram up/un restricted release.
And, Any body has any other idea..to acheive this??
Thanks
Hari
Hari,
I guess Christian's idea to use the HTTP Post action would solve your request. This way you can "call" a BLS from another BLS without having to wait for it, because the Message Listener starts the second BLS by calling a Processing Rule.
To send your data to the Message Listener, you configure your HTTP Post like this:
URL:
http://<server>:<port>/XMII/Illuminator?service=WSMessageListener&mode=WSMessageListenerServer&name=<yourname>&Session=false
Content-Type: text/html
The Content-type is important to let MII read the payload data correctly. The Session=false prevents MII from creating User sessions for every HTTP Post.
Michael
You can do an http post action to post to the Runner and just set a low timout. You can also post to the message listener, which gives you some more visibility and tracking for the "event".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hari,
FYI....in MII 12.1 there is a dynamic transaction action block which can be set to Asynchronous Call. Keep it in mind for future use....
[12.1 Help on Dynamic Transaction Calls|http://help.sap.com/saphelp_mii121/helpdata/en/49/24c202dd8d13a0e10000000a421138/content.htm]
Regards,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.