I'm assuming you are using JSPs to present your BPM Object:
First, define your BPM Object method to receive one single argument of type String[][String]
(http parameters of the request), and returning String
(the content of your response).
Then, in your JSP/JavaScript, use Fuego tag "" to get the URL to which you will do an XHR request.
Example, with jQuery:
$.ajax({
type: "GET",
url: "<f:invokeUrl var='${viewObject}' methodName='loadCandidates'/>",
data: xhrArgs,
dataType: "text",
success: function(data, status) {
/* your code here. data contains the String
returned by your method */
}
});
Where viewObject
is the bpm object variable you are passing to the JSP page.
For details on the tag libs see:
OBPM JSP Tag lib.