Package org.jbpm.task

Examples of org.jbpm.task.User


    String actorId = (String) workItem.getParameter("ActorId");
    if (actorId != null && actorId.trim().length() > 0) {
      String[] actorIds = actorId.split(",");
      for (String id: actorIds) {
        potentialOwners.add(new User(id.trim()));
      }
            //Set the first user as creator ID??? hmmm might be wrong
            if (potentialOwners.size() > 0){
                taskData.setCreatedBy((User)potentialOwners.get(0));
            }
        }
   
        String groupId = (String) workItem.getParameter("GroupId");
    if (groupId != null && groupId.trim().length() > 0) {
      String[] groupIds = groupId.split(",");
      for (String id: groupIds) {
        potentialOwners.add(new Group(id.trim()));
      }
    }

        assignments.setPotentialOwners(potentialOwners);
    List<OrganizationalEntity> businessAdministrators = new ArrayList<OrganizationalEntity>();
    businessAdministrators.add(new User("Administrator"));
    assignments.setBusinessAdministrators(businessAdministrators);
    task.setPeopleAssignments(assignments);
       
    task.setTaskData(taskData);
View Full Code Here


      if (userInfo == null) {
        return;
      }
     
        TaskData data = task.getTaskData();
        User owner = data.getActualOwner();
        User creator = data.getCreatedBy();
        Date createdOn = data.getCreatedOn();

        if ( task.getDeadlines() == null ) {
            return;
        }
View Full Code Here

       
        priority = in.readInt();
        skipable = in.readBoolean();

        if ( in.readBoolean() ) {
            actualOwner = new User();
            actualOwner.readExternal( in );
        }
       
        if ( in.readBoolean() ) {
            createdBy = new User();
            createdBy.readExternal( in );
        }
       
        if ( in.readBoolean() ) {
            createdOn = new Date( in.readLong() );
View Full Code Here

        int size = in.readInt();
        List<OrganizationalEntity> list = new ArrayList<OrganizationalEntity>(size);
        for ( int i = 0; i < size; i++ ) {
            short type = in.readShort();
            if ( type == 0 ) {
                User user = new User();
                user.readExternal( in );
                list.add( user );
            } else {
                Group group = new Group();
                group.readExternal( in );
                list.add( group );
View Full Code Here

   
    EntityManagerFactory localEntityManagerFactory = Persistence.createEntityManagerFactory("org.jbpm.task");
    TaskService localTaskService = new TaskService(localEntityManagerFactory, SystemEventListenerFactory.getSystemEventListener());
    TaskServiceSession localTaskServiceSession = localTaskService.createSession();
    for (int i = 0; i < 10; i++) {
      User user = new User("usr" + i);
      localTaskServiceSession.addUser(user);
    }
    for (int j = 0; j < 3; j++) {
      localTaskServiceSession.addGroup(new Group("grp" + j));
    }
View Full Code Here

    I18NText text1 = new I18NText("en-UK", "tarea1");
    names1.add(text1);
    task.setNames(names1);
    TaskData taskData = new TaskData();
    taskData.setStatus(Status.Created);
    taskData.setCreatedBy(new User("usr0"));
    taskData.setActualOwner(new User("usr0"));
    task.setTaskData(taskData);
   
    ContentData data = new ContentData();
    BlockingAddTaskResponseHandler addTaskHandler = new BlockingAddTaskResponseHandler();
    client.addTask(task, data, addTaskHandler);
   
    long taskId = addTaskHandler.getTaskId();

    client.disconnect();
   
    client.connect();
   
    assertTrue("taskId debe ser un valor mayor a cero", taskId > 0);
   
    Task task2 = new Task();
    List<I18NText> names2 = new ArrayList<I18NText>();
    I18NText text2 = new I18NText("en-UK", "tarea1");
    names2.add(text2);
    task2.setNames(names2);
    TaskData taskData2 = new TaskData();
    taskData2.setStatus(Status.Created);
    taskData2.setCreatedBy(new User("usr0"));
    taskData2.setActualOwner(new User("usr0"));
    task2.setTaskData(taskData2);
     
    ContentData data2 = new ContentData();
    BlockingAddTaskResponseHandler addTaskHandler2 = new BlockingAddTaskResponseHandler();
    client.addTask(task2, data2, addTaskHandler2);
View Full Code Here

        emf = Persistence.createEntityManagerFactory("org.jbpm.task");

        taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        taskSession = taskService.createSession();

        User operator = new User("operator");
        User driver = new User("control");
        User hospital = new User("hospital");
        User doctor = new User("doctor");
        User firefighter = new User("firefighter");
        User garageEmergencyService = new User("garage_emergency_service");
        User Administrator = new User("Administrator");


        taskSession.addUser(Administrator);
        taskSession.addUser(operator);
        taskSession.addUser(driver);
View Full Code Here

    public void startWorkAction() {
        String taskKey = (String) pendingTasksList.getSelectedValue();
        TaskSummary task = tasks.get(taskKey);
        String userKey = (String) usersList.getSelectedValue();
        System.out.println("complete task user: " + userKey);
        User user = users.get(userKey);
        WriteDocumentDialog frame = new WriteDocumentDialog(this.getFrame(), task, user, client, null);
        frame.setModal(true);
        frame.setVisible(true);
        refreshUserAssignedTasks(user.getId());
    }
View Full Code Here

    // End of variables declaration//GEN-END:variables

    private JDialog aboutBox;

    private void initializeUsers() {
        users.put("salaboy", new User("salaboy"));
        users.put("translator", new User("translator"));
        users.put("reviewer", new User("reviewer"));
        users.put("Administrator", new User("Administrator"));
        usersListModel = new DefaultListModel();
        usersList.setModel(usersListModel);
        Set<String> userKeys = users.keySet();
        for (String key : userKeys) {
            usersListModel.addElement(key);
View Full Code Here

            usersListModel.addElement(key);
        }
    }

    private void refreshUserAssignedTasks(String userName) {
        User user = users.get(userName);
        List<TaskSummary> taskSummarys = null;
        try {
            taskSummarys = client.getAssignedTasks(user);
        }
        catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.jbpm.task.User

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.