Retrieve record ID into a process that created that record

I have a form, which is filled out by the Employee and then send as a task to the supervisor to review.

As I understand the ID is generated in the table, therefore this information is not available intially when the user inputs the data.

What therefore happens on the second write to DSE is that it creates a completely new record, with the status change as the difference as that is something i manually change in the DSE. 

What I would need, is to provide the second Write to DSE with record ID that the first "Write to DSE" created in the DB. How can this be done?

------------------------------------------------------------------------------------------

I looked at the reference app, because there the process creates a new vehicle maintainance and records it.

However I have not found how this ID is retrieved. A script task is created:

which calls a expression rule.

  Discussion posts and replies are publicly visible