// Activity node
ActivityNode activityNode = (ActivityNode) ie.getSafeTransferData(ClientFlavors.ACTIVITY_NODE);
// Create a dummy item, which can hold the activity handler definition,
// so we can start the activity handler source code generator.
item = new JavaActivityItemImpl();
item.setModel(activityNode.getOwningModel());
// Copy the properties of the handler definition from the node to the dummy item
int syncFlags = ItemSynchronization.SYNC_ALL;
((ItemProvider) activityNode).copyToItem(item, syncFlags);