Hello Sudharma,

I noticed, after 2 hours of test, that I requested on the wrong servers...
-_-'. However, thank you very much for your answer because it is complete
and I need the "comment" part :)

Regards,

Thomas

2017-10-20 8:45 GMT+02:00 Sudharma Subasinghe <sudhar...@wso2.com>:

> Hi Thomas,
>
> First, please ensure that you have retrieved correct taskId for completed
> tasks. Then you should be able to get completed task instance by sending a
> GET request to *bpmn/history/historic-task-**instances/<TASK_ID>. *You
> cannot get completed task instance details using */runtime* service.
> Hence it returns 404.
>
> We are not supporting to get comments by historic task instance ids as it
> is not specified in the activiti spec[1].
>
> You can get comments for historic process instance by
> */bpmn/history/historic-process-instances/{process-instance-id}/comments/*
> and then it returns all the comments. In the response array you can find
> completed tasks also. It contains *processInstanceUrl* and by invoking
> that url you can get comments for completed tasks.
>
>
> [1] https://www.activiti.org/userguide/#_history
>
> Thanks
> Sudharma
>
> On Thu, Oct 19, 2017 at 6:00 PM, Thomas LEGRAND <
> thomas.legr...@versusmind.eu> wrote:
>
>> Hello everybody,
>>
>> I have a process where one or more user tasks that can be completed while
>> the process is not yet finished. But, my problem is to retrieve those
>> completed task to have access to their comments. All of that by using the
>> REST web service.
>>
>> I know we can retrieve the completed tasks, and their comment because the
>> Web UI provided by WSO2 allows so [1] & [2]
>>
>> To illustrate what I am talking about, you can find my process definition
>> in [3].
>>
>> What I tried, for the moment, is to retrieve the list of activities via
>> the endpoint 
>> /bpmn/history/historic-activity-instances?processInstanceId=<MY_PROCESS_INSTANCE_ID>.
>> From here, I can retrieve the taskId of the completed task but I can't find
>> a way to retrieve the information concerning it, nor its comment. I tried
>> via :
>>
>> - /bpmn/runtime/tasks/<TASK_ID> => returns 404
>> - /bpmn/runtime/tasks/<TASK_ID>/comments => returns 404
>> - /bpmn/history/historic-task-instances?taskId=<TASK_ID> => returns
>> empty list (even if I filter by processInstanceId)
>> - /bpmn/history/historic-task-instances/<TASK_ID> => returns 404
>>
>> Can you help me, please?
>>
>> [1] [image: Images intégrées 2]
>>
>> [2] [image: Images intégrées 3]
>>
>> [3]
>> [image: Images intégrées 1]
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sudharma Subasinghe,
> Software Engineer,
> WSO2 Inc.
> Email: sudhar...@wso2.com <hasi...@wso2.com>
> Mobile : +94 710 565 157 <%2B94%20718%20210%20200>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to