List parts = request.getEditParts();
CompoundCommand result = new CompoundCommand();
for (int i = 0; i < parts.size(); i++) {
EditPart part = (EditPart) parts.get(i);
if (part.getModel() instanceof IActionElement) {
IActionElement ae = (IActionElement) part.getModel();
IState state = (IState) getHost().getModel();
if ((ae.getType() == IActionElement.ACTION_TYPE.ACTION && state instanceof IActionState)
|| (ae.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION && state instanceof IViewState)
|| (ae.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION && state instanceof IState)
|| (ae.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION && state instanceof ITransitionableFrom)) {
ActionCloneCommand orphan = new ActionCloneCommand();
orphan.setChild((IActionElement) ((EditPart) parts.get(i))
.getModel());
orphan.setNewState((IWebflowModelElement) getHost()
.getModel());