/**
* Sets the to state.
* @param state the to state
*/
public void setToState(ITransitionableTo state) {
ITransitionableTo newTargetState = null;
if (state != null) {
newTargetState = (ITransitionableTo) WebflowModelXmlUtils
.getStateById(webflowState, state.getId());
}
if (newTargetState != null && !newTargetState.equals(targetState)) {
if (targetState != null) {
targetState.removeInputTransition(this);
}
setAttribute("to", state.getId());
super.fireStructureChange(OUTPUTS, state);