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.

[354 byte] By [Mark.Nienabera] at [2007-11-26 17:35:19]
# 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

PaulWalker999a at 2007-7-9 0:03:20 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
Thanks Paul.
Mark.Nienabera at 2007-7-9 0:03:20 > top of Java-index,Web & Directory Servers,Directory Servers...