Hi Mauricio Salatino,
We are exploring jBPM 6 to use it in our project. I have following question.
1. Can jBPM run on tomcat 7.x (web container).
If yes, then can we leverage all features of jBPM6 or are there any features which are
available only when jBPM is running on an application server like JBoss.
2. I am trying to start a process remotely using rest calls but without success.
public static void main(String args[]) {
String user = "krisv";
String password = "krisv";
try {
URL url = new URL(
"http://localhost:8080/jbpm-console/rest/runtime/com.jpmm:jbpm:1.0/process/jbpm.firstprocess/start");
String userPassword = user + ":" + password;
String encoding = new
sun.misc.BASE64Encoder().encode(userPassword.getBytes());
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type",
"application/json");
conn.setRequestProperty("Authorization", "Basic "
+ encoding);
BufferedReader br = new BufferedReader(new InputStreamReader(
(conn.getInputStream())));
String output;
System.out.println("Output from Server .... \n");
while ((output = br.readLine()) != null) {
System.out.println(output);
}
conn.disconnect();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
But getting following exception:
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://localhost:8080/jbpm-console/rest/runtime/com.jpmm:jbpm:1.0/process...
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at com.sample.ProcessTest.main(ProcessTest.java:30)
Can you please help.
Regards, Ajay
This email is confidential and subject to important disclaimers and conditions including
on offers for the purchase or sale of securities, accuracy and completeness of
information, viruses, confidentiality, legal privilege, and legal entity disclaimers,
available at
http://www.jpmorgan.com/pages/disclosures/email.