Database Writer using ‘System\New Key’ fails to write multiple records

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 by the addition of a new action type on a DB writer stage (Insert with New Keys)

*** Resolved in version ***

For version 3.0 onwards, use the “Insert with New Keys” option available on DB writer stages.

For earlier versions of, 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.

This entry was posted in Admin Console and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.