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

Parents
  • 0
    Certified Senior Developer

    Hi, create two process variables, one for documents cdt and another for credit request cdt and using script task get the data for these two variables then using write to datastore entity or multiple datastore entities, you can write these data easily.

  • i used two process variables one for the documents cdt and the other for credit request cdt as you said . i   wrote the data to document entity first and then wrote in the credit request entity .

    after insertion of  my data to the db. of documents, I can see that he did the relation between each document and the credit request db  as i wanted , but  i  noticed in  the debugger  that  for the process variable document it didn't wrote the ID for each one , but in my db each one got one .

    because after when im looking to the id in the creditrequest entity i cant see the id

    you know what is the problem ? 

Reply
  • i used two process variables one for the documents cdt and the other for credit request cdt as you said . i   wrote the data to document entity first and then wrote in the credit request entity .

    after insertion of  my data to the db. of documents, I can see that he did the relation between each document and the credit request db  as i wanted , but  i  noticed in  the debugger  that  for the process variable document it didn't wrote the ID for each one , but in my db each one got one .

    because after when im looking to the id in the creditrequest entity i cant see the id

    you know what is the problem ? 

Children