Upload file using service Task

Hi,

I am generating pdf in service task and want to set a variable cam-variable type as File in service task. so, that I can download the same in the next user task.

Could you please let me know any api or sample code.?

Regards,
kedari

Hi @kedarik,

here is an eample to save a file as a process variable: https://docs.camunda.org/manual/7.11/user-guide/process-engine/variables/#file-values.

In a Java delegate you can use the execution passed as a parameter to set the variable.

Here you find the code of an embedded form: https://github.com/camunda/camunda-bpm-platform/blob/master/examples/invoice/src/main/webapp/forms/approve-invoice.html#L6-L11.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier ,

Yes, its helped. Thank you.