cancel
Showing results for 
Search instead for 
Did you mean: 

How can I show the content added in one task in the subsequent task?

paiyyavj13
Star Contributor
Star Contributor

I have a process in which there is a user task, the user before completing the task has the option of adding related task content(Out of the box feature of Activiti). Once this task is completed, the control goes to the subsequent task assigned to another user, I want to show related content uploaded in the previous task by the previous user in this current task.

How can I achieve this?

Appreciate your help...

Regards.

16 REPLIES 16

olylak
Champ on-the-rise
Champ on-the-rise

I'm able to store document from my external application to the process instance using /enterprise/process-instances/{processInstanceId}/raw-content.

But how then to show it on the form of the next steps? Is it somehow possible to show it using standard Display Value field?

If not, can you advise some other approach?

Thanks in advance

Regards,

Oleh.

Hi ,

Yes, you could use a standard Display Value field... that shud work....

Regards.

olylak
Champ on-the-rise
Champ on-the-rise

But how? Could you share some example?

olylak
Champ on-the-rise
Champ on-the-rise

How to map uploaded by REST API content to Display value field?

The api you used to store the content on the processInstance allows you to store it on a form field- All you need is to use the form field for Displaying it on any relevant process form.

Incase you do not have the form field id in any previous forms- you could create a dummy field and keep it hidden and use it to display in future process tasks post the api call to create the field content.

Regards.

olylak
Champ on-the-rise
Champ on-the-rise

Hi!

Yes, I can create a hidden dummy field. But how to attach content to the specific form field using API?

/enterprise/process-instances/{processInstanceId}/raw-content has only processInstanceId. There is nothing mentioned about form field and how to link this content to that field.

Do you have some sample?

Thanks.

Attaching a content to the form field could be achieved using a Listener: which would be a Java Class.

You would have to check the relatedContentService API's available to set the content on a form field.

 First you would have to get the related content stored in the process(maybe by using relatedContentService.getRelatedContentForProcessInstance(processInstanceId, pageSize, page) this luks up from the process- you cud do a luk up on the task also)- then set it onto a field using:

relatedContentService.setContentField method.

Regards.