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

org.ow2.bonita.facade.runtime.ActivityInstance 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.Map;

import org.ow2.bonita.facade.uuid.ActivityInstanceUUID;

/**
 * Runtime (recorded) data concerning activities.
* This interface concerns the common part for the activity. */ public interface ActivityInstance extends RuntimeRecord { /** * Returns the UUID of the activity instance. * @return The UUID of the activity instance. */ ActivityInstanceUUID getUUID(); /** * Returns the value of the id attribute of the Activity element defined into the XPDL file. */ String getActivityName(); /** * Returns the iteration id of this activity */ String getIterationId(); /** * Returns the activity instance id of this activity (in case of multi instantiation) */ String getActivityInstanceId(); /** * Returns all variables for the recorded activity before * the activity has been started. * If a hook with an OnReady event name has been defined, * this hook has been executed. * The map returned by this method contains both global variables * (for the process) and local variables (for this activity). * Key is the variable processDefinitionUUID and value is the variable object (can be: an {@link org.ow2.bonita.facade.runtime.var.Enumeration Enumeration}, * a plain {@link String}, a {@link Boolean}, a {@link Date}, a {@link Long} or a {@link Double}). * An empty map is returned if no variable is found. * @return The map containing activity variables. */ Map getVariablesBeforeStarted(); /** * Returns the value of the variable with the specified key before * the activity has been started. * If a hook with an OnReady event name has been defined, * this hook has been executed. * @param variableId the variable processDefinitionUUID. * @return The value of the variable with the specified key (can be: an {@link org.ow2.bonita.facade.runtime.var.Enumeration Enumeration}, * a plain {@link String}, a {@link Boolean}, a {@link Date}, a {@link Long} or a {@link Double}). */ Object getVariableValueBeforeStarted(String variableId); /** * * @return true if this activity is a task */ boolean isTask(); /** * return null if this activity is not a task. Return the corresponding task instance if it is a task. */ TaskInstance getTask(); /** * Gives access to the historic of variables updates. * @return The list of recorded informations for the variable updates. */ List getVariableUpdates(); /** * Returns the map containing all variables with the last updated value. * @return The map containing all variables with the last updated value. */ Map getLastKnownVariableValues(); /** * Returns the last state update. * @return the last state update. */ StateUpdate getLastStateUpdate(); /** * Returns the date recorded after the activity is started. * @return The date recorded after the activity is started. */ Date getStartedDate(); /** * Returns the date recorded after the activity is finished. * @return The date recorded after the activity is finished. */ Date getEndedDate(); /** * Returns the date recorded when the activ. * @return The date recorded when the activity becomes READY. */ Date getReadyDate(); /** * Returns the current state. * @return The current state. */ ActivityState getState(); /** * Returns the list of recorded {@link StateUpdate state changes}. * @return The list of recorded {@link StateUpdate state changes}. */ List getStateUpdates(); AssignUpdate getLastAssignUpdate(); String getActivityLabel(); String getActivityDescription(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy