All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.bonita.facade.runtime.TaskInstance Maven / Gradle / Ivy

/**
 * Copyright (C) 2007  Bull S. A. S.
 * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation
 * version 2.1 of the License.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this
 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA  02110-1301, USA.
 **/
package org.ow2.bonita.facade.runtime;

import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * Interface of task activity (aka Manual activity).
 */
public interface TaskInstance extends ActivityInstance {

  /**
   * Returns the current set of candidate users.
* This list depends on:
*
    *
  • the set of candidate users when the task has been initially created. * The set could be empty if the performer has role type and no role mapper has been defined.
  • *
  • the call(s) to assign method (that could execute the role mapper defined for the activity). * Update list contains all information on these {@link AssignUpdate assign update}.
  • *
* @return A set of user id. */ Set getTaskCandidates(); /** * Returns the user assigned for the task.
* Check before calling this method if a user has been assigned with {@link #isTaskAssigned()} method. * The assigned user depends on: *
    *
  • the user assigned for the task when the task has been initially created
  • *
  • actions performed on the task such as start, suspend, resume, assign. * Update list contains all information on these recorded updates * ({@link AssignUpdate assign update}, {@link StateUpdate state update}).
  • *
* @throws IllegalStateException if the task is not assigned. * @return The user assigned for the task. */ String getTaskUser(); /** * Returns the user Id performing the update ({@link StateUpdate state update} or {@link AssignUpdate assign update}). * @return the user Id performing the update ({@link StateUpdate state update} or {@link AssignUpdate assign update}). */ String getUpdatedBy(); /** * Returns the user starting the task. * @return The user starting the task. */ String getStartedBy(); /** * Returns the user finishing the activity. * @return The user finishing the activity. */ String getEndedBy(); /** * Returns the date recorded when the task is created. * The task is created when the execution flow enters into the activity * node defining the task. * @return The date recorded when the task is created. */ Date getCreatedDate(); /** * Returns the list of recorded {@link AssignUpdate assign changes}. * @return The list of recorded {@link AssignUpdate assign changes}. */ List getAssignUpdates(); /** * Return true if the task is assigned. * @return true if the task is assigned. */ boolean isTaskAssigned(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy