else if(TEmpty.class.isInstance(begin.getBpelCode())){
TEmpty iEmpty = iSeq.addNewEmpty();
iEmpty.set(begin.getBpelCode());
}
else if(TWait.class.isInstance(begin.getBpelCode())){
TWait iWait = iSeq.addNewWait();
iWait.set(begin.getBpelCode());
}
else if(TReceive.class.isInstance(begin.getBpelCode())){
TReceive iReceive = iSeq.addNewReceive();
iReceive.set(begin.getBpelCode());
}
else if(TReply.class.isInstance(begin.getBpelCode())){
TReply iReply = iSeq.addNewReply();
iReply.set(begin.getBpelCode());
}
else if(TInvoke.class.isInstance(begin.getBpelCode())){
TInvoke iInvoke = iSeq.addNewInvoke();
iInvoke.set(begin.getBpelCode());
}
else if(TWhile.class.isInstance(begin.getBpelCode()))
{
TWhile iwhile = iSeq.addNewWhile();
iwhile.set(begin.getBpelCode());
}
}
//place between transitions
AbstractElement<?> tmp = begin.get_first_post_element();
//2.transition
tmp = tmp.get_first_post_element();
//if the 2.transition is a SequenceTransition
if (SequenceTransition.class.isInstance(tmp)){
TSequence helpSequence = (TSequence)tmp.getBpelCode();
XmlCursor cursSeq = iSeq.newCursor();
XmlCursor cursSub = helpSequence.newCursor();
cursSeq.toEndToken();
cursSub.copyXmlContents(cursSeq);
}
else{
//transitions case (2.transition)
if(TPick.class.isInstance(tmp.getBpelCode())){
TPick iPick = iSeq.addNewPick();
iPick.set(tmp.getBpelCode());
}
else if(TIf.class.isInstance(tmp.getBpelCode())){
TIf iIf = iSeq.addNewIf();
iIf.set(tmp.getBpelCode());
}
else if(TAssign.class.isInstance(tmp.getBpelCode())){
TAssign iAss = iSeq.addNewAssign();
iAss.set(tmp.getBpelCode());
}
else if(TFlow.class.isInstance(tmp.getBpelCode())){
TFlow iFlowSub = iSeq.addNewFlow();
iFlowSub.set(tmp.getBpelCode());
}
else if(TEmpty.class.isInstance(tmp.getBpelCode())){
TEmpty iEmpty = iSeq.addNewEmpty();
iEmpty.set(tmp.getBpelCode());
}
else if(TWait.class.isInstance(tmp.getBpelCode())){
TWait iWait = iSeq.addNewWait();
iWait.set(tmp.getBpelCode());
}
else if(TReceive.class.isInstance(tmp.getBpelCode())){
TReceive iReceive = iSeq.addNewReceive();
iReceive.set(tmp.getBpelCode());
}