cmd.setNewActivity(((IState) ((CreateRequest) request)
.getNewObject()));
return cmd;
}
else if (getHost().getModel() instanceof IIfTransition) {
SplitIfTransitionCommand cmd = new SplitIfTransitionCommand();
cmd.setTransition(((IIfTransition) getHost().getModel()));
cmd.setParent(((IWebflowState) ((IfTransitionPart) getHost())
.getTarget().getParent().getModel()));
cmd.setNewActivity(((IState) ((CreateRequest) request)
.getNewObject()));
return cmd;
}
}
else if (((CreateRequest) request).getNewObject() instanceof IActionElement
&& getHost().getModel() instanceof IStateTransition) {
IActionElement action = (IActionElement) ((CreateRequest) request)
.getNewObject();
if (action.getType() == IActionElement.ACTION_TYPE.ACTION) {
AddTransitionActionCommand cmd = new AddTransitionActionCommand();
cmd.setTransition(((IStateTransition) getHost().getModel()));
cmd.setNewAction(((IActionElement) ((CreateRequest) request)
.getNewObject()));
return cmd;
}
}
return null;