Package jbprocess.annotations

Examples of jbprocess.annotations.FlowActivity


      BpelScope methodScope = new BpelScopeImpl();
      scopeStack.push(methodScope);
      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){       
View Full Code Here


    }
    return null;
  }
  void setFlowActivityLinks(Flow flow, CtMethod<?> flowMethod, Activity activity){
    HashMap<String,Link> linkMap = new HashMap<String,Link>();
    FlowActivity flowActivity = flowMethod.getAnnotation(FlowActivity.class);
    if (flowActivity != null){
      if (flowActivity.targets().length > 0){
        Targets targets = BPELFactory.eINSTANCE.createTargets();
        activity.setTargets(targets);
        for(int i=0; i < flowActivity.targets().length; i++){
          FlowLinkTarget linkTarget = flowActivity.targets()[i];
          if (!linkTarget.name().equals("")){
            Link link = linkMap.get(linkTarget.name());
            if (link == null){
              link = BPELFactory.eINSTANCE.createLink();
              link.setName(linkTarget.name());
              linkMap.put(linkTarget.name(), link);
              flow.getLinks().getChildren().add(link);
            }           
            Target target = BPELFactory.eINSTANCE.createTarget();
            target.setLink(link);
            target.setActivity(activity)
            targets.getChildren().add(target);
          }
        }       
      }     
      if (flowActivity.sources().length > 0){
        Sources sources = BPELFactory.eINSTANCE.createSources();
        activity.setSources(sources);     
        for(int i=0; i < flowActivity.sources().length; i++){
          FlowLinkSource linkSource = flowActivity.sources()[i];
          Link link = linkMap.get(linkSource.name());
          if (link == null){
            link = BPELFactory.eINSTANCE.createLink();
            link.setName(linkSource.name());
            linkMap.put(linkSource.name(), link);
View Full Code Here

    return createFieldToElementMapping(elementName,setTargetNamespace,targetNamespace,parentType,fieldType);
  }
  */
  @SuppressWarnings("unchecked")
  <T> void createMethodFlowMapping(CtMethod<T> m, Activity activity) {
    FlowActivity flowActivity = m.getAnnotation(FlowActivity.class);
    if (flowActivity != null && activity != null){
      String activityName = m.getSimpleName();
      if (!flowActivity.name().equals(""))
        activityName = flowActivity.name();
      activity.setName(activityName);
      methodFlowActivityMap.put(m,activity);   
      /*
      if (flowActivity.targets().length > 0){
        Targets targets = BPELFactory.eINSTANCE.createTargets();
View Full Code Here

    HashSet<CtMethod<?>> flowActivities = new HashSet<CtMethod<?>>();
    HashSet<CtMethod<?>> recvActivities = new HashSet<CtMethod<?>>();
    HashSet<CtMethod<?>> replyActivities = new HashSet<CtMethod<?>>();
    CtMethod<?> processMethod = null;
    for(CtMethod<?> m : ctClass.getMethods()){
      FlowActivity flowActivity = m.getAnnotation(FlowActivity.class);
      if (flowActivity != null)
        flowActivities.add(m);
      else if (m.getAnnotation(ReceiveActivity.class) != null)
        recvActivities.add(m);
      else if (m.getAnnotation(ReplyActivity.class) != null)
View Full Code Here

TOP

Related Classes of jbprocess.annotations.FlowActivity

Copyright © 2018 www.massapicom. 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.