Examples of ReplyActivity


Examples of jbprocess.annotations.ReplyActivity

    } 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);
View Full Code Here

Examples of jbprocess.annotations.ReplyActivity

      scan(m.getBody());
      ASTNodeData bodyData = nodeDataStack.peek();
      scopeStack.pop();
      FlowActivity flowActivity = m.getAnnotation(FlowActivity.class);
      ReceiveActivity receiveActivity = m.getAnnotation(ReceiveActivity.class);
      ReplyActivity replyActivity = m.getAnnotation(ReplyActivity.class);
      if (flowActivity != null && bodyData.activity != null)
        createMethodFlowMapping(m,bodyData.activity);
      if (receiveActivity != null && bodyData.receive != null){       
        List<PartnerLink> plinks = process.getPartnerLinks().getChildren();
        for (PartnerLink plink : plinks){
View Full Code Here

Examples of org.apache.ode.bpel.compiler.bom.ReplyActivity

    public OActivity newInstance(Activity src) {
        return new OReply(_context.getOProcess(), _context.getCurrent());
    }

    public void compile(OActivity output, Activity src) {
        ReplyActivity replyDef = (ReplyActivity) src;
        OReply oreply = (OReply) output;

        oreply.isFaultReply = replyDef.getFaultName() != null;
        oreply.partnerLink = _context.resolvePartnerLink(replyDef.getPartnerLink());
        oreply.messageExchangeId = replyDef.getMessageExchangeId();
        if (replyDef.getVariable() != null) {
            oreply.variable = _context.resolveVariable(replyDef.getVariable());
            if (!(oreply.variable.type instanceof OMessageVarType))
                throw new CompilationException(_cmsgsGeneral.errMessageVariableRequired(oreply.variable.name));
        }

        if (oreply.partnerLink.myRolePortType == null)
            throw new CompilationException(_cmsgsGeneral.errPartnerLinkDoesNotDeclareMyRole(oreply.partnerLink.getName()));
        // The portType on the reply is not necessary, so we check its validty only when present.
        if (replyDef.getPortType() != null && !oreply.partnerLink.myRolePortType.getQName().equals(replyDef.getPortType()))
            throw new CompilationException(_cmsgsGeneral.errPortTypeMismatch(replyDef.getPortType(),oreply.partnerLink.myRolePortType.getQName()));

        oreply.operation = _context.resolveMyRoleOperation(oreply.partnerLink, replyDef.getOperation());
        if (oreply.operation.getOutput() == null)
            throw new CompilationException(_cmsgsGeneral.errTwoWayOperationExpected(oreply.operation.getName()));

        if (oreply.isFaultReply) {
            Fault flt = null;
            if (replyDef.getFaultName().getNamespaceURI().equals(oreply.partnerLink.myRolePortType.getQName().getNamespaceURI()))
                flt = oreply.operation.getFault(replyDef.getFaultName().getLocalPart());
            if (flt == null)
                throw new CompilationException(__cmsgsLocal.errUndeclaredFault(replyDef.getFaultName().getLocalPart(), oreply.operation.getName()));
            if (oreply.variable != null && !((OMessageVarType)oreply.variable.type).messageType.equals(flt.getMessage().getQName()))
                throw new CompilationException(_cmsgsGeneral.errVariableTypeMismatch(oreply.variable.name, flt.getMessage().getQName(), ((OMessageVarType)oreply.variable.type).messageType));
            oreply.fault = replyDef.getFaultName();
        } else /* !oreply.isFaultReply */ {
            assert oreply.fault == null;
            if (oreply.variable == null)
                throw new CompilationException(__cmsgsLocal.errOutputVariableMustBeSpecified());
            if (!((OMessageVarType)oreply.variable.type).messageType.equals(oreply.operation.getOutput().getMessage().getQName()))
                throw new CompilationException(_cmsgsGeneral.errVariableTypeMismatch(oreply.variable.name, oreply.operation.getOutput().getMessage().getQName(),((OMessageVarType)oreply.variable.type).messageType));
        }

        for (Correlation correlation  : replyDef.getCorrelations()) {
            OScope.CorrelationSet cset = _context.resolveCorrelationSet(correlation.getCorrelationSet());

            switch (correlation.getInitiate()) {
                case UNSET:
                case NO:
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.