Question
Set Up Participants - Role Check
Hi All,
I have two problems I'm trying to solve:
1) How do I keep the workflow from hanging if the user completes a task without actually selecting a participant in the Set Up Participants section?
2) How do I get the value of the user assigned to the role in the Set Up Participants task? I want to use this in a workflow variable for something else.
I suspect that I need expression robots to do this but I'm not sure what the syntax should be. Does anyone have any sample syntax they'd be willing to share to get this accomplished?
For the second issue, I received the following from PTC Tech Support but it always returns the value of "null" for UserName even though the "Change Admin I" role always has someone in it.
wt.doc.WTDocument doc =
(wt.doc.WTDocument)primaryBusinessObject;
wt.team.Team pbOteam =
wt.team.TeamHelper.service.getTeam(doc);
wt.team.RoleHolder2 rh =
(wt.team.RoleHolder2)pbOteam;
java.util.Enumeration princ =
rh.getPrincipalTarget(wt.project.Role.toRole("Change Admin I"));
while (princ.hasMoreElements())
{
wt.org.WTPrincipalReference pRef =
(wt.org.WTPrincipalReference)princ.nextElement();
UserName = pRef.getFullName
( );
System.out.println
(" Name is " + UserName);
}
Unique_Comments_Out=Unique_Comments_Out+"
- "+UserName;
Mike -

