{
item.setName(getName());
}
if (ai instanceof JavaActivityItem)
{
HandlerDefinition aiHandler = new HandlerDefinition();
((JavaActivityItem) ai).setHandlerDefinition(aiHandler);
try
{
aiHandler.copyFrom(getActivityHandlerDefinition(), Copyable.COPY_DEEP);
}
catch (CloneNotSupportedException e)
{
// Doesn't happen
}
aiHandler.setOwner(ai);
}
// Copy the sockets
ai.clearSockets();
for (Iterator it = getSockets(); it.hasNext();)