I am given a list of groups, and I want to associate those groups to the given txn, so who ever are in the same group can access that txn.
In the groovy script txn object is passed in, and I can see in txn object, you can call txn.groupNames to get the groups that is associated with the txn.
I want to somehow add groups associated with txn, so I looked at TxnUpdater, but it doesn't seem to have any means to add or modify groups associated with the txn.
How can this be done?
Do you want to create a "task form transaction"? See TxnBuilder.