Take data from form filled out by user

1
0
-1

Hi, I'm creating a platform for my graduation thesis, in particoular i try to create a system for the management of data user. I would like to know if it is possible to take the data entered in a form filled in by the user, to verify correct insertion?

3 answers

1
+1
-1

Sure, what's your problem?

Comments

Submitted by marcop18_1420678 on Sun, 04/26/2020 - 20:18

hi,

sorry for late reply, i create a registration process with bonita and use the ACME organization that bonita offer.

I created a pool with two lanes inside, the user starts the process by opening the personal data entry page where they will enter their data. In this task I have defined the pool variables and the contract. completed the task the administrator should check the data entered by the user but here I can't recover what I enter previously in the widgets inserted in the user form. I would like if possible when I start the form to have the fields of the widgets precompiled. In the administrator verification task I have not defined any contract or pool data.
I hope I have explained the problem in a simple way. thank you and sorry for my bad english. 
Submitted by marcop18_1420678 on Sun, 04/26/2020 - 20:20

Hi, sorry for late reply, i create a registration process with bonita and use the ACME organization that bonita offer. I created a pool with two lanes inside, the user starts the process by opening the personal data entry page where they will enter their data. In this task I have defined the pool variables and the contract. completed the task the administrator should check the data entered by the user but here I can't recover what I enter previously in the widgets inserted in the user form. I would like if possible when I start the form to have the fields of the widgets precompiled. In the administrator verification task I have not defined any contract or pool data. I hope I have explained the problem in a simple way. thank you and sorry for my bad english.

Submitted by adrien.lachambre on Mon, 04/27/2020 - 11:36

I think I got the idea:

In the first step of your process the user enters some data, then in a second step an administrator should manually check those data and validate them to continue the process. Here is a small process representing this idea:

Capture-d-e-cran-2020-04-27-a-11-10-51.png

Here are my suggestions:

  1. Create a Business Data Model to store the data submitted by your users (more details here). One of the advantages of using the BDM is that business data are easily accessible in forms, contrary to process data.
  2. On the pool create a business data representing the business object created in step 1, and a boolean process data for the validation step.
  3. On the pool create a contract to initialize the business data, and a form to fulfill this contract.
  4. On the validation task, create a contract to initialize the boolean process data, and a form to fulfill this contract.
  5. On the UID, edit the second form to add the content of the business data to validate: This content is available in the context (a variable context is added to form when you create it from the Studio). You can simply display the content of this variable in a text widget to see what it contains by yourself, and then pick the fields you are interested in and display them in some widgets.

That's the idea, if something isn't clear let me know. I might also suggest you to check the Bonita getting started if you feel a b it lost with my suggestions.

Adrien

Submitted by marcop18_1420678 on Mon, 04/27/2020 - 12:04

hi, i read the suggestion and i have a doubt for the point 3 and 4, i create the BDM for the pool but not define the contract for the pool beacuse i create first task with a welcome page, now my question is: after i create the BDM and add this on the pool i go to create the contract for the pool or i can create the contract for single task? I am attaching the images of my project and I provide you with information on where I entered the contracts. in Verifica Dati Inserti i'm not define any contracts because I didn't know whether to create a new contract or to use the one derived from registration. Thanks for your help

Marcojk12SHT

1 image 2 image 3 image 4 image 5 image

Submitted by marcop18_1420678 on Mon, 04/27/2020 - 12:05

hi, i read the suggestion and i have a doubt for the point 3 and 4, i create the BDM for the pool but not define the contract for the pool because i create first task with a welcome page, now my question is: after i create the BDM and add this on the pool i go to create the contract for the pool or i can create the contract for single task? I am attaching the images of my project and I provide you with information on where I entered the contracts. in Verifica Dati Inserti i'm not define any contracts because I didn't know whether to create a new contract or to use the one derived from registration. Thanks for your help

Marco

1 image 2 image 3 image 4 image 5 image

Submitted by adrien.lachambre on Mon, 04/27/2020 - 12:25

The design looks good.
You can define a contract on a pool or on a task, it works the same way. The idea is:

  1. You define a business data on the pool (always)
  2. You initialize / update / this business data on the pool or on a task

So in your case, you defined your business data on the pool that's fine, and on the task inserisci dati personali you create a contract from this business data. By doing this an operation will be automatically created to initialize the business data (see operation tab).

A contract is just a way to say this task can be completed if and only if those data are provided. You can then do whatever you want with the contract inputs, initialize a business data, send them to an external service ...

Submitted by marcop18_1420678 on Mon, 04/27/2020 - 13:47

ok perfect everything is clearer now, in these days I will modify the process. thank you very much for helping. you have been very kind

Marco

Submitted by marcop18_1420678 on Mon, 04/27/2020 - 19:08

sorry again for the inconvenience, today I did the process again. The part relating to the insertion of data by the user I have solved, but for the part of the validation I really cannot define the contract for the request of the variables entered by the user. If you don't mind, you can send me some screen related to the procedure.

Submitted by adrien.lachambre on Tue, 04/28/2020 - 00:25

No problem, I'm glad to help.

Here is a detailed example:

I have the following Business Data Model:

bdm.png

I'll create the following process, with an init / edit task and a validation task:

process.png

On the Pool, I add a Business variable and a Process variable for the validation:

data.png

On the first task, I add a contract to edit my business data:

contract1.png

The associated operations are created automatically because I used the add from data button. Then I just generate the UID form, and that's it for the edit part.

Now the validation: On the second task, I create the following contract:

contract2.png

It is not related to a Business variable, so I can't use the button add from data, I must use the add button, and the operation isn't generated, so I create manually the following operation :

operation.png

Then I generate the UID form. On this form I create a variable myBusinessObject to retrieve the data from the context, and I display the content of this variable in text fields. A checkbox is automatically created to fulfill the contract.

validation-Form.png

Finally, I create a condition on the success flow, so it will be used if and only if the Process variable isValid is true:

flow-COndition.png

And that's it, an easy way to create a validation task to validate user inputs before to continue the process.

I hope it's clear enough :)

Adrien

Submitted by marcop18_1420678 on Tue, 04/28/2020 - 11:59

Hi Adrien, this morning I followed your examples and finally I found the solution. My mistake was in the process variable that I didn't enter. I have to ask you the last thing, in case the user inserts an identification document, the document variable must be declared in the pool more precisely in the document section?

Thanks so much

Marco

Submitted by adrien.lachambre on Tue, 04/28/2020 - 12:08

Yes, documents are declared on the pool, and can then be used like other data https://documentation.bonitasoft.com/bonita/7.10/documents

Adrien

Submitted by marcop18_1420678 on Tue, 04/28/2020 - 12:12

Perfect I conclude the process, the graduation exam is approaching. Thanks again for the help. A good day

Marco

Submitted by marcop18_1420678 on Wed, 04/29/2020 - 16:03

Hi Adrien, I'm sorry for the inconvenience, I'm trying to use the file viewer widget so that I can view the attached file in the first step, the widget is instantiated on the second step but I can't recover the file loaded. Do I have to create a new variable on the form to be able to access it? the document file is initialized in the pool and the contract in the first step is set up. Thanks and sorry again for the inconvenience

Submitted by marcop18_1420678 on Wed, 04/29/2020 - 18:38

I solved I tried all day and in the end I managed it wrong in declaring the variable

1
0
-1

1
0
-1

Hi,

I suggest you to read this documentation page: https://documentation.bonitasoft.com/bonita/7.10/contracts-and-contexts
It introduce the notion of contract and the associated constraints, which allows you to create verification scripts on the user contract inputs.

Regards,

Adrien

Comments

Submitted by marcop18_1420678 on Sun, 04/26/2020 - 11:53

hi,

i read the link but i can't resolve my problam, if you have time can you help me?

Notifications