07-16-2014 08:51 AM
public class User {
private String assignee;
private String groups;
….
}
if(flag){
assigneeList.add(new User("gm0"));
assigneeList.add(new User("gm1"));
assigneeList.add(new User("gm2"));
}else{
User u = new User();
u.setGroups("GM");
assigneeList.add(u);
}
if (!taskDefinition.getCandidateGroupIdExpressions().isEmpty()) {
for (Expression groupIdExpr : taskDefinition.getCandidateGroupIdExpressions()) {
Object value = groupIdExpr.getValue(execution);
if (value instanceof String) {
List<String> candiates = extractCandidates((String) value);
task.addCandidateGroups(candiates);
} else if (value instanceof Collection) {
task.addCandidateGroups((Collection) value);
} else {
throw new ActivitiIllegalArgumentException("Expression did not resolve to a string or collection of strings");
}
}
}
if (!taskDefinition.getCandidateUserIdExpressions().isEmpty()) {
for (Expression userIdExpr : taskDefinition.getCandidateUserIdExpressions()) {
Object value = userIdExpr.getValue(execution);
if (value instanceof String) {
List<String> candiates = extractCandidates((String) value);
task.addCandidateUsers(candiates);
} else if (value instanceof Collection) {
task.addCandidateUsers((Collection) value);
} else {
throw new ActivitiException("Expression did not resolve to a string or collection of strings");
}
}
}
if (!taskDefinition.getCandidateGroupIdExpressions().isEmpty()) {
for (Expression groupIdExpr : taskDefinition.getCandidateGroupIdExpressions()) {
Object value = groupIdExpr.getValue(execution);
if(value == null){
//do nothing, just ignore
}else if (value instanceof String) {
…..
if (!taskDefinition.getCandidateUserIdExpressions().isEmpty()) {
for (Expression userIdExpr : taskDefinition.getCandidateUserIdExpressions()) {
Object value = userIdExpr.getValue(execution);
if(value == null){
//do nothing, just ignore
}else if (value instanceof String) {
07-16-2014 08:57 AM
07-16-2014 09:09 AM
07-17-2014 01:32 AM
07-22-2014 03:25 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.