There is an issue with the use of ‘System\New Key’ in a database writer when writing multiple records to the same table.
Database writer stage in a workflow uses ‘System\New Key’ to map to the primary key field of the target table. This will potentially be creating multiple new records in the table.
When the workflow is run, only 1 record is created, any subsequent records that should have been created by the same database writer stage do not occur.
No errors are reported, and the workfow appears to have completed successfully.
This occurs because ‘System\New Key’ is only generating 1 new key rather than 1 key per new record. The primary key value must be unique and as 1 already exists in the database it is unable to write the subsequent records.
This issue has been resolved in version 220.127.116.1156 by the addition of a new action type on a DB writer stage (Insert with New Keys)
*** Resolved in version 18.104.22.16856 ***
For HR.net version 3.0 onwards, use the “Insert with New Keys” option available on DB writer stages.
For earlier versions of HR.net, it may be possible to workaround this issue by redesigning the workflow such that the new records are written 1 at a time rather than in bulk.