We did create Workgroups on the fly in our Project.
You just need a Model Workgroup defined in your system. Do an "Obj-Open-by-Handle" of that , and then rename the workgroup and do Obj-Save. It will create a new entry in the database. You can change any properties of Workgroup rule want.
The only issue you have to think is how will you map the users to that workgroup.
Thanks Bhavya for your valuable inputs, any thought on mapping user with newly created WorkGroup on the fly. You mentioned there is one issue, how did you resolve this. Please advise - Rajesh Kumar Yadav