java.util.List list = (java.util.List)tr.getTransferData(listFlavor);
Object objectGot = list.get(0);
if(objectGot instanceof RoleResolutionContext){
RoleResolutionContext context = (RoleResolutionContext)objectGot;
System.out.println(context.toString());
HumanActivity humanActivity = (HumanActivity)getActivity();
Role role;
if(humanActivity.getRole()!=null){
role = humanActivity.getRole();
} else {
ProcessDefinition editingDefinition = humanActivity.getProcessDefinition();
role = new Role();
role.setName(getNewRoleName(editingDefinition.getRoles()));
editingDefinition.addRole(role);
ProcessDesigner.getInstance().getProcessDefinitionDesigner().refreshActivity();
}
if(UEngineUtil.isNotEmpty(context.getDisplayName())){
String roleDisplayName = role.getDisplayName().getText();
roleDisplayName = roleDisplayName.split(":")[0];
role.setDisplayName(roleDisplayName + ":" + context.getDisplayName());
}
role.setRoleResolutionContext(context);
role.setAskWhenInit(false);