Examples of FlowActivity


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

Examples of jbprocess.annotations.FlowActivity

    }
    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

Examples of jbprocess.annotations.FlowActivity

    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

Examples of jbprocess.annotations.FlowActivity

    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

Examples of org.amplafi.flow.FlowActivity

    }

    public void onPrevious(IRequestCycle cycle) {
        invokeIfNotNull(cycle, getPreviousListener());
        FlowState currentFlowState = getAttachedFlowState();
        FlowActivity previous = currentFlowState.previous();
        String page = previous.getPageName();
        FlowWebUtils.activatePageIfNotNull(cycle, page, currentFlowState);
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

        invokeIfNotNull(cycle, getNextListener());

        FlowState currentFlowState = getAttachedFlowState();
        FlowValidationResult result = currentFlowState.getCurrentActivityFlowValidationResult();
        if (result.isValid()) {
            FlowActivity next = currentFlowState.next();
            if(next != null){
                // HACK : TO KOSTYA : add more details here! How do you know that there is not another error that you are now hiding?
                // Please check this again : Some ideas for you to investigate ( and fix! )  - does this relate to the next FA being invisible?
                // The Next button should not be visible if there is no next FA... Please investigate further.
                // A Comment like :"for some reason can be null when using transition" - is marginally useful add as many details as you can when you have to put in a HACK
                // which should be labeled a HACK ( so we can grep for HACK markers in the code ).
                // P.S. this is what I do all the time... constant cleaning it seems :-)
                String page = next.getPageName();
                FlowWebUtils.activatePageIfNotNull(cycle, page, currentFlowState);
            }
        } else {
            getFlowResultHandler().handleFlowResult(result, this);
        }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

    }

    @Override
    public void refresh() {
        int activityIndex = flowState.getCurrentActivityIndex();
        FlowActivity flowActivity = getActivity(activityIndex);
        if ( flowActivity != null ) {
            flowActivity.refresh();
        }
    }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

                initializeFlowProperties(this, flowPropertyDefinitions);
            }

            int size = this.size();
            for (int i = 0; i < size; i++) {
                FlowActivity activity = getActivity(i);
                activity.initializeFlow();
                LapTimer.sLap(activity.getFlowPropertyProviderFullName(), ".initializeFlow() completed");
            }
        } catch(RuntimeException e) {
            nextFlowLifecycleState = failed;
            throw e;
        } finally {
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

        return this.getCurrentPage();
    }

    private FlowActivityImplementor getTargetFAInNextFlow(FlowActivityImplementor currentFAInOriginalFlow,
            List<FlowActivityImplementor> originalFAs, List<FlowActivityImplementor> nextFAs) {
        FlowActivity flowActivity = this.getActivity(currentFAInOriginalFlow.getFlowPropertyProviderName());
        if ( flowActivity != null ) {
            // cool .. exact match on the names.
            return (FlowActivityImplementor) flowActivity;
        }
        // find the first FlowActivity that is after all the flowActivities with the same names
        // as FlowActivities in the previous flow.to find the same approximate spot in the the new flow.
        int newCurrentIndex = this.getCurrentActivityIndex();
        for (int prevIndex = 0; prevIndex < originalFAs.size(); prevIndex++) {
            FlowActivity originalFA = originalFAs.get(prevIndex);
            if ( isEqualTo(originalFA, currentFAInOriginalFlow)) {
                break;
            }
            for(int nextIndex = newCurrentIndex; nextIndex < nextFAs.size(); nextIndex++) {
                FlowActivity nextFA = nextFAs.get(nextIndex);
                if(isEqualTo(originalFA, nextFA)) {
                    newCurrentIndex = nextIndex+1;
                }
            }
        }
View Full Code Here

Examples of org.amplafi.flow.FlowActivity

        }
        FlowValidationException.valid(flowValidationResult);
        FlowState currentNextFlowState = getFlowManagement().transitionToFlowState(this, FSFLOW_TRANSITIONS);
        int size = this.size();
        for (int i = 0; i < size; i++) {
            FlowActivity activity = getActivity(i);
            FlowState returned = activity.finishFlow(currentNextFlowState);
            // activity.refresh(); -- commented out because saves default values back to the flowState
            // avoids lose track of FlowState if another FA later in the Flow
            // definition returns a null. ( this means that a FA cannot override a previous decision ).
            if (returned != null && currentNextFlowState != returned) {
                currentNextFlowState = returned;
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.