How do you see SubRoles for a user
I am in a workflow with a user variable, I can access
:variables.user.waveset.roles
to see what roles the user has, but what about the SubRoles that are assigned as part of the Roles?
i.e. I have a multi select box with all Roles...
I want to remove the SubRoles from the box should you select the Role that contains them.
# 1
Hi Mark,
You'd have to do something like this;
- Create a Rule in XPRESS that iterated over each of the Roles assigned to the user and invoke the java method available on the com.waveset.object.Role object
java.util.List getSubRoleList()
Return the current list of roles assigned to this role
<dolist name='currentRole'>
<ref>user.waveset.roles</ref>
<set name='roleObj'>
<invoke name='getObject'>
<ref>theSession</ref>
<invoke name='findType' class='com.waveset.object.Type'>
<s>Role</s>
</invoke>
<ref>currentRole</ref>
</invoke>
</set>
<block trace='true'>
<set name='subRoles'>
<invoke name='getSubRoleList'>
<ref>roleObj</ref>
</invoke>
</set>
<ref>subRoles</ref>
</block>
</dolist>
HTH,
Paul