The following expressions may be helpful. These was used in the
promotion workflow to determine if the creator was part of the
"Configuration Manager" group. You can probably clean this up somewhat
but it should get your started.
Expression Robot
wt.org.WTOrganization wtorg =
wt.org.WTOrganization.newWTOrganization("MyOrganization");
wt.org.DirectoryContextProvider directoryContextProvider =
(wt.org.DirectoryContextProvider) wtorg;
wt.maturity.PromotionNotice pn =
(wt.maturity.PromotionNotice)primaryBusinessObject;
String creatorUser = pn.getCreatorName().toString();
java.util.Enumeration windchillGroups =
wt.org.OrganizationServicesHelper.manager.findLikeGroups("Configuration
Managers", directoryContextProvider);
while (windchillGroups.hasMoreElements()) {
wt.org.WTGroup wtgroup = (wt.org.WTGroup)
windchillGroups.nextElement();
java.util.Enumeration usersEnum =wtgroup.members();
while(usersEnum.hasMoreElements()){
wt.org.WTUser user = (wt.org.WTUser)usersEnum.nextElement();
String groupUser = user.getName();
if (groupUser == creatorUser)
{
isAdmin = "True";
}
}
}
Conditional Expression
if (isAdmin.equals("True"))
{
result = "isAdmin";
}
else
{
result = "notAdmin";
}
Hope this helps,
Dax