public Sequence addSequenceOnMessage( String variable, QName itfQName, String messageExchange, String operation, String partnerlink, Pick mainPick){ OnMessage om = new OnMessageImpl(new TOnMessage(), (PickImpl)mainPick); om.setInputVariable(variable); om.setInterface(itfQName); om.setMessageExchange(messageExchange); om.setOperation(operation); om.setPartnerLink(partnerlink); Sequence seq = new SequenceImpl(new TSequence(), om); try { om.setActivity(seq); } catch (BPELException e) { e.printStackTrace(); } mainPick.addOnMessage(om); return seq; }
for (final OnMessage msg : pick.getOnMessages()) { if (msg.getActivity() != null) { receiver.addVariableName(new QName(msg.getInputVariable())); bpelprocess, msg.getCorrelations(), new QName( msg.getInputVariable())); if (!this.log.getName().equals( BPELCompilerImpl.class.getName())) { .getActivity(), bpelprocess); if (activityNode != null) { childNodes.add(activityNode); throw new CoreException( "Impossible to generate activity: " + msg.getActivity());
while(itOnMessages.hasNext() && !found){ OnMessage onM = itOnMessages.next(); QName varQN = ((BPELProcess)def).findVariable(new QName(onM.getInputVariable())).getMessageType(); if(varQN == null){ varQN = ((BPELProcess)def).findVariable(new QName(onM.getInputVariable())).getElement();
om.setPartnerLink(pl.getName()); om.setInputVariable(var); om.setInterface(currentInterface.getQName()); om.setOperation(this.varInputMap.get(var).getQName().getLocalPart()); reply.setName("ReplyFor"+om.getOperation()); reply.setOperation(om.getOperation()); reply.setOutputVariable(this.varInOut.get(var)); reply.setPartnerLink(pl.getName()); om.setActivity(reply); om.setActivity(new EmptyImpl(new TEmpty(), om));
if((this.message.getPartnerLink() == null) || (this.message.getPartnerLink().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => the partnerLink cannot be null or empty"))); if((this.message.getOperation() == null) || (this.message.getOperation().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => the operation cannot be null or empty"))); if((this.message.getInputVariable() == null) || (this.message.getInputVariable().trim().length() == 0)) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => the input variable cannot be null or empty"))); if((this.message.getPartnerLink() != null) && (this.message.getPartnerLink().trim().length() > 0)) { final PartnerLink partnerLink = ScopeUtil.findPartnerLinkRecursively(this.message.getPartnerLink(), (BPELElement) ((BPELElementImpl)this.message).getParent()); if(partnerLink == null) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => Impossible to find partnerLink corresponding to the name: " + this.message.getPartnerLink()))); if((this.message.getOperation() != null) && (this.message.getOperation().trim().length() > 0)) { if(partnerLink != null) { final BPELProcess process = ScopeUtil.getProcess((this.message)); if(this.message.getInterface() != null) { final InterfaceType itf = process.getImports().getInterface(this.message.getInterface()); if(itf != null) { itfsToVerify.add(itf); if(this.message.getInterface() != null) { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => Impossible to find in wsdl descriptions the portType: " + this.message.getInterface()))); } else { BPELStaticAnalysisImpl.getInstance().addError(new BPELErrorImpl(this.message, new BPELException("In OnMessage => Impossible to find portType. You must add portType attribute in receive or add a role to the partnerLink of receive"))); final AbsItfOperation op = itf.getOperation(new QName(itf.getQName().getNamespaceURI(), this.message.getOperation()));
Pick p = (Pick) parent; for(OnMessage m: p.getOnMessages()){ res.addAll(findActivityRecursively(clazz, m.getActivity()));
om.setPartnerLink(currentPl.getName()); om.setInputVariable(var); om.setInterface(currentInterface.getQName()); om.setOperation(this.varInputMap.get(var).q.getQName().getLocalPart()); reply.setName("ReplyFor"+om.getOperation()); reply.setOperation(om.getOperation()); reply.setOutputVariable(this.varInOut.get(var)); reply.setPartnerLink(currentPl.getName()); om.setActivity(reply); om.setActivity(new EmptyImpl(new TEmpty(), om));