Update data in a workflow

Is it possible way how update data through workflow?

My example:
I load some existing rows and add some new rows (prepare new data for next user input). Next step is to show UI to the user for editing this set. And when I save data, I want to get an error message about duplicate PK. Workflow may save only new generated data?

There are several ways on how to modify data using a sequential workflow:

  1. UI step – user edits the data using a screen
  2. Transformation step – you transform the data resulting in the same entity+primary key but with modified other fields
  3. Update Context By XPath step – there you can directly set a value of a specific field – simpler way than the Transformation step but you can only edit a single value

You will not get an error about duplicate keys because the data are always merged to the context store. That means they will be looked by the entity name + primary key. If the row does not exist in the context, the row will be created. If the row already exists, you will not get a duplicate, the row will get updated.