How to save all input records to Data Store

machine-task
datastore

#1
<insert-datastore datastore-name="${datastore_name}" create="true">
    <script return="new com.google.gson.Gson().toJson(hit_submission_data_item.getWrappedObject().getItemValueMap())"/>
</insert-datastore>