java.util.List list = (java.util.List)tr.getTransferData(listFlavor);
Object objectGot = list.get(0);
if(objectGot instanceof Role && value instanceof Role && list.size()>1){
ProcessDefinitionDesigner processDefinitionDesignerFrom = (ProcessDefinitionDesigner)list.get(1);
Role droppedRole = (Role) objectGot;
if(processDefinitionDesignerFrom!=getProcessDefinitionDesigner()){
boolean connectedFromMain = true;
try{
connectedFromMain = !(processDefinitionDesignerFrom.getParentDesigner().getActivity().getProcessDefinition() == processDefinition);
}catch(Exception ex){
}
SubProcessActivity subProcAct = null;
ProcessDefinition mainProcessDefinition, subProcessDefinition;
Role subRole, mainRole;
if(connectedFromMain){
subProcAct = (SubProcessActivity) getSubProcessDesigner(getProcessDefinitionDesigner()).getActivity();
subProcessDefinition = (ProcessDefinition) getProcessDefinitionDesigner().getActivity();
subRole = (Role)value;
mainRole = droppedRole;
}else{
subProcAct = (SubProcessActivity) getSubProcessDesigner(processDefinitionDesignerFrom).getActivity();
subProcessDefinition = (ProcessDefinition) processDefinitionDesignerFrom.getActivity();
subRole = droppedRole;
mainRole = (Role)value;
}
mainProcessDefinition = subProcAct.getProcessDefinition();