startUndouableChange();
List temp = new ArrayList();
XMLElement newEl = null;
if (xpdlClass == Activities.class || xpdlClass == Activity.class) {
ActivitySet as = selectionMng.getWorkingActivitySet();
WorkflowProcess wp = selectionMng.getWorkingProcess();
if (as != null && !as.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(as.getActivities(), typeId, true);
} else if (wp != null && !wp.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getActivities(), typeId, true);
}
} else if (xpdlClass == ActivitySet.class || xpdlClass == ActivitySets.class) {
WorkflowProcess wp = selectionMng.getWorkingProcess();
if (wp != null && !wp.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getActivitySets(), typeId, true);
}
} else if (xpdlClass == Application.class || xpdlClass == Applications.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getApplications(), typeId, true);
}
} else if (xpdlClass == DataField.class || xpdlClass == DataFields.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getDataFields(), typeId, true);
}
} else if (xpdlClass == ExtendedAttribute.class || xpdlClass == ExtendedAttributes.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getExtendedAttributes(), typeId, true);
}
} else if (xpdlClass == FormalParameter.class || xpdlClass == FormalParameters.class) {
WorkflowProcess wp = selectionMng.getWorkingProcess();
if (wp != null && !wp.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getFormalParameters(), typeId, true);
}
} else if (xpdlClass == Namespace.class || xpdlClass == Namespaces.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getNamespaces(), typeId, true);
}
} else if (xpdlClass == Participant.class || xpdlClass == Participants.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getParticipants(), typeId, true);
}
} else if (xpdlClass == Responsible.class || xpdlClass == Responsibles.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getRedefinableHeader().getResponsibles(),
typeId,
true);
}
} else if (xpdlClass == Transition.class || xpdlClass == Transitions.class) {
ActivitySet as = selectionMng.getWorkingActivitySet();
WorkflowProcess wp = selectionMng.getWorkingProcess();
if (as != null && !as.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(as.getTransitions(), typeId, true);
} else if (wp != null && !wp.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getTransitions(), typeId, true);
}
} else if (xpdlClass == TypeDeclaration.class || xpdlClass == TypeDeclarations.class) {
Package workingPkg = selectionMng.getWorkingPKG();
if (workingPkg != null && !workingPkg.isReadOnly()) {
newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getTypeDeclarations(), typeId, true);