Saving forms as documents

1
0
-1

Hi guys,

Is it possible and how to create and save document of Bonita process? For example I have form in Bonita for employees data, HR manager fulfills it and I would like that that form and those data are saved as document in some folder, on server or sent by e-mail like document (like attached pdf/word/txt document, not like content of e-mail). Is it possible to do it somehow? If it is, please, explain it to me STEP BY STEP (like i don't know anything)

Thank you.

Comments

Submitted by yannick.lombardi on Fri, 05/22/2015 - 15:37

Yes this is possible but it demandes a little work.

There is a lot of solution that depend of what you exactly want to do.

An easy one is to store the data of your form in a database by using a database connector (that exists in Bonita).

If you absolutly want a document, this is more difficult.

To create a txt/tml file, you can add a document to your process (in the Document tab) and add a task that will generate your file. Here is an example that I create some days ago : https://www.dropbox.com/s/mr29omhbjrwvyfx/testGenerateFile-1.0.bos?dl=0

I you want a pdf/word document. You need to create your own connector. If you don't know java, you can find tutorials on google by searching "generate word/pdf in java".

Submitted by marcy.ira on Fri, 05/22/2015 - 15:55

Thank you for your answer, but I am still confused. I really need step by step explanation. I have Bonita process and Human task where I am entering some fields like Name, Surname, etc... Those entered information I would like to save in one document (word, pdf or similar) that will be saved in some folder or sent by e-mail. Or that that form from Human task in that shape is saved somewhere. How I do that?

Submitted by yannick.lombardi on Fri, 05/22/2015 - 16:04

Step 1 : Decide exactly what you want to do (database/pdf/word/mail/download/...) Step 2 : It depends of step 1

Submitted by marcy.ira on Fri, 05/22/2015 - 16:05

Hahaha... ooook

Step 1: I want word document

Something similar to this question: http://community.bonitasoft.com/answers/save-data-form-bonita-bpm-642

Submitted by yannick.lombardi on Fri, 05/22/2015 - 16:53

Ok.

In your process, you need : - add a document in the Documents tab (enter a name for the document and select "Internal Document") - after the form, add a service task that will call a word connector to create the document

Now you need to create a connector to generate your file. This is the difficult part that need a lot of java code. Before this, I suggest begining by developping a simple program that generate a "Hello World" file. There is lot of tutorial on google, for example www.youtube.com/watch?v=T6SQttoVXtE. If you have a colleague that is a java developper, you can ask for help. When you have your first program, you can try something more difficult to create the word file of your dream. Finally, to create a connector, you can look here for all the steps : http://documentation.bonitasoft.com/creating-connector

There is a lot of work.

Submitted by Sean McP on Sat, 05/23/2015 - 06:27

If you want to save a screen print of the information you could use a robot :) but needs work to work with Bonita see here

But you could create your word documents dynamically using either Apache POI API 's or docx4j, then attach them as Yannick says to the process and send them automatically.

regards

No answers yet.
Notifications