Search code examples
taskjbpm

Are there any REST URL's or API's for efficiently managing the functionalities of an User Task in JBPM


I'm currently using JBPM 7.0.0.Final version.I need to manage the user tasks which I designed in the workflow externally from other applications.When I searched I got some Rest Url's but it was for Version 6.4.0 and less, but couldn't find it for 7.0.0.Final.It would be nice, if anyone could help me with some documents or some information :)

Thanks in Advance.

I tried using some API's in code as below,but didn't know what kind of input need to be passed for Page and PageSize.

String serverUrl = "http://192.168.204.50:8080/kie-server/services/rest/server";
String user = "pouser";
String password = "pouser$123";
String containerId = "sampleproject_1.0.0";
String processId = "sampleproject.HumanTask";

KieServicesConfiguration configuration = KieServicesFactory.newRestConfiguration(serverUrl, user, password,36000);
configuration.setMarshallingFormat(MarshallingFormat.JSON);
KieServicesClient kieServicesClient =  KieServicesFactory.newKieServicesClient(configuration);
UserTaskServicesClient usersClient = kieServicesClient.getServicesClient(UserTaskServicesClient.class);
List<TaskSummary> taskList = usersClient.findTasks(userId, page, pageSize);

Solution

  • To answer your question + questions from your comments:

    1. kie-server has their own documentation once deployed. it is {server}:{port}/kie-server/docs generally it should be like that unless you change the file of kie-server.jar

    2. you don't have to pass for page and pageSize. They have their default value.

    here is the screenshot of kie-server docs, and these rest call is used to manipulate human tasks such as claim tasks, start tasks, complete tasks, etc...

    enter image description here