About the role assignment code in Expression
wt.org.DirectoryContextProvider contextProvider = wt.inf.container.WTContainerHelper.service.getExchangeContainer().getContextProvider();
wt.org.WTGroup wgroup = wt.org.OrganizationServicesHelper.manager.getGroup("YONETICI", contextProvider);
wt.query.QuerySpec qs = null;
qs = new wt.query.QuerySpec(wt.org.WTGroup.class);
wt.query.SearchCondition sc = new wt.query.SearchCondition(wt.org.WTGroup.class, wt.org.WTGroup.NAME, wt.query.SearchCondition.EQUAL, "YONETICI");
qs.appendWhere(sc, new int[] { 0 });
for(wt.fc.QueryResult queryResult = wt.fc.PersistenceHelper.manager.find(qs); queryResult != null && queryResult.hasMoreElements();)
wgroup = (wt.org.WTGroup)queryResult.nextElement();
java.util.ArrayList<WTUser> members = new java.util.ArrayList<WTUser>();
java.util.Enumeration<wt.org.WTPrincipal> member = wgroup.members();
while (member.hasMoreElements()) {
wt.org.WTPrincipal principal = (wt.org.WTPrincipal) member.nextElement();
if (principal instanceof WTUser){
members.add((WTUser) principal);}
}
wt.team.Team team = new wt.team.Team();
team.setName("My Team");
wt.org.WTPrincipal wtprincial = members.get(0);
wt.project.Role role = wt.project.Role.toRole("Submitter");
if (role == null) {
team.addPrincipal(role, wtprincial);
team.addPrincipal(wt.project.Role.toRole("Submitter"), wtprincial);
wt.fc.PersistenceHelper.manager.save(team);
team = (wt.team.Team)PersistenceHelper.manager.refresh(team);
}
The code above does not give an error, but when I run the flow, it does not return a user to me. There is a registered user in the "YONETICI" group, I want to assign that user to the Submitter role and send a task, but the task does not go to the user.

