How to get id of inserted record inside process model?

Scenario: 

Insert record in to DB and return the record details back including the index ID of the record.

How to get the Id and save into process variable?

I have tried to save ac!storedvalues into target process variable, but the variable is not having ID value when it passed to user input task (the next step after writing new record to DB).

Please see the screenshot of the process model for nodes being used and the configuration of output of write to DB smart service.

The script task in the below image is not configured and is empty. please ignore this node. immediately after write to db the next node should be user input task.

Please share a recipe or screenshot how to get dynamically the new entry record ID

  

  Discussion posts and replies are publicly visible