public Expression affect(final Scope scope, final Expression left, final Expression right) throws CoreException { Variable v = null; try { this.log.finest("affect " + right + " in " + left); final Element leftSide = null; final Element rightSide = null; if(!(left instanceof To)) { throw new BPELException("Incorrect affectation !!!"); } if(!(right instanceof From)) { throw new BPELException("Incorrect affectation !!!"); } final To to = (To)left; final From from = (From)right; if((to.getKind() == To.Kind.PARTNERLINK)||(from.getKind() == From.Kind.PARTNERLINK)) { v = this.affectPartner(scope, leftSide, rightSide, to, from); } else { v = this.affectVariable(scope, leftSide, rightSide, to, from); } } catch (final BPELException e) { throw new CoreException(e); } return v; }
if(from.getKind() == From.Kind.LITERAL) { rightSide.setText(from.getLiteral().getStringContent().trim()); } else if((from.getKind() == From.Kind.EXPRESSION)||(from.getKind() == From.Kind.VARIABLE_PART)) { if(from.getKind() == From.Kind.EXPRESSION) { expression = from.getContent().trim(); } else if(from.getKind() == From.Kind.VARIABLE_PART) { expression = ExpressionUtil.convertVariable2Expression(from.getVariablePart()); } else if(from.getKind() == From.Kind.VARIABLE_PART) { throw new NotImplementedException("Affectation using variable not implemented: Use affectation by expression"); } else {
if(from.getKind() == From.Kind.LITERAL) { eprFrom = WSAddressingFactory.getInstance().newEndpointReferenceType(); } else if((from.getKind() == From.Kind.EXPRESSION)||(from.getKind() == From.Kind.VARIABLE_PART)) { final ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(""); if(from.getKind() == From.Kind.EXPRESSION) { expression = from.getContent(); } else if(from.getKind() == From.Kind.VARIABLE_PART) { expression = ExpressionUtil.convertVariable2Expression(from.getVariablePart()); eprFrom = WSAddressingFactory.getInstance().newEndpointReferenceType(); } else if(from.getKind() == From.Kind.PARTNERLINK) {