Hey All,
I'm trying to check the promotion request workflow if a role was populated during the initiation of the promo request, in the wizard; or if I need to branch off to a Setup Participants activity.
I'm adding a condition node in the workflow with the below, but it does not work. Although it should look familiar 🙂
Any code or tips for me?
Thanks Vaughn
boolean provider = false;
wt.workflow.engine.WfProcess wfprocess = (((wt.workflow.work.WfAssignedActivity)self.getObject()).getParentProcess());
java.util.Enumeration roles = wfprocess.getRoles();
while (roles.hasMoreElements())
{
wt.project.Role role = (wt.project.Role)roles.nextElement();
java.util.Enumeration participants = wfprocess.getPrincipals(role);
if (participants.hasMoreElements())
{
if (role.getDisplay().equalsIgnoreCase("Approver")) provider=true;
}
}
if (!provider)
{
result="SetupApprover";
}else{
result="AlreadySetup";
}