Package com.uc4.api

Class AbstractTask

  • All Implemented Interfaces:
    HasAlias
    Direct Known Subclasses:
    StatisticSearchItem, Task

    public abstract class AbstractTask
    extends java.lang.Object
    implements HasAlias
    This is the base class of tasks (active or archived).
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      DateTime getActivationTime()
      Returns the date and time of object activation.
      UC4Alias getAlias()
      In contrast to getName this method returns always the alias if used.
      java.lang.String getArchive1()
      Returns the first archive key of this task.
      java.lang.String getArchive2()
      Returns the second archive key of this task.
      java.lang.String getArchiveKey1()
      Returns the first archive key of the object.
      java.lang.String getArchiveKey2()
      Returns the second archive key of the object.
      java.lang.String getCauVersion()
      Returns the Version of the Agent.
      java.lang.String getClient()
      Deprecated.
      Use getTaskClient() instead
      DateTime getEndTime()
      Returns the date and time of object end.
      java.lang.String getHost()
      Returns the name of the destination Agent.
      java.lang.String getIntAccount()
      Returns the used account of the object.
      java.lang.String getName()
      Returns the name of the object or an alias if used.
      java.lang.String getObjectName()
      In contrast to the getName this method returns always the object name.
      int getParentRunID()
      Returns the RunID of the parent.
      java.lang.String getPeriodDescription()
      Returns the period description of the task.
      java.lang.String getPlatform()
      Returns the platform of the object or an empty String if a platform is not defined for the object.
      java.lang.String getQueue()
      Returns the name of the Queue or an empty String.
      java.lang.String getRemoteStatus()
      Returns the remote status of this task.
      int getReturnCode()
      Returns the return code which has ended the object.
      int getRunID()
      Running number of the execution.
      java.lang.String getRuntime()
      Returns the time used for the execution of the task.
      long getRuntimeInMillis()
      Returns the runtime string into milliseconds
      DateTime getStart()
      Deprecated.
      use getStartTime() instead
      DateTime getStartTime()
      Returns the date and time of object start.
      java.lang.String getStartType()
      Returns the method used for the start.
      java.lang.String getStateIcon()
      Returns a description of the status.
      java.lang.String getStatus()
      Returns the status of this task as String which is independent on the logon language.
      int getStatusCode()
      Returns the status of the task as integer.
      protected static java.lang.String getStatusIcon​(int status, int restart)
      Creates a status icon based on the status code.
      java.lang.String getStatusText()
      Returns a description of the status.
      int getTaskClient()
      Returns the client of the task in the Automation Engine.
      java.lang.String getType()
      Returns the type of the object.
      java.lang.String getTypeIcon()
      Returns a description of the status.
      java.lang.String getUserId()
      Returns the signature of the user.
      UC4UserName getUserName()
      Returns the name of the User object of the person who has started the task.
      int getVersion()
      Returns the value of the version column.
      boolean hasComment()
      Returns true if this statistic item has an attached comment.
      protected void initObjectNameAndAlias​(java.lang.String attrName, java.lang.String attrOriginalName)  
      boolean isMonitoredTask()
      Returns true if this task is JOBD which is monitored by the Automation Engine.
      boolean isRollback()
      Returns true if this task supports rollback.
      protected void setUserInfo​(java.lang.String user)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
      • type

        protected java.lang.String type
      • runID

        protected int runID
      • parentRunID

        protected int parentRunID
      • startTime

        protected DateTime startTime
      • statusText

        protected java.lang.String statusText
      • host

        protected java.lang.String host
      • userId

        protected java.lang.String userId
      • archiveKey1

        protected java.lang.String archiveKey1
      • archiveKey2

        protected java.lang.String archiveKey2
      • state

        protected java.lang.String state
      • stateWithinParent

        protected java.lang.String stateWithinParent
      • platform

        protected java.lang.String platform
      • queue

        protected java.lang.String queue
      • typeIcon

        protected java.lang.String typeIcon
      • startType

        protected java.lang.String startType
      • stateIcon

        protected java.lang.String stateIcon
      • rollback

        protected boolean rollback
      • remoteStatus

        protected java.lang.String remoteStatus
      • runtime

        protected java.lang.String runtime
      • periodDescription

        protected java.lang.String periodDescription
      • comment

        protected boolean comment
      • monitoredTask

        protected boolean monitoredTask
      • cauVersion

        protected java.lang.String cauVersion
      • returnCode

        protected int returnCode
      • intAccount

        protected java.lang.String intAccount
      • activationTime

        protected DateTime activationTime
      • version

        protected int version
      • statusCode

        protected int statusCode
      • objectName

        protected java.lang.String objectName
    • Method Detail

      • getVersion

        public int getVersion()
        Returns the value of the version column. The value is only returned if TaskList is used. When you use ActivityList the value will be always 0.
        Returns:
        Version
      • getCauVersion

        public java.lang.String getCauVersion()
        Returns the Version of the Agent.
        Returns:
        Agent Version, never null. An empty string is returned if there is no Version.
      • isMonitoredTask

        public boolean isMonitoredTask()
        Returns true if this task is JOBD which is monitored by the Automation Engine.
        Returns:
        true if JOBD is monitored, false if the JOBD is started from the AE.
      • getActivationTime

        public DateTime getActivationTime()
        Returns the date and time of object activation.
        Returns:
        Date and time of object activation
      • hasComment

        public boolean hasComment()
        Returns true if this statistic item has an attached comment.
        Returns:
        comment?
      • getReturnCode

        public int getReturnCode()
        Returns the return code which has ended the object.
        Returns:
        Return code which has ended the object
      • getRuntime

        public java.lang.String getRuntime()
        Returns the time used for the execution of the task.
        Returns:
        time used for the execution of the task
      • getIntAccount

        public java.lang.String getIntAccount()
        Returns the used account of the object.
        Returns:
        Account of the object
      • getStartType

        public java.lang.String getStartType()
        Returns the method used for the start.
        Returns:
        Method used for the start
      • getQueue

        public java.lang.String getQueue()
        Returns the name of the Queue or an empty String.
        Returns:
        Queue
      • getPlatform

        public java.lang.String getPlatform()
        Returns the platform of the object or an empty String if a platform is not defined for the object.
        Returns:
        Platform or an empty String
      • getRemoteStatus

        public java.lang.String getRemoteStatus()
        Returns the remote status of this task.
        Returns:
        String which describes the status of this task in remote system.
      • isRollback

        public boolean isRollback()
        Returns true if this task supports rollback.
        Returns:
        Rollback flag
      • getArchive1

        public final java.lang.String getArchive1()
        Returns the first archive key of this task.
        Returns:
        first archive key
      • getArchive2

        public final java.lang.String getArchive2()
        Returns the second archive key of this task.
        Returns:
        second archive key
      • getArchiveKey1

        public java.lang.String getArchiveKey1()
        Returns the first archive key of the object.
        Returns:
        First archive key
      • getArchiveKey2

        public java.lang.String getArchiveKey2()
        Returns the second archive key of the object.
        Returns:
        Second archive key
      • getHost

        public final java.lang.String getHost()
        Returns the name of the destination Agent.
        Returns:
        host
      • getName

        public final java.lang.String getName()
        Returns the name of the object or an alias if used. Use getObjectName and getAlias if you want exclusive information.
        Returns:
        name of object or alias.
      • getParentRunID

        public final int getParentRunID()
        Returns the RunID of the parent.
        Returns:
        RunID of the parent
      • getRunID

        public final int getRunID()
        Running number of the execution.
        Returns:
        RunID
      • getStart

        @Deprecated
        public final DateTime getStart()
        Deprecated.
        use getStartTime() instead
        Returns a calendar object which contains the Start date and time.
        Returns:
        Start date and time
      • getStartTime

        public DateTime getStartTime()
        Returns the date and time of object start.
        Returns:
        Date and time of object start.
      • getEndTime

        public DateTime getEndTime()
        Returns the date and time of object end.
        Returns:
        Date and time of object end
      • getUserId

        public final java.lang.String getUserId()
        Returns the signature of the user.
        Returns:
        Login info from the login object
      • getStatus

        public final java.lang.String getStatus()
        Returns the status of this task as String which is independent on the logon language.
        Returns:
        status, possible return values are described in the status table: getStatusCode()
      • getStatusText

        public java.lang.String getStatusText()
        Returns a description of the status. This return value depends on the logon language.
        Returns:
        description for task status. Possible return values are described in the status: getStatusCode()
      • getType

        public final java.lang.String getType()
        Returns the type of the object.
        Returns:
        type of the object.
      • getStateIcon

        public final java.lang.String getStateIcon()
        Returns a description of the status.
        Returns:
        description for task status
      • getTypeIcon

        public final java.lang.String getTypeIcon()
        Returns a description of the status.
        Returns:
        description for task status
      • getUserName

        public final UC4UserName getUserName()
        Returns the name of the User object of the person who has started the task.
        Returns:
        UC4 User
      • getClient

        @Deprecated
        public final java.lang.String getClient()
        Deprecated.
        Use getTaskClient() instead
        Returns the client of the task.
        Returns:
        UC4 client
      • getTaskClient

        public int getTaskClient()
        Returns the client of the task in the Automation Engine.
        Returns:
        Client number
      • setUserInfo

        protected void setUserInfo​(java.lang.String user)
      • getStatusCode

        public int getStatusCode()
        Returns the status of the task as integer.

        Status table

        getStatusCode()getStatus()getStatusText()
        1005state_waitingActually running
        1006state_waitingChecked
        1008state_waitingAborted
        1009state_waitingDone
        1300state_waitingPreparing
        1301state_waiting_othersWaiting for user input
        1310state_waitingoperation not initialized
        1510state_runningTransferred
        1520state_runningReady for transfer (before Connect)
        1521state_runningReady to be transferred
        1529state_runningReady for generation
        1530state_runningReady for start
        1531state_runningTo be called
        1540state_runningStart initiated
        1541state_runningChecking
        1542state_runningCalling
        1543state_waiting_othersUnknown
        1544state_inconsistentInconsistent
        1545state_runningStarted
        1546state_runningConnecting
        1547state_inconsistentInconsistent RemoteTaskManager
        1550state_runningActive
        1551state_runningTransferring
        1552state_waiting_othersCalled
        1553state_waiting_othersAccepted
        1554state_runningSampling files
        1556state_waiting_othersEscalated
        1557state_backupCustom Backup
        1558state_backupFile Backup
        1560state_jp_blockingWorkflow is blocked
        1561state_stopped_sysSTOP - Client-wide stop of automatic processing
        1562state_holdedHELD - Manual stop has been set
        1563state_stopped_manSTOP - Automatic processing has been stopped.
        1564state_stopped_queueSTOP - Queue processing has been stopped.
        1565state_runningFinished sending task
        1566state_runningSkipping - Timeout
        1567state_runningSkipping - Conditions
        1568state_runningSkipping - manually inactive
        1569state_runningSkipping Sync
        1570state_runningSkipping
        1571state_runningCanceling
        1572state_runningGenerating
        1573state_runningGenerated
        1574state_runningPost processing
        1575state_endingEnding
        1576state_runningRegenerating
        1578state_runningScanning Files
        1579state_runningScanning reports
        1580state_runningResolving variables
        1581state_runningChecking Postconditions
        1582state_runningChecking prompt values
        1583state_runningLOOPING
        1584state_runningCalculating ERT
        1590state_rollbackCustom Rollback
        1591state_rollbackFile Rollback
        1592state_rollbackAgentGroup Rollback
        1593state_rollbackWorkflow Rollback
        1599state_waitingAlive user view
        1600state_waitingInternal checking
        1655state_waiting_rollbackWaiting for rollback
        1665state_waiting_othersWaiting for externally resolved parameters
        1681state_waiting_othersWaiting for User
        1682state_waiting_othersWaiting for continuation of variable resolving
        1684state_waiting_queueWaiting for Queue slot
        1685state_waiting_hostWaiting for post processing host
        1686state_waiting_othersWaiting for start of AgentGroup container.
        1687state_waiting_othersWaiting for end of parallel host-group tasks
        1688state_waiting_hostWaiting for the host of an AgentGroup.
        1689state_waiting_resourceWaiting for resource (max. FileTransfers exceeded)
        1690state_waiting_extWaiting for external dependency
        1691state_waitingWaiting for remote system
        1692state_waitingWaiting for remote SYNC
        1693state_waiting_mrelWaiting for manual release
        1694state_waiting_resourceWaiting for resource (max. Jobs exceeded)
        1695state_waitingWaiting for restart time
        1696state_waiting_hostWaiting for host
        1697state_waiting_syncWaiting for SYNC
        1698state_waiting_timeWaiting for start time
        1699state_waitingAlive
        1700state_waitingWaiting for predecessor
        1701state_sleepingSleeping
        1702state_waitingNot yet called
        1703state_waiting_precondWaiting for Preconditions
        1704state_runningChecking Preconditions
        1705state_runningCHANGING_LOG
        1709state_waiting_parallel_taskWaiting for end of parallel task(s)
        1710state_registeredRegistered
        1711state_waiting_othersQueued
        1799state_abendedDead
        1800state_abendedENDED_NOT_OK - aborted
        1801state_abendedENDED_NOT_OK - aborted because of SYNC condition
        1802state_abendedENDED_JP_ABEND - not executed due to abnormal Workflow end.
        1810state_abendedENDED_VANISHED - disappeared
        1815state_abendedENDED_LOST - ended undefined (host terminated prematurely).
        1820state_abendedFAULT_OTHER - Start impossible. Other error.
        1821state_abendedFAULT_NO_HOST - Start impossible. Cannot reach host.
        1822state_abendedFAULT_ALREADY_RUNNING - task is already running.
        1823state_abendedFAULT_POST_PROCESSING - error in post processing.
        1824state_abendedFAULT_POST_CONDITION - Error in Postcondition.
        1825state_fault_backupFAULT_CUSTOM_BACKUP - Error in custom backup
        1826state_fault_backupFAULT_FILE_BACKUP - Error in file backup
        1827state_fault_rollbackFAULT_CUSTOM_ROLLBACK - Error in custom rollback
        1828state_fault_rollbackFAULT_FILE_ROLLBACK - Error in file rollback
        1829state_abendedFAULT_HOSTGROUP_ROLLBACK - Error in AgentGroup rollback
        1830state_abendedFAULT_ROLLBACK - General error in rollback
        1850state_abendedENDED_CANCEL - manually canceled
        1851state_abendedENDED_JP_CANCEL - Workflow canceled manually.
        1852state_abendedRejected
        1853state_abendedENDED_QUEUE_CANCEL
        1854state_abendedENDED_CONTAINER_CANCEL
        1856state_abendedENDED_ESCALATED - aborted due to escalation
        1860state_abendedNotification failed
        1898state_blockingBlocked
        1899state_abendedStatus blocked manually removed
        1900state_endedENDED_OK - ended normally
        1901state_inactiveConfirmed
        1902state_inactiveENDED_QUEUE_END
        1903state_inactiveENDED_CONTAINER_END
        1904state_ended_rollbackedENDED_ROLLBACKED - Task was rolled back successfully.
        1905state_inactiveENDED_WF_ROLLBACKED
        1910state_inactiveENDED_EMPTY - task is empty (STOP NOMSG).
        1911state_inactiveENDED_TRUNCATE - Transfer incomplete due to line limit.
        1912state_inactiveENDED_EMPTY - nothing found.
        1913state_rollback_emptyENDED_ROLLBACK_EMPTY - No rollback defined
        1919state_inactiveENDED_INACTIVE - inactive due to logical date condition of external dependency.
        1920state_inactive_caleENDED_INACTIVE - Inactive today because of Calendar.
        1921state_inactive_defENDED_INACTIVE - task not active due to definition
        1922state_inactive_manENDED_INACTIVE - Task was manually set inactive.
        1923state_inactiveDeleted
        1924state_inactiveUNPROCESSED
        1925state_inactive_objectENDED_INACTIVE_OBJECT - Object is inactive due to definition.
        1930state_inactiveENDED_SKIPPED - Skipped because of WHEN clause
        1931state_inactiveENDED_SKIPPED - Skipped because of SYNC condition.
        1932state_inactiveENDED_SKIPPED - Schedule ended prematurely
        1933state_inactiveENDED_SKIPPED - Skipped because of conditions.
        1940state_inactiveENDED_TIMEOUT - Not executed because of timeout (WHEN clause).
        1941state_inactiveENDED_TIMEOUT - Start time exceeded.
        1942state_inactiveENDED_TIMEOUT - ended untimely.
        1944state_inactiveENDED_TIMEOUT - period stopped
        1960state_inactiveNotification successful
        1970state_inactiveOperation successful
        1999state_inactiveSYNC check passed
        Returns:
        Status code or -1 in case of an error
      • getStatusIcon

        protected static java.lang.String getStatusIcon​(int status,
                                                        int restart)
        Creates a status icon based on the status code.
        Parameters:
        status - Integer between 1000 and 2000
        restart - Restart value, zero means no restart
        Returns:
        Name of the status icon
      • getPeriodDescription

        public final java.lang.String getPeriodDescription()
        Returns the period description of the task.
        Returns:
        period description of the task
      • getObjectName

        public java.lang.String getObjectName()
        In contrast to the getName this method returns always the object name.
        Returns:
        the name of the object.
      • getAlias

        public UC4Alias getAlias()
        In contrast to getName this method returns always the alias if used.
        Specified by:
        getAlias in interface HasAlias
        Returns:
        the alias as String or empty String no alias is used.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • initObjectNameAndAlias

        protected final void initObjectNameAndAlias​(java.lang.String attrName,
                                                    java.lang.String attrOriginalName)
      • getRuntimeInMillis

        public long getRuntimeInMillis()
        Returns the runtime string into milliseconds
        Returns:
        the runtime in milliseconds