-
1. Re: Jbpm 6.1.0.Final how to add task comments through rest remote api?
soumya.plavaga Apr 7, 2015 1:37 AM (in response to soumya.plavaga)Any help on this will be really appreciated. Thanks in advance.
-
2. Re: Jbpm 6.1.0.Final how to add task comments through rest remote api?
abhijithumbe Apr 8, 2015 9:41 AM (in response to soumya.plavaga)Hi,
As per my understanding we dont have API to add task comments to existing task. But you can add it while creating task using AddTaskCommand which we can execute through /execute REST endpoint.
~~~
TaskDataImpl taskData = new TaskDataImpl();
...
List<Comment> comments = new ArrayList<Comment>();
CommentImpl comment = new CommentImpl();
comment.setAddedAt(createdDate);
comment.setAddedBy(new UserImpl(creatorId));
comment.setText(taskComment);
comments.add(comment);
taskData.setComments(comments);
~~~
Hope it helps.
-
3. Re: Jbpm 6.1.0.Final how to add task comments through rest remote api?
rajiv_dadhich Nov 10, 2015 6:14 PM (in response to soumya.plavaga)Hi Soumya,
You can add, delete & getallcomments for a task using executor as below:
org.kie.api.task.TaskService taskService = runtimeEngine.getTaskService();
taskService.execute(new AddCommentCommand(taskId, comment));
taskService.execute(new DeleteCommentCommand(taskId, comment));
taskService.execute(new GetAllCommentsCommand(taskId));
Hope this helps!!