请问如何BPM将任务自动分配给角色,而不是单个用户?

自己生成procActor数据。 模拟用户在启动流程的时候选了人。

请问 我想查询符合某角色的所有用户 jpql语句怎么写才正确?我要怎么实现这种查询111

u.userRoles 是个list, 不能直接等于某个条件。
你试试这样:

                select ur.u from sec$UserRole ur
                where ur.role.name ='xxx';

或者关系清晰些的:

                select u from sec$Role r, sec$UserRole ur, sec$User u
                where ur.role = r and ur.user = u and r.name = 'xxx'