write multiple rows in database in process modeling

Hi everyone 

i m struggling with the process modeling when i need to write multiple rows in a DB ,

i have a CDT of "Documents"  which i put as an array in my form and  a  CDT of  "creditRequest" which contains an array of the Documents CDT.

i need to put both of them in seperate databases , the first one is the documents which i want to store and then after to store the creditrequest which will contain the documents.

now when i debugging my process i can see that my documents don't have an ID  after that it s passing the "write to db",

and then after i have problem with the creditrequest , 

how i need to do for write the multiple documents that i want to write in the db and then write them in the next Db of Creditrequest ???

  Discussion posts and replies are publicly visible