[jboss-user] [JBoss jBPM] - Re: How to deploy a BPEL process using the APIs?

alex.guizar@jboss.com do-not-reply at jboss.com
Fri Jul 11 09:22:32 EDT 2008


I made a mistake in my last post. ProcessDeployer and DeployProcessTask only submit the process file URL. In jBPM BPEL 1.1.GA this trivial deployment mechanism was replaced with a HTTP file upload. Please look at the DeploymentTask instead, which relies the Apache HttpClient library to perform the actual upload.
  protected void writeRequest(PostMethod post) throws IOException {
  |     // process part
  |     String contentType = URLConnection.getFileNameMap().getContentTypeFor(processArchive.getName());
  |     FilePart processPart = new FilePart("processArchive", processArchive, contentType,
  |         FileUtil.DEFAULT_CHARSET.name());
  | 
  |     // multipart request
  |     post.setRequestEntity(new MultipartRequestEntity(new Part[] { processPart }, post.getParams()));
  | 
  |     log("deploying process: " + processArchive.getName());
  |   }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163861#4163861

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163861



More information about the jboss-user mailing list