Class TaskList

java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.TaskList
All Implemented Interfaces:
Iterable<Task>

public class TaskList extends XMLRequest implements Iterable<Task>
Returns a list of a tasks based on a filter.
Since:
V12
  • Constructor Details

    • TaskList

      public TaskList(TaskFilter taskFilter, String... selectedFields)
      Creates a new TaskList request.
      Parameters:
      taskFilter - the task filter
      selectedFields - Fields which should be returned. If no field is selected all fields are returned.

      Possible values are:

      NameDescription
      OBJECT_NAMEName of the object.
      ALIAS_NAMEName of the object or alias
      OBJECT_TYPEObject type
      AGENT_NAMEName of the Agent
      PARENT_PROCESSOR_RUNIDRunID of the parent processor
      STATUS_WITHIN_PARENTStatus within a workflow
      CONTAINER_TYPEType of the container, used for icon
      STARTED_BY_AEIs a JOBD monitored or started by the AE. Used for the icon only
      COMMENT_FLAGIs this execution commented?
      END_TIMEEnd time of the task.
      ACTIVATION_TIMEActivation time of the task.
      START_TIMEStart time of the task.
      USER_IDUser who started this task.
      PLATFORMPlatform
      TREE_PARENTRunID of the parent in the tree view
      PERIOD_DESCRIPTIONDescription of PERIOD objects.
      REMOTE_STATUS_IDTranslation ID of the remote status.
      REMOTE_STATUS_INSERTRemote status insert.
      CPU_TIMECPU time.
      RESOURCEResource count
      QUEUEName of the Queue.
      PROCESS_IDProcess ID
      START_TYPEStart type
      STATUSStatus of the task
      RUNIDRunID of the task.
      PRIORITYPriority
      LOGINLogin object
      ROLLBACK_FLAGFlag if rollback is enabled
      ARCHIVE_KEY1Archive key 1
      ARCHIVE_KEY2Archive Key 2
      ZDU_VERSIONZDU Version
      PROCESSOR_TASKFlag which indicates if this task is parent processor or not
      RETURN_CODEUser return code of the task
      INT_ACCOUNTAccount
      VERSIONVersion of the object
  • Method Details

    • setCauVersion

      public void setCauVersion(String cauVersion)
      Sets the filter for the Version of the Agent.
      Parameters:
      cauVersion - Agent Version, use null to clear the filter
    • setZduVersion

      public void setZduVersion(String zduVersion)
      Sets the ZDU version filter.
      Parameters:
      zduVersion - "B" (Base) or "T" (Target) or null to clear the filter
    • includeHistoricalData

      public void includeHistoricalData()
      Call this method before sending the request to include statistics data in addition to the tasks in the activity list.
    • setMaxRows

      public void setMaxRows(int maxRows)
      Used to limit the number of returned tasks. Tasks are sorted by their activation time in descending order. The value is ignored if it is larger than GENERIC_ACTIVITIES_LIMIT in UC_SYSTEM_SETTINGS.
      Parameters:
      maxRows - Maximum number of rows, value between 1 and GENERIC_ACTIVITIES_LIMIT
      Throws:
      IllegalArgumentException - if the value is negative or zero or larger than the allowed maximum GENERIC_ACTIVITIES_LIMIT: 20000
    • setSourceDestHost

      public void setSourceDestHost(String sourceDestHost)
      Sets the filter for the source host. The wildcard character * matches all source or destination.
      Parameters:
      sourceDestHost - source host
    • getSourceDestHost

      public String getSourceDestHost()
      Returns the source host. The wildcard character * matches all hosts.
      Returns:
      source host selection
    • setAlias

      public void setAlias(String alias)
      Sets the filter for the alias. The wildcard character * matches all source hosts.
      Parameters:
      alias - new alias
    • getAlias

      public String getAlias()
      Returns the alias. The wildcard character * matches all alias.
      Returns:
      alias selection
    • setCommentFlag

      public void setCommentFlag(boolean commentFlag)
      Sets comment flag.
      Parameters:
      commentFlag - new commented flag
    • getCommentFlag

      public boolean getCommentFlag()
      Returns commented flag.
      Returns:
      commentFlag
    • setModifyFlag

      public void setModifyFlag(boolean modifyFlag)
      Sets modify flag.
      Parameters:
      modifyFlag - new modify flag
    • setGroupingType

      public void setGroupingType(ActivityList.GroupingType groupingType)
      Sets the grouping type for the activity window.
      Parameters:
      groupingType - GroupingType
    • setSyncObjectNames

      public void setSyncObjectNames(Set<String> syncObjectNames)
      Sets the filter for SYNC objects. Wildcards can be used.
      Parameters:
      syncObjectNames - Set of Sync object names, use null to clear the filter.
    • getModifyFlag

      public boolean getModifyFlag()
      Returns modify flag.
      Returns:
      modifyFlag
    • setRunID

      public void setRunID(int runID)
      Sets runID.
      Parameters:
      runID - new runID
    • setRunIDs

      public void setRunIDs(List<Integer> runIDs)
      Sets List of runIDs.
      Parameters:
      runIDs - List of RunIDs or null
    • getRunID

      public int getRunID()
      Returns runID.
      Returns:
      runID
    • getRunIDs

      public List<Integer> getRunIDs()
      Returns the filter for multiple RunIDs or null if there is no filter.
      Returns:
      RunID filter or null
    • setMsgInsert

      public void setMsgInsert(String msgInsert)
      Sets remote status insert.
      Parameters:
      msgInsert - new remote status insert
    • getMsgInsert

      public String getMsgInsert()
      Returns remote status insert.
      Returns:
      msgInsert
    • setMsgNumber

      public void setMsgNumber(int msgNumber)
      Sets remote status number.
      Parameters:
      msgNumber - new remote status number
    • getMsgNumber

      public int getMsgNumber()
      Returns remote status number.
      Returns:
      msgNumber
    • setExcludeHost

      public void setExcludeHost(boolean excludeHost)
      Sets the exclude host.
      Parameters:
      excludeHost - the new exclude host
    • isExcludeHost

      public boolean isExcludeHost()
      Checks if is exclude host.
      Returns:
      true, if is exclude host
    • setHost

      public void setHost(String host)
      Sets the host.
      Parameters:
      host - the new host
    • getHost

      public String getHost()
      Gets the host.
      Returns:
      the host
    • setRemoteContextName

      public void setRemoteContextName(String remoteContextName)
      Sets the filter for the remote context name.
      Parameters:
      remoteContextName - new remote context name
    • setRemoteContextValue

      public void setRemoteContextValue(String remoteContextValue)
      Sets the filter for the remote context value.
      Parameters:
      remoteContextValue - new remote context value
    • setDateSelectionRange

      public void setDateSelectionRange(TaskList.DateRange type, DateTime from, DateTime to)
      Sets a time interval. You can call this method with DateRange.NONE in order to clear a previous selection.
      Parameters:
      type - Selection type
      from - Start of the time interval
      to - End of the time interval
    • setDateSelectionLast

      public void setDateSelectionLast(TaskList.DateRange type, int amount, TaskFilter.TimeUnit unit)
      Sets a time range filter for the last minutes, hours or days. You can call this method with DateRange.NONE in order to clear a previous selection.
      Parameters:
      type - Selection type
      amount - Number of minutes, hours or days
      unit - Time unit
    • createRequest

      protected void createRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo)
      Description copied from class: XMLRequest
      Creates the XML Document for the request. This method is used internally.
      Specified by:
      createRequest in class XMLRequest
      Parameters:
      doc - Document, used to create new Elements
      request - Request Element - classes append information to this request element
      sessionInfo - Information about the session
    • setClient

      public void setClient(int client)
      Sets a specific client as filter for the TaskList. This method is only used for client 0. For all clients other 0 it has no effect.
      Parameters:
      client - filter for the TaskList
    • handleContent

      protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
      Description copied from class: XMLRequest
      Sub classes extract the values from the XML document and provide public getter methods.
      Overrides:
      handleContent in class XMLRequest
      Parameters:
      doc - XML Document
      session - Info about the user session
    • iterator

      public Iterator<Task> iterator()
      Returns an iterator over the Task elements in this activity list.
      Specified by:
      iterator in interface Iterable<Task>
      Returns:
      an Iterator, never null
    • size

      public int size()
      Returns the number of tasks. If the request is not sent this method returns 0.
      Returns:
      Integer containing the number of activities
    • isLimitReached

      public boolean isLimitReached()
      Returns:
      true if max row limit was reached i.e. there are more results available than containing in this activity list
    • isAllowedInClientZero

      protected boolean isAllowedInClientZero()
      Description copied from class: XMLRequest
      This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
      Overrides:
      isAllowedInClientZero in class XMLRequest
      Returns:
      true if this request is allowed in client 0, false otherwise
    • isTreeMode

      public boolean isTreeMode()
      Returns:
      treeMode
    • setTreeMode

      public void setTreeMode(boolean treeMode)
      Parameters:
      treeMode - to set hierarchical view mode
    • setExpandedRunIds

      public void setExpandedRunIds(List<Integer> runIds)
      Sets the RundIds of Tasks that should be expanded. Only used if TaskList is used in tree modus.
      Parameters:
      runIds - RundIds of the tasks, that should be expanded.
    • getExpandedRunIds

      public List<Integer> getExpandedRunIds()
      Gets the expanded RunIds. Only used if TaskList is used in tree modus.
      Returns:
      runIds RundIds of the expanded tasks
    • getSrc

      protected String getSrc()
      Description copied from class: XMLRequest
      Returns the request source. This method is used internally.
      Specified by:
      getSrc in class XMLRequest
      Returns:
      Source