Package org.uengine.util

Examples of org.uengine.util.ActivityForLoop


      approvalLineAct = approvalLineAct.getParentActivity();
    }
   
    ComplexActivity parent = (ComplexActivity) approvalLineAct;
    final Vector childActs = new Vector();
    ActivityForLoop forLoop = new ActivityForLoop() {
      public void logic(Activity act) {
        try {
          if (act instanceof ExternalApprovalActivity) {
            childActs.add(act);
          }
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
    };
    forLoop.run(parent);
   
    int readyIndex = -1;
    for (int i = 0; i < childActs.size(); i++) {
      Activity approvalAct = (Activity) childActs.get(i);
      if (Activity.STATUS_READY.equalsIgnoreCase(approvalAct.getStatus(instance))) {
View Full Code Here


   
    //TODO this is a situation-specific code. Generalize sometime.
    if("event".equals(message) && (messageSubscriptions==null || messageSubscriptions.size()==0)){
      messageSubscriptions = new Vector();
      final Vector finalSubscribedScopes = messageSubscriptions;
      ActivityForLoop findingLoopForRunningScopeActivity = new ActivityForLoop(){

        public void logic(Activity activity) {
          if(activity instanceof ScopeActivity){
            try {
              if(isRunning(activity.getTracingTag()) && ((ScopeActivity)activity).getEventHandlers()!=null)
                finalSubscribedScopes.add(activity.getTracingTag());
            } catch (Exception e) {
            }
          }
        }
       
      };
     
      findingLoopForRunningScopeActivity.run(getProcessDefinition());
    }
   
    return messageSubscriptions;
  }
View Full Code Here

  FormApprovalActivity draftActivity;
  public FormApprovalActivity getDraftActivity(){
    if(draftActivity!=null)
      return draftActivity;
   
    ActivityForLoop findingLoop = new ActivityForLoop(){
      public void logic(Activity activity){
        if(activity instanceof FormApprovalActivity){
          stop(activity);
        }
      }
    };
   
    findingLoop.run(this);   
    this.draftActivity = (FormApprovalActivity)findingLoop.getReturnValue();
   
    return draftActivity;
  }
View Full Code Here

  ApprovalActivity draftActivity;
  public ApprovalActivity getDraftActivity(){
    if(draftActivity!=null)
      return draftActivity;
   
    ActivityForLoop findingLoop = new ActivityForLoop(){
      public void logic(Activity activity){
        if(activity instanceof ApprovalActivity){
          stop(activity);
        }
      }
    };
   
    findingLoop.run(this);   
    this.draftActivity = (ApprovalActivity)findingLoop.getReturnValue();
   
    return draftActivity;
  }
View Full Code Here

  ExternalApprovalActivity draftActivity;
  public ExternalApprovalActivity getDraftActivity() {
    if (draftActivity != null)
      return draftActivity;

    ActivityForLoop findingLoop = new ActivityForLoop() {
      public void logic(Activity activity) {
        if (activity instanceof ExternalApprovalActivity) {
          stop(activity);
        }
      }
    };

    findingLoop.run(this);
    this.draftActivity = (ExternalApprovalActivity) findingLoop.getReturnValue();

    return draftActivity;
  }
View Full Code Here

TOP

Related Classes of org.uengine.util.ActivityForLoop

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.