I created a form where not all of the information is not always mandatory for the form. When I map the form with a contract behind it the form doesn’t submit, but if I take items out of the contract they don’t get mapped when I do enter values. Any help is welcome! Thanks in advance!
In the input I have:
{
‘input1’ : {
attribute 1 ,
attribute 2,
},
‘input2’ : {
attribute 1 ,
attribute 2,
}
};
I have initialized the arrays simply putting: attribute1[0],
in those there are other variables.
I will try to initialize each specific variable with null or 0 and see if it works! Thanks. I’ll let you know next week. If it works I’ll check best answer!
I then attempted to initialize things like you suggested:
{
“mainInput1” : {
“iteratedInput1” : {
“attribute1”:null,
“attribute2”:null,
“attribute3”:null
}
},
“mainInput2” : {
“iteratedInput2” : [null]
}
}
The problem is when I create the form, I get 4 iterations pre-loaded rather than just one I can use an “Add” Button if I need more.
Here is the file. I recognized its not process related but rather the json definition. Example BOS file The first tab is initialized in the way I would like to see on the form. The second tab is what happens when I try to initiallize each of the variables. I see that the number of lines is dependent on the number of attributes defined in formInput. So if I want to initiallize them with null I would be creating additional instances in the form.
I update your example to initialize the widgets values using the form variable. The same variable is also used to store information about user input and selection.
Hope it’s helping. If not, I think a business use case description might help to understand what you are trying to achieve.
and send the data it creates new instances with values of null in all the initialized objects. I don’t want to fill my BDO’s with records fill with null. Am I doing this right? Thanks
I will try first to sum up my understanding of your development:
You have a form that behave as you expect.
The form also let you create a JSON variable that includes all content you want to send to the process in order to store them in a new business data entry.
The data received by the process match the contract definition.
Your issue is now that the business variable new entry does not contains what you expect. More precisely it contains an entry matching a null value for a data attribute.
Can you confirm my understanding is correct?
If yes I think I will need from you a bos file with form, process and business data model definitions in order to help you.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.