[jboss-user] [jBPM] - Re: Starting process instance using the jBPM REST API and setting parameters

Jose Miguel Loor do-not-reply at jboss.com
Wed Feb 20 17:33:32 EST 2013


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&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130220/556221cc/attachment.html 


More information about the jboss-user mailing list