コード例 #1
0
  public boolean execute(Object o) {
    if (o instanceof PlanElement) {
      PlanElement p = (PlanElement) o;
      if (p instanceof Expansion) {
        Workflow wf = ((Expansion) p).getWorkflow();
        Enumeration e = wf.getTasks();
        Task t = (Task) e.nextElement();

        if (t.getPlanElement() == null) {
          // Returns true if the current task is a supply task
          if (t.getVerb().equals(myVerb)) {
            return true;
          }
        }
      }
    }
    return false;
  }