Examples of BpelScopeImpl


Examples of jbprocess.bpel.BpelScopeImpl

    if (block.getLabel() != null && block.getLabel().startsWith("flow_")){
      blockData.activity = createFlow(block);
    } else if (block.getStatements().size() > 0) { 
      if (blockData.scopeStack == null)
        blockData.scopeStack = new Stack<BpelScope>();
      BpelScopeImpl blockScope = new BpelScopeImpl();
      blockData.scopeStack.push(blockScope);       
     
      for (CtStatement stmt : block.getStatements()){
        scan(stmt);
        ASTNodeData stmtData = nodeDataStack.peek();
        if (stmtData != null){         
          if ( stmtData.receive != null ){           
            blockData.receive = stmtData.receive;
            blockScope.addActivity(stmtData.activity);
            break;
          } else if (stmtData.reply != null){           
            blockData.reply = stmtData.reply;
            blockScope.addActivity(stmtData.activity);           
            break;
          }   
          blockData.receive = null;
          blockData.reply = null;
          if (stmtData.activity != null)
            blockScope.addActivity(stmtData.activity);
          //Activity activity = stmtData.activity;
          //if (activity != null)
          //  blockData.scopeStack.peek().addActivity(activity);
        }
      }
     
      blockData.scopeStack.pop();
      blockData.activity = blockScope.getActivity();
    }
   
    exit(block);
  }
View Full Code Here

Examples of jbprocess.bpel.BpelScopeImpl

      // this in an invocation of a partner's web service...
      Invoke invoke = BPELFactory.eINSTANCE.createInvoke();
      invoke.setPortType(execNodeData.portType);
      invoke.setOperation(execNodeData.operation);
      invoke.setPartnerLink(targetNodeData.partnerLink);
      invocationData.invokeScope = new BpelScopeImpl();
      setInvokeParameters(execNodeData.operation,invoke,invocation.getArguments(),invocationData.invokeScope);
      invocationData.invokeScope.addActivity(invoke);
      invocationData.activity = invocationData.invokeScope.getActivity();
      invocationData.invoke = invoke;
    } else if (execNodeData.bottomUpProcess != null && execNodeData.operation != null){
      // this is an invocation of a web service provided by a process...
      Receive recv = BPELFactory.eINSTANCE.createReceive();
      recv.setPortType(execNodeData.portType);
      recv.setOperation(execNodeData.operation);
      invocationData.receiveScope = new BpelScopeImpl();
      invocationData.receiveScope.addActivity(recv);
      setRecvParameters(execNodeData.operation, recv,invocation.getArguments(),invocationData.receiveScope);
      invocationData.activity = invocationData.receiveScope.getActivity();
      invocationData.receive = recv;
    } else {
      if (invocation.getExecutable() != null &&
          invocation.getExecutable().getDeclaration() != null &&
          invocation.getExecutable().getDeclaration() instanceof CtMethod ){
        CtMethod m = (CtMethod)invocation.getExecutable().getDeclaration();
        ReplyActivity replyAnn = m.getAnnotation(ReplyActivity.class);
        if (replyAnn != null && invocation.getArguments().size() == 1){
          scan(invocation.getArguments().get(0));
          ASTNodeData arg = nodeDataStack.peek();
          if (arg.xsdType != null && arg.xpathExpr != null && arg.variable != null){
            for (Receive recv : methodReceiveMap.values()){
              if (recv.getName().equals(replyAnn.receiveName())){
                Reply reply = BPELFactory.eINSTANCE.createReply();
                String replyName = m.getSimpleName();
                if (!replyAnn.name().equals(""))
                  replyName = replyAnn.name();
                reply.setName(replyName);
                if (exceptionTypes.contains(invocation.getArguments().get(0).getType().getDeclaration()))
                  reply.setFaultName(arg.xsdTypeQName);
                BpelScope tmpScope = new BpelScopeImpl();
                setReplyParameters(recv, reply, arg.variable, arg.xsdType, arg.xpathExpr, tmpScope);
                invocationData.activity = tmpScope.getActivity();
                invocationData.replyActivity = reply;
                invocationData.reply = reply;
                if (m.getAnnotation(FlowActivity.class) != null){
                  createMethodFlowMapping(m, invocationData.activity);
                  invocationData.flowActivity = invocationData.activity;
View Full Code Here

Examples of jbprocess.bpel.BpelScopeImpl

    org.eclipse.bpel.model.Process process = classProcessMap.get(m.getDeclaringType());
    if (process != null){     
      Stack<BpelScope> scopeStack = classScopeMap.get(m.getDeclaringType());
      methodNodeData.scopeStack = scopeStack;
      methodNodeData.bpelProcess = process;
      BpelScope methodScope = new BpelScopeImpl();
      scopeStack.push(methodScope);
      scan(m.getBody());
      ASTNodeData bodyData = nodeDataStack.peek();
      scopeStack.pop();
      FlowActivity flowActivity = m.getAnnotation(FlowActivity.class);
View Full Code Here

Examples of jbprocess.bpel.BpelScopeImpl

  @Override
  public void visitCtTry(CtTry tryBlock) {
    enter(tryBlock);
    ASTNodeData tryNodeData = nodeDataStack.peek();
   
    BpelScopeImpl tryScope = new BpelScopeImpl();
    tryNodeData.scopeStack.push(tryScope);
   
    scan(tryBlock.getAnnotations());
   
    scan(tryBlock.getBody());
    ASTNodeData bodyData = nodeDataStack.peek();
    if (bodyData.receive != null){
      tryNodeData.receive = bodyData.receive;
      tryScope.addActivity(bodyData.activity);
    } else if (bodyData.reply != null){  
      tryNodeData.reply = bodyData.reply;
      tryScope.addActivity(bodyData.activity);
    } else {
      if (bodyData.activity != null)
        tryScope.addActivity(bodyData.activity);
    }
    //else {
      //scan(tryBlock.getCatchers());
      for (CtCatch cat : tryBlock.getCatchers()){
        scan(cat);
        ASTNodeData catchData = nodeDataStack.peek();
        if (catchData.activity != null){
          if (!catchData.isCatchAll){
            Catch c = BPELFactory.eINSTANCE.createCatch();
            if (catchData.variable != null)
              c.setFaultVariable(catchData.variable);
            if (catchData.xsdTypeQName != null)
              c.setFaultName(catchData.xsdTypeQName);
            c.setActivity(catchData.activity);
            tryScope.addCatch(c);
          } else {
            CatchAll call = BPELFactory.eINSTANCE.createCatchAll();
            call.setActivity(catchData.activity);
            tryScope.setCatchAll(call);
          }
        }
      }
   
      if (tryBlock.getFinalizer() != null){
        scan(tryBlock.getFinalizer());
        ASTNodeData finalizerData = nodeDataStack.peek();   
        if (finalizerData.activity != null)
          tryScope.addActivity(finalizerData.activity);
      }     
    //}
   
    tryNodeData.scopeStack.pop();
   
    tryNodeData.activity = tryScope.getActivity();
   
    exit(tryBlock);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.