public static PartnerLink findPartnerLinkRecursively(final String name, final BPELElement parent) { PartnerLink res = null; final Scope parentScope = ScopeUtil.getParentScope(parent); if(parentScope != null) { res = parentScope.findPartnerLink(name); } if(res == null) { final BPELProcess process = ScopeUtil.getProcess(parent); res = process.findPartnerLink(name); } return res; }
Node scopeNode = null; scopeNode = CreationPatternFactory.getInstance() .createScopePattern(scopeDefinition.getName(), scope); final Scope scopeComp = (Scope) scopeNode.getComponent() .getFcInterface("scope"); for (final PartnerLink plt : scopeDefinition.getPartnerLinks()) { scope.getEndpoints().put(plt, new EndpointImpl()); if (scopeDefinition.getActivity() != null) { final Node initial = this.generateActivity(scopeComp, scopeDefinition.getActivity(), bpelprocess); scopeComp.setInitialNode(initial); if (scopeDefinition.getFaultHandlers() != null) { this.generateFaultHandlers(scopeComp, scopeDefinition .getFaultHandlers().getCatchs(), scopeDefinition .getFaultHandlers().getCatchAll(), bpelprocess);
private Node generateWhile(final Scope scope, final While while_, final BPELProcess bpelprocess) throws CoreException { this.log.finest("start generate while"); Node whileNode = null; if (while_ != null) { // set bpel definition in each expression final BPELBooleanExpression copy = (BPELBooleanExpression) while_ .getCondition().copypaste(); if (!this.log.getName().equals(BPELCompilerImpl.class.getName())) { copy.setLog(this.log); } final List<Node> childNodes = new ArrayList<Node>(); Node activityNode = null; activityNode = this.generateActivity(scope, while_.getActivity(), bpelprocess); if (activityNode != null) { childNodes.add(activityNode); } else { throw new CoreException("Impossible to generate activity: " + while_.getActivity()); } // TODO Manage non-functional behaviours in process (set to null for // now) whileNode = CreationPatternFactory.getInstance().createLoopPattern( while_.getName(), copy, true, childNodes, scope, null); } this.log.finest("end generate while"); return whileNode; }
public static BPELVariable findVariableRecursively(final QName name, final BPELElement parent) { BPELVariable res = null; if((name != null) && (parent != null)) { if(parent instanceof BPELProcess) { res = ((BPELProcess)parent).findVariable(name); } else if(parent instanceof Scope) { res = ((Scope)parent).findVariable(name); } else if(parent instanceof ForEach) { final ForEach forEach = (ForEach)parent; if(forEach.getCounterName().equals(name.getLocalPart())) { final TVariable tvar = new TVariable(); tvar.setName(name.getLocalPart()); tvar.setType(DefaultSchemaImpl.getInstance().getTypeInt().getQName()); final TVariables tvars = new TVariables(); tvars.getVariable().add(tvar); final BPELVariable<Integer> var = new BPELIntVariableImpl(tvar, tvars, parent); res = var; } } if(res == null) { res = ScopeImpl.findVariableRecursively(name, (BPELElement) ((AbstractSchemaElementImpl)parent).getParent()); } } return res; }
forEach_.getScope().setName( "underScopeInForEach_" + forEach_.getName() + "_" + UUID.randomUUID());
BPELStaticAnalysisImpl.getInstance().addInfo(new BPELInfoImpl(this.getActivity(), "In receive " + this.getActivity().getName() + " => [BPEL engine restriction] Sorry, but the attribute isolated to yes is currently ignored."));
res.addAll(findActivityRecursively(clazz, fe.getScope().getActivity())); res.addAll(findActivityRecursively(clazz, s.getActivity()));
public static PartnerLink findPartnerLinkRecursively(final String name, final BPELElement parent) { PartnerLink res = null; final Scope parentScope = ScopeUtil.getParentScope(parent); if(parentScope != null) { res = parentScope.findPartnerLink(name); } if(res == null) { final BPELProcess process = ScopeUtil.getProcess(parent); res = process.findPartnerLink(name); } return res; }