It is not a good practise to create Pega's rule / Data instances in run time. But at times we will still end up with such interesting requirements.
In such cases, rule authoring is the best way to do it.
1) Workbaskets are basically data instances of class Data-Admin-Workbasket.
2) So have a template workbasket rule that contains the common data / dummy data that can be used by the system during run time. Meaning in run time the system is going to use this instance and modify certain elements of the instance to create a new Workbasket instance likehaving specific roles, change in Div, unit.
3) Save the new instances and now you have a new WB instance ready to be assingned to an operator.