I think its Client Action not server action. You can use OnAfterFetch Client event of Aggregate to get the data in client action

And below is the assignment

Id and test attribute are assigned to input variable of Javascript Widget and attached is the working sample
Hope this will help you
Best Regards]
Devendra