You can API such as taskSession.addUser(user) and taskSession.addGroup(group) to add users.
https://hudson.jboss.org/jenkins/job/jBPM5/lastSuccessfulBuild/artifact/jbpm-distribution/target/jbpm-5.1-SNAPSHOT-docs-build/jbpm-docs/html_single/index.html
Reply to this message by going to Community
Start a new discussion in jBPM at Community