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

cancel
Showing results for 
Search instead for 
Did you mean: 
olylak
Member II

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

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.

paiyyavj13
Established Member II

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

Hi ,

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

Regards.

olylak
Member II

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

But how? Could you share some example?

olylak
Member II

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

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

paiyyavj13
Established Member II

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

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
Member II

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

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.

paiyyavj13
Established Member II

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

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.