ALBPM Process API (PAPI)

fuego.papi
Class Activity

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

public abstract class Activity
extends Activity
implements MDObject

Activity in a Process. An activity can be a global automatic activity, a global activity, an interactive activity, or an automatic activity. The methods in this class largely correspond to properties in Studio:

  • Activity ID: getActivityName()
  • Name: getLabel(java.util.Locale)
  • Description: getDescription(java.util.Locale)
  • Suspendable: isSuspendEnabled()
  • User selects transition: isUserSelectsTransitionEnabled()
  • Auto-complete: isAutoCompleteEnabled()
  • Abortable: isAbortEnabled()
  • Assignable: isResaignEnabled()
  • Main Task: getTask(int), where int is 0 for the main task
  • Optional Tasks: getTasks(), where 0 is the mandatory task and any other tasks are optional by default.
  • The valid activity type values are:


    Field Summary
     
    Fields inherited from class fuego.processmodel.Activity
    AUTOMATIC, BEGIN, COMPENSATE, CONDITIONAL, CREATION, 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 if this activity can be grabbed by the specified activity.
    If grabActivity is a defined grab, it must have an incoming transition from this activity.
    abstract  boolean canBeSeenByParticipant(Participant participant)
              Returns if the specified Participants can see this activity.
    abstract  boolean canBeSeenByRole(String role)
              Returns if this activity can be seen by the specified role.
    abstract  boolean canGrab(String sourceActivity)
              Returns if this activity can grab from the activity specified by the given Id.
    abstract  boolean containsDocumentation(Locale locale)
              Returns if this activity contains documentation in the specified locale.
    abstract  String getActivityName()
              Gets the activity name.
    static String getActivityName(String activityId)
              Gets the activity name from the activity id.
    abstract  String getDescription(Locale locale)
              Gets the localized activity description.
    abstract  String getDocumentation(Locale locale)
              Deprecated. use ProcessServiceNESession.getActivityDocumentation(String, java.util.Locale) instead.
    abstract  Map getDocumentationMap()
              Gets the documentation map.
    abstract  String getFolderName()
              Gets the name of the activity folder in the documentation folder.
    abstract  String getId()
              Gets the activity Id.
    The activity Id is in the format "ProcessId/ActivityName"
    abstract  int getIn()
              Gets the activity identification number.
    The activity identification number is the name generated for this activity during the deployment face.
    abstract  String getLabel(Locale locale)
              Gets the localized activity label.
    The activity label is listed as Name in Studio.
    abstract  Map getLabels()
              Deprecated. use getLabel(Locale) instead.
    abstract  Process getProcess()
              Gets the parent process for this activity.
    abstract  String getProcessId()
              Gets the parent process Id for this activity.
    static String getProcessId(String activityId)
              Gets the parent process Id for the specified activity Id.
    abstract  String getRole()
              Gets the role associated with this activity or null if the activity does not have role associated.
    The associated role is the 'swimlane' where this activity was placed in Studio.
    abstract  Activity[] getSourceActivitiesForGrab()
              Gets the activities that this grab activity can grab from.
    If this is not a grab activity, returns a 0-length array.
    abstract  Task getTask(int taskNumber)
              Gets the Task associated with this index.
    abstract  Task getTask(String taskId)
              Gets the Task associated with this taskId.
    abstract  Task[] getTasks()
              Gets all Tasks associated with this activity.
    abstract  Object getVar(String variableId, Locale locale)
              Gets the value of a VarDefinition associated with this Activity, given the VarDefinition id and locale.
    abstract  VarDefinition[] getVars()
              Gets all the VarDefinitions associated with this activity.
    The VarDefinitions for an Activity include VarDefinition.PROCESS_ID, VarDefinition.DESCRIPTION_ID and VarDefinition.TASK_ID.
    abstract  boolean hasInstanceAccess()
              Returns if this activity is a global activity and if this global activity has instance access.
    hasInstanceAccess corresponds to "Has Instance Access" in Studio.
    abstract  boolean hasLocalDocumentation()
              Returns if this activity contains documentation in the documentation folder.
    abstract  boolean hasOutgoingTransitions()
              Returns if this activity has unconditional or conditional transitions to another activity.
    abstract  boolean hasTransitionsToInteractiveActivities()
              Returns if this activity has a transition to an interactive activity.
    abstract  boolean isAbortEnabled()
              Returns if instances in this activity can be aborted.
    abstract  boolean isActive()
              Returns if this activity belongs to an active process.
    abstract  boolean isAutoCompleteEnabled()
              Returns if this activity will automatically be completed after all mandatory tasks are successfully processed.
    abstract  boolean isInstancePresentation()
              Returns if this activity is a global activity, and if this global activity can be used to customize rendered instance information.
    abstract  boolean isOnline()
              Returns if the parent process is online.
    abstract  boolean isReassignEnabled()
              Returns if instances of this activity can be assigned.
    An instance can be assigned in this activity if this activity has been defined as Assignable in Studio
    To determine if a participant has the rights to assign an instance in this activity, use ProcessServiceSession.instanceCanBeReassign(InstanceInfo).
    abstract  boolean isResaignEnabled()
              Deprecated. This method name was spelled incorrectly; the intent was is isReassignEnabled(). To ensure backward comparability, the spelling has not been corrected. Use isReassignEnabled() instead.
    abstract  boolean isSelectEnabled()
              Returns if instances in this activity can be selected.
    An instance can be selected in this activity if this activity has been defined as Selectable in Studio
    To determine if a participant has the rights to select an instance in this activity, use ProcessServiceSession.instanceCanBeSelected(InstanceInfo).
    abstract  boolean isSuspendEnabled()
              Returns if instances in this activity can be suspended.
    This corresponds to the Suspendable property in Studio.
    To determine if a participant has the rights to suspend an instance in this activity, use ProcessServiceSession.instanceCanBeSuspended(InstanceInfo).
    abstract  boolean isUserSelectsTransitionEnabled()
              Returns if the user (participant) can select the transition to route the instance.
    Corresponds to the activity property "User selects transition" in Studio.
    static String makeId(String processId, String activityName)
              Builds the activityId from the processId and the activityName.
    activityId = "processId/activityName".
    abstract  void setDocumentation(Locale locale, String html)
              Sets the activity documentation for the specified locale.
    abstract  void setDocumentationMap(Map documentationMap)
              Sets a map of activity documentation.
     
    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 if instances in this activity can be aborted.

    An instance can be aborted in this activity if this activity has been defined as Abortable in Studio
    To determine if a participant has the rights to abort an instance in this activity, use ProcessServiceSession.instanceCanBeAborted(InstanceInfo).

    Returns:
    true if instances in this activity can be aborted.

    isActive

    public abstract boolean isActive()
    Returns if this activity belongs to an active process.

    Returns:
    true if this activity belongs to an active process.
    See Also:
    Process.isActive()

    isAutoCompleteEnabled

    public abstract boolean isAutoCompleteEnabled()
    Returns if this activity will automatically be completed after all mandatory tasks are successfully processed.

    Activities which are not auto-complete enabled require an additional send step after all mandatory tasks are successfully processed.
    Note that auto-completed is enabled for activities by default and only one task in an activity should be mandatory.

    Returns:
    true if this activity will automatically be completed.

    getDocumentation

    public abstract String getDocumentation(Locale locale)
    Deprecated. use ProcessServiceNESession.getActivityDocumentation(String, java.util.Locale) instead.

    Gets the path of the localized activity HTML documentation.

    Specified by:
    getDocumentation in interface MDObject
    Parameters:
    locale - for localized documentation.
    Returns:
    Path of the localized activity HTML documentation.

    getFolderName

    public abstract String getFolderName()
    Gets the name of the activity folder in the documentation folder.

    Specified by:
    getFolderName in interface MDObject
    Returns:
    Name of the activity folder in the documentation folder.
    See Also:
    ProcessService.getUserDocumentationFolder()

    getId

    public abstract String getId()
    Gets the activity Id.
    The activity Id is in the format "ProcessId/ActivityName"

    Specified by:
    getId in interface MDObject
    Returns:
    Activity Id.

    getIn

    public abstract int getIn()
    Gets the activity identification number.
    The activity identification number is the name generated for this activity during the deployment face.

    Returns:
    Activity identification number.

    isInstancePresentation

    public abstract boolean isInstancePresentation()
    Returns if this activity is a global activity, and if this global activity can be used to customize rendered instance information.

    Corresponds to the Global Activity property "Activity to use for instance presentation" in Studio.

    Returns:
    true if this activity is a global activity, and if this global activity can be used to customize rendered instance information
    See Also:
    Activity.getType()

    isOnline

    public abstract boolean isOnline()
    Returns if the parent process is online.

    Returns:
    true if this activity is online.
    See Also:
    Process.isOnline()

    getProcess

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

    Returns:
    Parent Process for this activity.

    getProcessId

    public abstract String getProcessId()
    Gets the parent process Id for this activity.

    Returns:
    Parent process Id for this activity.

    isResaignEnabled

    public abstract boolean isResaignEnabled()
    Deprecated. This method name was spelled incorrectly; the intent was is isReassignEnabled(). To ensure backward comparability, the spelling has not been corrected. Use isReassignEnabled() instead.

    Returns if instances of this activity can be assigned.
    An instance can be assigned in this activity if this activity has been defined as Assignable in Studio
    To determine if a participant has the rights to assign an instance in this activity, use ProcessServiceSession.instanceCanBeReassign(InstanceInfo).

    Returns:
    true if instances of this activity can be assigned.

    isReassignEnabled

    public abstract boolean isReassignEnabled()
    Returns if instances of this activity can be assigned.
    An instance can be assigned in this activity if this activity has been defined as Assignable in Studio
    To determine if a participant has the rights to assign an instance in this activity, use ProcessServiceSession.instanceCanBeReassign(InstanceInfo).

    Returns:
    true if instances of this activity can be assigned.

    hasInstanceAccess

    public abstract boolean hasInstanceAccess()
    Returns if this activity is a global activity and if this global activity has instance access.
    hasInstanceAccess corresponds to "Has Instance Access" in Studio.

    Returns:
    true if this activity is a global activity and if this global activity has instance access.

    getActivityName

    public abstract String getActivityName()
    Gets the activity name. Note that the activity name is listed as the Activity ID in Studio, and not the name. The value listed under name in Studio is the label.

    Returns:
    activity name.
    See Also:
    getLabel(java.util.Locale)

    getDescription

    public abstract String getDescription(Locale locale)
    Gets the localized activity description.

    Specified by:
    getDescription in interface MDObject
    Specified by:
    getDescription in class Activity
    Parameters:
    locale - requested locale. Cannot be null.
    Returns:
    Localized activity description.

    getLabel

    public abstract String getLabel(Locale locale)
    Gets the localized activity label.
    The activity label is listed as Name in Studio.

    Specified by:
    getLabel in interface MDObject
    Parameters:
    locale - requested locale. Cannot be null.
    Returns:
    Localized activity label.

    getLabels

    public abstract Map getLabels()
    Deprecated. use getLabel(Locale) instead.

    Gets a map of all labels, where the keys are String (language suffix) and the values are Strings (labels).

    Returns:
    Map of all labels.

    getRole

    public abstract String getRole()
    Gets the role associated with this activity or null if the activity does not have role associated.
    The associated role is the 'swimlane' where this activity was placed in Studio.

    Returns:
    Role associated with this activity.

    isSelectEnabled

    public abstract boolean isSelectEnabled()
    Returns if instances in this activity can be selected.
    An instance can be selected in this activity if this activity has been defined as Selectable in Studio
    To determine if a participant has the rights to select an instance in this activity, use ProcessServiceSession.instanceCanBeSelected(InstanceInfo).

    Returns:
    true if instances in this activity can be selected.

    getSourceActivitiesForGrab

    public abstract Activity[] getSourceActivitiesForGrab()
    Gets the activities that this grab activity can grab from.
    If this is not a grab activity, returns a 0-length array. In addition, if this grab activity is a defined grab, this grab activity must have an incoming transition from the activity specified by sourceActivity; if this grab activity is "from all" or "from all to all", this grab activity can grab from all activities in the main flow.

    Returns:
    Activities that this grab activity can grab from.

    isSuspendEnabled

    public abstract boolean isSuspendEnabled()
    Returns if instances in this activity can be suspended.
    This corresponds to the Suspendable property in Studio.
    To determine if a participant has the rights to suspend an instance in this activity, use ProcessServiceSession.instanceCanBeSuspended(InstanceInfo).

    Returns:
    true if instances in this activity can be suspended.

    getTask

    public abstract Task getTask(int taskNumber)
    Gets the Task associated with this index.

    Parameters:
    taskNumber - 0-based index of the task.
    Returns:
    Task associated with this index.
    Throws:
    InvalidTaskNumberException - if it is an invalid task number.

    getTask

    public abstract Task getTask(String taskId)
    Gets the Task associated with this taskId.

    Parameters:
    taskId - task Id
    Returns:
    Task associated with this taskId or null if there is no task associated with this taskId.

    getTasks

    public abstract Task[] getTasks()
    Gets all Tasks associated with this activity.

    Returns:
    All tasks associated with this activity, or zero-length array if there are no tasks associated with this activity.

    isUserSelectsTransitionEnabled

    public abstract boolean isUserSelectsTransitionEnabled()
    Returns if the user (participant) can select the transition to route the instance.
    Corresponds to the activity property "User selects transition" in Studio.

    Returns:
    true if the user (participant) can select the transition to route the instance.

    hasLocalDocumentation

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

    Specified by:
    hasLocalDocumentation in interface MDObject
    Returns:
    true if this activity contains documentation in the documentation folder.
    See Also:
    getFolderName()

    hasOutgoingTransitions

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

    Returns:
    true if this activity has unconditional or conditional transitions to another activity.

    hasTransitionsToInteractiveActivities

    public abstract boolean hasTransitionsToInteractiveActivities()
    Returns if this activity has a transition to an interactive activity.

    Returns:
    true if this activity has a trandition to an interactive activity.

    setDocumentation

    public abstract void setDocumentation(Locale locale,
                                          String html)
    Sets the activity documentation for the specified locale.

    Specified by:
    setDocumentation in interface MDObject
    Parameters:
    locale - locale for this documentation. Cannot be null.
    html - html documentation Cannot be null.

    setDocumentationMap

    public abstract void setDocumentationMap(Map documentationMap)
    Sets a map of activity documentation. Keys are Strings (locale suffixes) and values are Strings (html documentation).

    Parameters:
    documentationMap - map of String locale suffixes and documentation. Cannot be null.

    getDocumentationMap

    public abstract Map getDocumentationMap()
    Gets the documentation map. Keys are Strings (locale suffixes) and values are Strings (html documentation).

    Returns:
    Documentation map

    getVar

    public abstract Object getVar(String variableId,
                                  Locale locale)
                           throws InvalidVariableIdException
    Gets the value of a VarDefinition associated with this Activity, given the VarDefinition id and locale.

    Parameters:
    variableId - VarDefinition Id. Cannot be null.
    locale - locale for this VarDefinition value. Cannot be null.
    Returns:
    Value of the specified VarDefinition associated with this Activity and locale.
    Throws:
    InvalidVariableIdException

    getVars

    public abstract VarDefinition[] getVars()
    Gets all the VarDefinitions associated with this activity.
    The VarDefinitions for an Activity include VarDefinition.PROCESS_ID, VarDefinition.DESCRIPTION_ID and VarDefinition.TASK_ID.

    Returns:
    All the VarDefinitions associated with this activity.

    canBeGrabbedBy

    public abstract boolean canBeGrabbedBy(Activity grabActivity)
    Returns if this activity can be grabbed by the specified activity.
    If grabActivity is a defined grab, it must have an incoming transition from this activity.

    Parameters:
    grabActivity - activity to test if it can grab the current activity.
    Returns:
    true if this activity can be grabbed by the specified activity.

    canBeSeenByParticipant

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

    Parameters:
    participant - participant to test if they can see this activity.
    Returns:
    true if the specified participant can see this activity.

    canBeSeenByRole

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

    Parameters:
    role - name of the role to test. Cannot be null.
    Returns:
    true if this activity can be seen by the specified role.

    canGrab

    public abstract boolean canGrab(String sourceActivity)
    Returns if this activity can grab from the activity specified by the given Id.

    For this to return true, this activity must be a grab activity. In addition, if this grab activity is a defined grab, this grab activity must have an incoming transition from the activity specified by sourceActivityId.

    Parameters:
    sourceActivity - Id of the source activity. Cannot be null.
    Returns:
    true if this activity can grab from the activity specified by the given Id.

    containsDocumentation

    public abstract boolean containsDocumentation(Locale locale)
    Returns if this activity contains documentation in the specified locale.

    Specified by:
    containsDocumentation in interface MDObject
    Parameters:
    locale - locale to test. Cannot be null.
    Returns:
    true if this activity contains documentation in the specified locale.

    getProcessId

    public static String getProcessId(String activityId)
    Gets the parent process Id for the specified activity Id.

    Parameters:
    activityId - activity Id. Cannot be null.
    Returns:
    parent process Id for the specified activity Id.

    getActivityName

    public static String getActivityName(String activityId)
    Gets the activity name from the activity id.

    Parameters:
    activityId - activity id. Cannot be null.
    Returns:
    activity name.

    makeId

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

    Parameters:
    processId - process id
    activityName - activity name.
    Returns:
    Activity Id.
    See Also:
    getId()

    ALBPM Process API (PAPI)

    © Copyright 1996/2005 Fuego Inc. All Rights Reserved