cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Discussion Subscription

jlittle
7-Bedrock

Discussion Subscription

Fellow Users, I am trying to get an automated subscription to a discussion topic. I have the code below, but it will not resolve a user name for the given Role. When it gets to the while portion of the code, it doesn't go any further and I don't see any error messages. This robot completes and workflow continues to the next step. Any suggestions?

//GET THE ROLE
wt.project.Role subscribeRole = wt.project.Role.toRole("Designer");
//GET THE TEAM
wt.team.Team team = (wt.team.Team)((wt.team.TeamManaged)(self.getObject())).getTeamId().getObject();
//GET THE FORUM
wt.workflow.forum.DiscussionForum forum = com.ptc.netmarkets.forumPosting.NmPostingCommands.getForumFromOid(primaryBusinessObject);
//GET PARTICIPANTS FOR THE ROLE
java.util.Enumeration participants = team.getPrincipalTarget(subscribeRole);
Vector vusers = new Vector();
while (participants.hasMoreElements())
{
wt.org.WTPrincipal wtPrincipal = ((wt.org.WTPrincipalReference)participants.nextElement()).getPrincipal();

if (wtPrincipal instanceof wt.org.WTUser)
{
wt.org.WTUser wtUser = (wt.org.WTUser) wtPrincipal;
vusers.add(wtUser);

}
}


1 REPLY 1
ddemay
7-Bedrock
(To:jlittle)

Your principal is a wtgroup at that point. All teams represent each role in a team as a implicit wtgroup.


Sent from my Verizon Wireless BlackBerry
Announcements


Top Tags