Package pl.net.bluesoft.rnd.processtool.model

Examples of pl.net.bluesoft.rnd.processtool.model.ProcessInstanceFilter


        QueueType.ASSIGNED_TO_CURRENT_USER);
  }
 
  private ProcessInstanceFilter getProcessInstanceFilterForQueue(UserData user, ProcessQueue processQueue)
  {
    ProcessInstanceFilter instanceFilter = getProcessInstanceFilter(user,user,null,"user.queue.name."+processQueue.getName(), QueueType.OWN_IN_QUEUE);
   
    instanceFilter.getQueues().add(processQueue.getName());
   
    return instanceFilter;
  }
View Full Code Here


    return instanceFilter;
  }
 
  private ProcessInstanceFilter getProcessInstanceFilter(UserData user, UserData creator, UserData owner, String name, QueueType ... types)
  {
    ProcessInstanceFilter pif = new ProcessInstanceFilter();
    pif.setFilterOwner(user);
    pif.setName(name);
   
    for(QueueType queueType: types)
      pif.addQueueType(queueType);
   
    if(creator != null)
      pif.getCreators().add(creator);

    if(owner != null)
      pif.getOwners().add(owner);

    return pif;
  }
View Full Code Here

            i18NSource.getMessage("activity.assigned.tasks")))
        {
          @Override
          public Component render(Map<String,?> viewData)
          {
            ProcessInstanceFilter filter = (ProcessInstanceFilter)viewData.get("filter");
            if(filter != null)
            {
              pane.setTitle(filter.getName());
              pane.setFilter(filter);
            }
            if(leftPanelTrigger != null)
              leftPanelTrigger.show();
            return pane.init();
          }
        });

    viewController.addView(new ComponentPaneRenderer<ProcessDataViewComponent>(new ProcessDataViewComponent(application, i18NSource, viewController))
    {
      @Override
      public String getViewId()
      {
        return ProcessDataViewComponent.class.getName();
      }

      @Override
      public Component render(Map<String,?> viewData)
      {
        ProcessToolBpmSession bpmSession = (ProcessToolBpmSession)viewData.get("bpmSession");
        BpmTask task = (BpmTask)viewData.get("task");
        pane.attachProcessDataPane(task,bpmSession);
        ActivityMainPane.this.pdvc = pane;
        return pane;
      }
    });

    viewController.addView(new ComponentPaneRenderer<OtherUserProcessesListPane>(new OtherUserProcessesListPane(this, i18NSource
        .getMessage("activity.user.tasks")))
    {
      @Override
      public Component render(Map<String,?> viewData)
      {
        ProcessInstanceFilter filter = (ProcessInstanceFilter)viewData.get("filter");
        if(filter != null) {
          pane.setTitle(filter.getName());
        }
        pane.setFilter(filter);
        if (filter != null) {
          pane.setUserData(filter.getFilterOwner());
        }
        leftPanelTrigger.show();
        return pane.init();
      }
    });

    viewController.addView(new ComponentPaneRenderer<QueueListPane>(new QueueListPane(this))
    {
      @Override
      public Component render(Map<String,?> viewData)
      {
        ProcessQueue q = (ProcessQueue)viewData.get("queue");
        ProcessInstanceFilter filter = (ProcessInstanceFilter)viewData.get("filter");
        pane.setFilter(filter);
        pane.setQueue(q);
        leftPanelTrigger.show();
        return pane.init();
      }
    });

    viewController.addView(new ComponentPaneRenderer<OtherUserQueueListPane>(new OtherUserQueueListPane(this))
    {
      @Override
      public Component render(Map<String,?> viewData)
      {
        ProcessQueue queue = (ProcessQueue)viewData.get("queue");
        UserData user = (UserData)viewData.get("user");
        ProcessInstanceFilter filter = (ProcessInstanceFilter)viewData.get("filter");
        pane.setFilter(filter);
        pane.setUserData(user);
        pane.setQueue(queue);
        leftPanelTrigger.show();
        return pane.init();
View Full Code Here

  private void buildMainTasksViews(ProcessToolContext ctx, final ProcessToolBpmSession bpmSession, UserData user)
  {
    /* Create filters for specific task list */
//    ProcessInstanceFilter assignedTasksFromOthers = filterFactory.createOthersTaskAssignedToMeFilter(user);
//    ProcessInstanceFilter assignedTasksByMyself = filterFactory.createMyTasksAssignedToMeFilter(user);
    ProcessInstanceFilter tasksAssignedToMe = filterFactory.createTaskAssignedToMeFilter(user);
    ProcessInstanceFilter myTasksBeingDoneByOthers = filterFactory.createMyTaskDoneByOthersFilter(user);
    ProcessInstanceFilter myTasksClosed = filterFactory.createMyClosedTasksFilter(user);
       
//    taskList.addComponent(createUserTasksButton(bpmSession,ctx,assignedTasksFromOthers,true));
//    taskList.addComponent(createUserTasksButton(bpmSession,ctx,assignedTasksByMyself,true));
    taskList.addComponent(createUserTasksButton(bpmSession,ctx,tasksAssignedToMe,true));
    taskList.addComponent(createUserTasksButton(bpmSession,ctx,myTasksBeingDoneByOthers,true));
View Full Code Here

    {
      ProcessToolBpmSession bpmSessionForSubstituted = substitutedUserToSession.get(substitutedUser);
      UserData liferaySubstitutedUser = ctx.getUserDataDAO().loadUserByLogin(substitutedUser.getLogin());
      liferaySubstitutedUser.getRoleNames().addAll(substitutedUser.getRoleNames());

      ProcessInstanceFilter substAssignedTasks = filterFactory.createOtherUserTaskForSubstitutedUser(liferaySubstitutedUser);

      container.addItem(substAssignedTasks);

      int total = buildSubstitutedTasks(ctx,bpmSessionForSubstituted,liferaySubstitutedUser,container,substAssignedTasks);
      int totalQueues = buildSubstitutedQueues(ctx,userAvailableQueues,bpmSessionForSubstituted,substitutedUser,container,substAssignedTasks);

      container.getItem(substAssignedTasks).getItemProperty("name").setValue(getMessage(substAssignedTasks.getName(), liferaySubstitutedUser.getRealName()) + " (" + total + ";" + totalQueues + ")");
      container.getItem(substAssignedTasks).getItemProperty("description")
          .setValue(getMessage("activity.substitutions.description",liferaySubstitutedUser.getRealName(),total,totalQueues));
     
      /* button id for the refresher */
      String buttonId = QueuesPanelRefresherUtil.getSubstitutedRootNodeId(substitutedUser.getLogin());
View Full Code Here

          }
          substitutionsTree.unselect(event.getItemId());
        }
        else if(event.getItemId() instanceof ProcessInstanceFilter)
        {
          ProcessInstanceFilter filter = (ProcessInstanceFilter)event.getItemId();
          activityMainPane.displayOtherUserTasksPane(filter);
        }
        else if(event.getItemId() instanceof QueueUserSession)
        {
          QueueUserSession qus = (QueueUserSession)event.getItemId();
View Full Code Here

        return getBpmSession().findRecentTasks(minDate, offset, limit, ctx);
  }

  @Override
  protected ProcessInstanceFilter getDefaultFilter() {
    ProcessInstanceFilter tfi = new ProcessInstanceFilter();
    ProcessToolContext ctx = ProcessToolContext.Util.getThreadProcessToolContext();
    tfi.addOwner(getBpmSession().getUser(ctx));
    tfi.setUpdatedAfter(minDate.getTime());
    tfi.addQueueType(QueueType.ASSIGNED_TO_CURRENT_USER);
    return tfi;
  }
View Full Code Here

        activityMainPane.displayProcessData(task);
    }

    @Override
    protected ProcessInstanceFilter getDefaultFilter() {
        ProcessInstanceFilter tfi = new ProcessInstanceFilter();
        if (queue != null) {
            tfi.addQueue(queue.getName());
        }
        tfi.addQueueType(QueueType.OWN_IN_QUEUE);
        return tfi;
    }
View Full Code Here

        super(activityMainPane, filter.getName(), filter);
    }

    @Override
    protected ProcessInstanceFilter getDefaultFilter() {
        ProcessInstanceFilter processFilter = new ProcessInstanceFilter();
        ProcessToolContext ctx = ProcessToolContext.Util.getThreadProcessToolContext();
        processFilter.setName(getMessage("activity.assigned.tasks"));
        processFilter.addOwner(getBpmSession().getUser(ctx));
        processFilter.setFilterOwner(getBpmSession().getUser(ctx));
        processFilter.addQueueType(QueueType.ASSIGNED_TO_CURRENT_USER);
        return processFilter;
    }
View Full Code Here

          withErrorHandling(getApplication(), new Runnable() {
            @Override
            public void run() {
              ProcessInstanceFilterDAO processInstanceFilterDAO =
                                    ProcessToolContext.Util.getThreadProcessToolContext().getProcessInstanceFilterDAO();
              final ProcessInstanceFilter fullFilter = processInstanceFilterDAO.fullLoadById(filter.getId());
              activityMainPane.displayFilterPane(fullFilter);
            }
          });
        }
      });
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.model.ProcessInstanceFilter

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.