Jose Miguel Loor [
https://community.jboss.org/people/jmiguel77] created the discussion
"Re: Starting process instance using the jBPM REST API and setting parameters"
To view the discussion, visit:
https://community.jboss.org/message/798679#798679
--------------------------------------------------------------
Hi
According to this post
https://community.jboss.org/message/612597#612597
https://community.jboss.org/message/612597#612597
it is possible to add a method that accepts parameters in the REST API to initiate a
process with variables
The post is quite old, so i would believe it is already present in the API
But i am using BRMS 5.3 and with this code:
AbstractHttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost(url);
if (parameters != null && !parameters.isEmpty()) {
request.setEntity(new
UrlEncodedFormEntity(parameters,"UTF-8"));
}
AuthScope as = new AuthScope(SERVER, 8080);
UsernamePasswordCredentials upc = new
UsernamePasswordCredentials(
USER, PASSWORD);
client.getCredentialsProvider().setCredentials(as, upc);
BasicHttpContext localContext = new
BasicHttpContext();
BasicScheme basicAuth = new BasicScheme();
localContext.setAttribute("preemptive-auth", basicAuth);
return client.execute(request, localContext);
the process is started, but without any variables
any ideas ??
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/798679#798679]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]