Save data from a form - Bonita BPM 6.4.2

1
+1
-1

Hi everyone. I've two questions and I hope you can help me.

Question number 1:

I have a form with a lot of fields and my aim is to trasfert them into a Word file. What should I do ? Maybe I need a connector, but I really don't know how to do it.

Question number 2:

I have a form with some fields and one of them is a datagridview,so when the user is filling the form he can choose to add some rows.

How can I manage the elements of the datagridview ? How can I save the datagridview's input after the user compiles it ?

Thank you so much for your time and your help. Bye

1 answer

1
0
-1

Both these questions are possible in Bonita from Community up.

For Q1, I don't think it wise to go directly to a word file, this would require Client Software (Office) to be installed on a server or vice versa (server software installed on a client PC). Unless of course you write out word files in pure XML format directly, however I would use the following -

use a basic Script Connector to write a CSV file to a shared directory in the tomcat server. The client can then pull these files as necessary and use a mail merge to create the word files.

For Q2, the data is saved with the process instance anyway, but to save it to another file, or use it for other purposes (other steps for example), again this is relatively easy. When submitting the form you have an Action on Submit button. Add an action that invokes a basic Script Connector that loops on the datagridview. The datagridview returns a list of list so the code would essentially be (assuming String):

for (String dataviewROW : dataviewgrid){
    for (String dataviewCOL : dataviewROW){
    //TODO Do something with the column data
    }
}

You could also use this code anywhere after datagridview population if the variable is defined as a Pool variable.

Hope this helps regards

Comments

Submitted by varshini.maddipati on Mon, 07/18/2016 - 15:26

Hi Everyone,

I am using Bonita Community 7.2.3. I have some questions and I hope you can help me.

Scenario 1: How to store content of xml/json document to process variables?
Scenario 2: I saved the list values to a process variable by querying the database. How to display process variable which holds List values in a form? Do I have to use Custom REST API Ext? Is there any other way to achieve this as I am using community?

Please help me by providing some examples to above scenarios. I have tried for almost a week. Please do the needful.

Thanks,
Varshini

Notifications