User input to file (summary of all data)

Hi there,

I’m totally new with programming and Camunda itself. I have visualized my process in the modeler with forms.

Quick review of the process:
At some activities/tasks the initiator needs to fill in a form (like first- surname), this form needs to be validated by someone with clearance at the next activitiy/task. And this person gives his validation by a checkbox (yes/no).

Is it possible to display the given input/data which the initiator filled in to the reviewer? So it can be reviewed.

Also is it possible to export all given information in the process in a summary? Like the filled-in form by the initiator, the verdict of the reviewer and export it to a file when the process is completed or in a log.

Thanks in advance,

Rick

Hi @RickyG,

Have you check the invoice example, the idea is similar to your goal.
The code is here.

Best regards,
Yana

Dear Yana,

Thanks for your reply. It sure helped. I can validate the given data!

But i cant get the export-to-file to happen. So i want validated given data to be exported to a file (.pdf, .txt).
I noticed at the end of the invoice process there is a log expression at the server (…Now archiving invoice “+execution.getVariable(“invoiceNumber”)+”, filename: “+invoiceDocumentVar.getFilename()+”) but no physical file. Although i cant seem to find the log thats exported.

Is it possible to automatically save/download the given data?

Sincerly,

Rick

Hi Rick,

Now I see what you mean. You are right, the implementation is empty in the invoice example, it just illustrating how it should look like.

I don’t think there is out of the box solution. Maybe you can try the following:

  • the initiator provide the input
  • transform the input data to a file and store it as variable (my suggestion is to use java delegate as in the invoice example)
  • use the file variable in the “Review” task to export it?

Do you like this approach?

Best regards,
Yana

Dear Yana,

I cant manage to write the input data to a file. Is it possible to transform the complete html-form to a file?

So again: initiator fills in form > reviewer reviews and approves it > the initiator recieves the approval and does his thing > when everything is done the initiator needs to save the complete filled in form to a share or even email it.

I hope my request isnt hard to follow and i hope its possible to execute.

i appreciate the help!

Sincerly,

Rick

Hello Rick,

I am sorry but generation of files is out of the scope of the camunda engine. So you need to implement such kind of logic.
Unfortunately I am not familiar with java script and I am not able to give you advice in such direction.
Maybe you can think about taking a screenshot with java script (not really sure if it is possible) or modifying the html form with the input data when the user complete the task?

Best regards,
Yana

Hi Yana,

i’ve managed to transform the input data into a .txt file! That works also.

Thank you for your help and consider this topic closed!

Best regards,

Rick

1 Like

@RickyG as a side note:

you could use the Freemarker scripting support in camunda to generate your HTML with input data values using Freemarker. Then with the outputted freemarker script, you could save that html into a .html file on the filesystem or as a File process variable.

1 Like

Hello i am new to camunda and all i want to to input bpmn file in java cli to get the model/picture so i can study that. Does anyone know how to do that ?
if you can provide me some link/tutorial It will be really helpful

I suggest posting this question in a new thread due to the divergent topic and also for visibility.
Additionally, you should provide more information what you are trying to achieve.

Cheers