I have a process flow that needs to save its findings and user notes to the business model (under human task object/symbol). Particularly, it is more on an insert records approach. If i create a contract between the business variable and task input then set action to Instantiate, instead of inserting a new record, it overwrites the existing data. How can i able to do this? I have 3 human task and expecting to have 3 records in the BDM or database.
Hello
Dont use Operation to map between Database column and contract value.
Rather use only 1 Operation. On the left side , select your BDM Object. In the center dont select any Java Method.
On the right side, use a groovy script.
in the groovy script use this -----
Create a new BDM object using the import com.company.model.TableName
datavar = new com.company.model.TableName;
datavar.column1 = contract1
datavar.column2 = contract2
Return datavar
Hence everytime a human task is executed, it would insert a new row in database
I see. I should use "Takes value of" since this is the default operation between bdm and inputs. BTW im using bonita community edition.
The above process should work for Both Licensed and community version.
Let me know if its working for you .
regards
Update on this issue. It fails on the current project that i'm working on but when i create a test project, it works perfectly both on process instantiation inputs and task inputs. Maybe i have done wrong or routine. Again thanks for the help