-
1. Re: Java Rest API for JBPM 7
ripin Aug 28, 2017 11:55 PM (in response to yellapusony)2 of 2 people found this helpfulhi,in the jbpm7, jbpm-console no longer provide task/process.. rest api,it transfer to kie-server: http://localhost:8080/kie-server/docs/
-
2. Re: Java Rest API for JBPM 7
beena.patil Mar 4, 2018 12:10 PM (in response to ripin)Hi Ripin
Incase we are starting the jbpm process from remote application, should we still use the RemoteRuntimeEngineFactory.newRestBuilder() and provide the url http://localhost:8080/kie-server/.... I am getting this error while starting the runtime ...
"HTTP method POST is not supported by this URL:"
RuntimeEngine engine = RemoteRuntimeEngineFactory.newRestBuilder()
.addUrl(new URL("http://localhost:8080/kie-server"))
.addUserName("admin").addPassword("admin")
.addDeploymentId("com.myteam:HelloTest:1.0.0")
.build();
KieSession ksession = engine.getKieSession();
Can you please let me know which method to call for starting the process, as i am facing the same problem stated above
Thanks
Beena
-
3. Re: Java Rest API for JBPM 7
rafael.pino Mar 9, 2018 2:42 PM (in response to beena.patil)Greetings Beena.
Have you been able to start a process in JBPM 7 successfully?. Please, can you share your solution?.
Thanks.
-
4. Re: Java Rest API for JBPM 7
williamantonio Mar 13, 2018 11:53 PM (in response to yellapusony)Hi,
The BC API is deprecated! Use the KIE Server APIs instead. See this to get started:
https://docs.jboss.org/drools/release/6.4.0.CR2/drools-docs/html/ch22.html#d0e23626jBPM Documentation
-
5. Re: Java Rest API for JBPM 7
beena.patil Mar 15, 2018 6:16 AM (in response to rafael.pino)2 of 2 people found this helpfulHi Rafael
I used the following to start the process
// jBPM Process and Project constants
private final String DEPLOYMENT_ID = "com.los:remoteAPITest:1.0";
private final String USERNAME = "krisv";
private final String PASSWORD = "krisv";
private final String CONTAINER_ID = "remoteAPITest_1.0";
private final String PROCESS_ID = "remoteAPITest.remoteAPIprocess";
private final String SERVER_URL = "http://localhost:8080/kie-server/services/rest/server";
KieServicesConfiguration config = KieServicesFactory.newRestConfiguration(
SERVER_URL, USERNAME, PASSWORD);
KieServicesClient client = KieServicesFactory.newKieServicesClient(config);
ProcessServicesClient processServices = client.getServicesClient(ProcessServicesClient.class);
UserTaskServicesClient taskServices = client.getServicesClient(UserTaskServicesClient.class);
// start a new process instance
Map<String, Object> params = new HashMap<String, Object>();
Long processInstanceId = processServices.startProcess(CONTAINER_ID,PROCESS_ID);//container_id,process_id
//Long processInstanceId = processServices.startProcess("evaluation_1.0.0-SNAPSHOT", "evaluation", params);
System.out.println("Start Evaluation process " + processInstanceId);
Imports in pom.xml
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>7.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.kie.server</groupId>
<artifactId>kie-server-client</artifactId>
<version>7.3.0.Final</version>
</dependency>
-
6. Re: Java Rest API for JBPM 7
godse.hrushikesh Apr 27, 2018 9:13 AM (in response to ripin)Thank you very much u saved my life