ALBPM Process API

fuego.papi
Class Activity

java.lang.Object
  extended by fuego.processmodel.Activity
      extended by fuego.papi.Activity
All Implemented Interfaces:
MDObject

public abstract class Activity
extends Activity
implements MDObject

This class represent an Activity into the process. To obtain a particular Activity you must obtain the process where the activity was added.

See Also:
Process.getActivities(), Process.getActivity(String), Process.getActivitiesForParticipant(Participant), Process.getActivitiesForRoles(String[])

Field Summary
 
Fields inherited from class fuego.processmodel.Activity
AUTOMATIC, BEGIN, COMPENSATE, CONDITIONAL, CREATION, DECISION, END, GLOBAL, GLOBAL_AUTOMATIC, GLOBAL_CREATION, GRAB, GROUP, INTERACTIVE, INTERACTIVE_COMPONENT_CALL, INTERACTIVE_GRAB, JOIN, NOTIFICATION_WAIT, PROCESS_CREATION, PROCESS_NOTIFICATION, SPLIT, SPLIT_N, SUBFLOW, SUBPROCESS, TERMINATION_WAIT
 
Constructor Summary
Activity()
           
 
Method Summary
abstract  boolean canBeGrabbedBy(Activity grabActivity)
          Returns true if this activity can be grabbed by the given grab activity, otherwise false.
abstract  boolean canBeSeenByParticipant(Participant participant)
          Returns true if the given participant can see this activity.
abstract  boolean canBeSeenByRole(String role)
          Return if this activity can be seen by the role.
abstract  boolean canGrab(String sourceActivity)
          Returns true if this activity can grab from the given one, otherwise false.
abstract  boolean containsDocumentation(Locale locale)
          Returns if this activity contains documentation for an specific locale.
abstract  String getActivityName()
          Returns the activity name.
static String getActivityName(String activityId)
          Returns the activity name for the given activity id.
abstract  String getDescription(Locale locale)
          Returns the localized description for the given Locale.
abstract  String getDocumentation(Locale locale)
          Deprecated. use ProcessServiceSession.getActivityDocumentation(String, java.util.Locale)
abstract  fuego.collections.maps.LocaleStringMap getDocumentationMap()
           
abstract  String getFolderName()
          Returns the name of the activity folder into the working folder.
abstract  String getId()
          Returns the activity Id.
abstract  int getIn()
          Returns the activity identification number
abstract  String getLabel(Locale locale)
          Returns the label of the activity for the given Locale.
abstract  fuego.collections.maps.LocaleStringMap getLabels()
          Return all labels
abstract  Process getProcess()
          Returns the parent process for this activity
abstract  String getProcessId()
          Returns parent process Id for this activity
static String getProcessId(String activityId)
          Returns the process Id for the given activity id
abstract  String getRole()
          Returns the associated role for this activity
abstract  Activity[] getSourceActivitiesForGrab()
          Returns the activities where this activity can grab from.
abstract  Task getTask(int taskNumber)
          Returns the named task defined for this activity
abstract  Task getTask(String taskId)
          Returns the named task defined for this activity
abstract  Task[] getTasks()
          Returns all the tasks defined for this activity
abstract  Object getVar(String variableId, Locale locale)
          Returns the value of any variable by id.
abstract  VarDefinition[] getVars()
          Returns all the variable definitions for this activity.
abstract  boolean hasInstanceAccess()
          Returns whether or not global activity has instance access
abstract  boolean hasLocalDocumentation()
          Returns if this activity contains documentation stored in the folder name
abstract  boolean hasOutgoingTransitions()
          Return if this activity has unconditional or conditional transitions to another activity.
abstract  boolean hasTransitionsToInteractiveActivities()
          Return if this activity has any transition to an interactive activity
abstract  boolean isAbortEnabled()
          Returns whether or not instances in this activity can be aborted
abstract  boolean isActive()
          Returns whether or not this activity belongs to an active process
Note: In the case of consolidated processes, it will return true if one of the process versions the activity belongs to is active
abstract  boolean isAutoCompleteEnabled()
          Returns whether or not this activity will automatically be completed after all mandatory items are successfully processed.
abstract  boolean isInstancePresentation()
          Return whether o not global activity is used to show the instance details
abstract  boolean isOnline()
          Returns whether or not the process this activity belongs to is online
Note: In the case of consolidated processes it will return true if any of the process versions this activity belongs to is online
abstract  boolean isReassignEnabled()
          Returns the status of the activity option "Reasign"
abstract  boolean isResaignEnabled()
          Deprecated. use isReassignEnabled() intead
abstract  boolean isSelectEnabled()
          Returns true if the instances in this activity can be selected.
abstract  boolean isSuspendEnabled()
          Returns whether or not instances in this activity can be aborted
abstract  boolean isUserSelectsTransitionEnabled()
          Returns whether or not the user (participant) can select the transition to route the instance.
static String makeId(String processId, String activityName)
          Builds the activity id from the processId and the activityName.
activityId = "processId/activityName".
abstract  void setDocumentation(Locale locale, String html)
           
abstract  void setDocumentationMap(fuego.collections.maps.LocaleStringMap documentationMap)
           
 
Methods inherited from class fuego.processmodel.Activity
getName, getType, hasType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fuego.papi.MDObject
getName
 

Constructor Detail

Activity

public Activity()
Method Detail

isAbortEnabled

public abstract boolean isAbortEnabled()
Returns whether or not instances in this activity can be aborted

Returns:
true if instances in this activity can be aborted

isActive

public abstract boolean isActive()
Returns whether or not this activity belongs to an active process
Note: In the case of consolidated processes, it will return true if one of the process versions the activity belongs to is active

Returns:
true if this process is currently online

isAutoCompleteEnabled

public abstract boolean isAutoCompleteEnabled()
Returns whether or not this activity will automatically be completed after all mandatory items are successfully processed.

Returns:
true if this activity has the auto-complete feature

getDocumentation

@Deprecated
public abstract String getDocumentation(Locale locale)
Deprecated. use ProcessServiceSession.getActivityDocumentation(String, java.util.Locale)

Returns the path of the activity localized documentation HTML.
If the localized activity documentation is not available or was not loaded yet, null is returned. This method do not load the activity documentation, it just returns what was previously loaded by ProcessServiceSession.getActivityDocumentation(String, java.util.Locale).

Specified by:
getDocumentation in interface MDObject
Parameters:
locale - the desired locale
Returns:
this activity localized documentation path
See Also:
ProcessServiceSession.getActivityDocumentation(java.lang.String, java.util.Locale)

getFolderName

public abstract String getFolderName()
Returns the name of the activity folder into the working folder.

Specified by:
getFolderName in interface MDObject
Returns:
The folder name

getId

public abstract String getId()
Returns the activity Id. activityId = "ProcessId/ActivityName".

Specified by:
getId in interface MDObject
Returns:
activity id
See Also:
makeId(String,String)

getIn

public abstract int getIn()
Returns the activity identification number

Returns:
The int witch is the identification number.

isInstancePresentation

public abstract boolean isInstancePresentation()
Return whether o not global activity is used to show the instance details

Returns:
true if activity shows the instance details.

isOnline

public abstract boolean isOnline()
Returns whether or not the process this activity belongs to is online
Note: In the case of consolidated processes it will return true if any of the process versions this activity belongs to is online

Returns:
true if this process is currently online

getProcess

public abstract Process getProcess()
Returns the parent process for this activity

Returns:
the parent Process

getProcessId

public abstract String getProcessId()
Returns parent process Id for this activity

Returns:
A String witch is the Process Id.

isResaignEnabled

@Deprecated
public abstract boolean isResaignEnabled()
Deprecated. use isReassignEnabled() intead

Returns the status of the activity option "Reasign"

Returns:
True if the reasign option is enable.

isReassignEnabled

public abstract boolean isReassignEnabled()
Returns the status of the activity option "Reasign"

Returns:
True if the reasign option is enable.

hasInstanceAccess

public abstract boolean hasInstanceAccess()
Returns whether or not global activity has instance access

Returns:
true if activity has instance access

getActivityName

public abstract String getActivityName()
Returns the activity name.

Returns:
A String with the activity name.

getDescription

public abstract String getDescription(Locale locale)
Returns the localized description for the given Locale. The description is the text that the designer added during the designer face.

Specified by:
getDescription in interface MDObject
Specified by:
getDescription in class Activity
Parameters:
locale - Locale to obtain the description in that lenguage.
Returns:
The description of the activity in the specifice locale.
See Also:
Locale

getLabel

public abstract String getLabel(Locale locale)
Returns the label of the activity for the given Locale. The label is the name of the instance for the end user.

Specified by:
getLabel in interface MDObject
Parameters:
locale - Locale to obtain the label in that lenguage.
Returns:
The label of the activity in the specifice locale.
See Also:
Locale

getLabels

public abstract fuego.collections.maps.LocaleStringMap getLabels()
Return all labels

Returns:
Map with the language suffix as the key and label as the value.
See Also:
Map, Locale.getLanguage()

getRole

public abstract String getRole()
Returns the associated role for this activity

Returns:
the associated Role for this activity

isSelectEnabled

public abstract boolean isSelectEnabled()
Returns true if the instances in this activity can be selected.

Returns:
true if can be done

getSourceActivitiesForGrab

public abstract Activity[] getSourceActivitiesForGrab()
Returns the activities where this activity can grab from.

Returns:
An array of Activity with all activities where this activity can grab from.
See Also:
Activity

isSuspendEnabled

public abstract boolean isSuspendEnabled()
Returns whether or not instances in this activity can be aborted

Returns:
true if instances in this activity can be aborted

getTask

public abstract Task getTask(int taskNumber)
Returns the named task defined for this activity

Parameters:
taskNumber - task number
Returns:
a task for the task number passed
See Also:
Task

getTask

public abstract Task getTask(String taskId)
Returns the named task defined for this activity

Parameters:
taskId - task id
Returns:
a task for the task id passed
See Also:
Task

getTasks

public abstract Task[] getTasks()
Returns all the tasks defined for this activity

Returns:
array of all the tasks for this activity
See Also:
Task

isUserSelectsTransitionEnabled

public abstract boolean isUserSelectsTransitionEnabled()
Returns whether or not the user (participant) can select the transition to route the instance.

Returns:
true if user can choose where to route the instance

hasLocalDocumentation

public abstract boolean hasLocalDocumentation()
Returns if this activity contains documentation stored in the folder name

Specified by:
hasLocalDocumentation in interface MDObject
Returns:
True if this activity contains documentation stored.

hasOutgoingTransitions

public abstract boolean hasOutgoingTransitions()
Return if this activity has unconditional or conditional transitions to another activity.

Returns:
True if has unconditionar or conditional transition to another activity.

hasTransitionsToInteractiveActivities

public abstract boolean hasTransitionsToInteractiveActivities()
Return if this activity has any transition to an interactive activity

Returns:
True if has any transition to an interactive activity.

setDocumentation

public abstract void setDocumentation(Locale locale,
                                      String html)
Specified by:
setDocumentation in interface MDObject

setDocumentationMap

public abstract void setDocumentationMap(fuego.collections.maps.LocaleStringMap documentationMap)

getDocumentationMap

public abstract fuego.collections.maps.LocaleStringMap getDocumentationMap()

getVar

public abstract Object getVar(String variableId,
                              Locale locale)
                       throws InvalidVariableIdException
Returns the value of any variable by id. Remember that the type of the variable is specified in the VarDefinition object, which can be obtained from the Activity.

Parameters:
variableId - The id of the variable whose value is required
locale - The locale for the variable returned.
Returns:
Object The value of the variable identificated by the id argument
Throws:
InvalidVariableIdException - if is an invalid variable id

getVars

public abstract VarDefinition[] getVars()
Returns all the variable definitions for this activity. Through the VarDefinition object can be obtained all the following information: - The id of the variable - The mask of the variable - The size of the variable - The label of the variable for a given Locale

Returns:
The array with the activity definitions of all the variables from this activity

canBeGrabbedBy

public abstract boolean canBeGrabbedBy(Activity grabActivity)
Returns true if this activity can be grabbed by the given grab activity, otherwise false.

Parameters:
grabActivity - The grab activity.
Returns:
if an instance in this activity can be grabbed by the specified activity.

canBeSeenByParticipant

public abstract boolean canBeSeenByParticipant(Participant participant)
Returns true if the given participant can see this activity.

Parameters:
participant - The participant with its roles
Returns:
boolean True if the given participant can see this activity

canBeSeenByRole

public abstract boolean canBeSeenByRole(String role)
Return if this activity can be seen by the role.

Parameters:
role - A String with the role id to check.
Returns:
True if the activity can be seen by the role and False if not.

canGrab

public abstract boolean canGrab(String sourceActivity)
Returns true if this activity can grab from the given one, otherwise false.

Parameters:
sourceActivity - The source activity name where to grab from.
Returns:
True if the activity can grab from the source activity.

containsDocumentation

public abstract boolean containsDocumentation(Locale locale)
Returns if this activity contains documentation for an specific locale.

Specified by:
containsDocumentation in interface MDObject
Parameters:
locale - specific java.util.Locale to verify if this activity contains documentation for that language.
Returns:
True if this activity conatins documentation for that java.util.Locale

getProcessId

public static String getProcessId(String activityId)
Returns the process Id for the given activity id

Parameters:
activityId - The activity Id to obtain the process Id.
Returns:
The parent process Id of the activity Id.

getActivityName

public static String getActivityName(String activityId)
Returns the activity name for the given activity id.

Parameters:
activityId - The activity Id to obtain the process Id.
Returns:
Activity The activity name of the activity Id.

makeId

public static String makeId(String processId,
                            String activityName)
Builds the activity id from the processId and the activityName.
activityId = "processId/activityName".

Parameters:
processId - The process Id of the parent process of the activity.
activityName - The activity name.
Returns:
ActivityId The Activity Id.
See Also:
getId()

ALBPM Process API

© Copyright 1996/2005 Fuego Inc. All Rights Reserved