Generate Group at runtime

Is there any way we can generate group at runtime(dynamic) or in other words, create new group at runtime based on condition. This group can have set of users or groups or combination of both.

I’m new to Camunda and basically from IBM BPM domain so need help on this.