Package com.uc4.api
Class AbstractTask
- java.lang.Object
-
- com.uc4.api.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).
-
-
Field Summary
Fields Modifier and Type Field Description protected DateTime
activationTime
protected UC4Alias
alias
protected java.lang.String
archiveKey1
protected java.lang.String
archiveKey2
protected java.lang.String
cauVersion
protected boolean
comment
protected DateTime
endTime
protected java.lang.String
host
protected java.lang.String
intAccount
protected boolean
monitoredTask
protected java.lang.String
name
protected java.lang.String
objectName
protected int
parentRunID
protected java.lang.String
periodDescription
protected java.lang.String
platform
protected java.lang.String
queue
protected java.lang.String
remoteStatus
protected int
returnCode
protected boolean
rollback
protected int
runID
protected java.lang.String
runtime
protected DateTime
startTime
protected java.lang.String
startType
protected java.lang.String
state
protected java.lang.String
stateIcon
protected java.lang.String
stateWithinParent
protected int
statusCode
protected java.lang.String
statusText
protected java.lang.String
type
protected java.lang.String
typeIcon
protected java.lang.String
userId
protected int
version
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractTask(ConnectionAttributes session)
-
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 togetName
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() insteadDateTime
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 thegetName
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 millisecondsDateTime
getStart()
Deprecated.use getStartTime() insteadDateTime
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()
Returnstrue
if this statistic item has an attached comment.protected void
initObjectNameAndAlias(java.lang.String attrName, java.lang.String attrOriginalName)
boolean
isMonitoredTask()
Returnstrue
if this task is JOBD which is monitored by the Automation Engine.boolean
isRollback()
Returnstrue
if this task supports rollback.protected void
setUserInfo(java.lang.String user)
java.lang.String
toString()
-
-
-
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
-
endTime
protected DateTime endTime
-
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
-
alias
protected UC4Alias alias
-
-
Constructor Detail
-
AbstractTask
protected AbstractTask(ConnectionAttributes session)
-
-
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()
Returnstrue
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()
Returnstrue
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()
Returnstrue
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. UsegetObjectName
andgetAlias
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() insteadReturns 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() insteadReturns 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() 1005 state_waiting Actually running 1006 state_waiting Checked 1008 state_waiting Aborted 1009 state_waiting Done 1300 state_waiting Preparing 1301 state_waiting_others Waiting for user input 1310 state_waiting operation not initialized 1510 state_running Transferred 1520 state_running Ready for transfer (before Connect) 1521 state_running Ready to be transferred 1529 state_running Ready for generation 1530 state_running Ready for start 1531 state_running To be called 1540 state_running Start initiated 1541 state_running Checking 1542 state_running Calling 1543 state_waiting_others Unknown 1544 state_inconsistent Inconsistent 1545 state_running Started 1546 state_running Connecting 1547 state_inconsistent Inconsistent RemoteTaskManager 1550 state_running Active 1551 state_running Transferring 1552 state_waiting_others Called 1553 state_waiting_others Accepted 1554 state_running Sampling files 1556 state_waiting_others Escalated 1557 state_backup Custom Backup 1558 state_backup File Backup 1560 state_jp_blocking Workflow is blocked 1561 state_stopped_sys STOP - Client-wide stop of automatic processing 1562 state_holded HELD - Manual stop has been set 1563 state_stopped_man STOP - Automatic processing has been stopped. 1564 state_stopped_queue STOP - Queue processing has been stopped. 1565 state_running Finished sending task 1566 state_running Skipping - Timeout 1567 state_running Skipping - Conditions 1568 state_running Skipping - manually inactive 1569 state_running Skipping Sync 1570 state_running Skipping 1571 state_running Canceling 1572 state_running Generating 1573 state_running Generated 1574 state_running Post processing 1575 state_ending Ending 1576 state_running Regenerating 1578 state_running Scanning Files 1579 state_running Scanning reports 1580 state_running Resolving variables 1581 state_running Checking Postconditions 1582 state_running Checking prompt values 1583 state_running LOOPING 1584 state_running Calculating ERT 1590 state_rollback Custom Rollback 1591 state_rollback File Rollback 1592 state_rollback AgentGroup Rollback 1593 state_rollback Workflow Rollback 1599 state_waiting Alive user view 1600 state_waiting Internal checking 1655 state_waiting_rollback Waiting for rollback 1665 state_waiting_others Waiting for externally resolved parameters 1681 state_waiting_others Waiting for User 1682 state_waiting_others Waiting for continuation of variable resolving 1684 state_waiting_queue Waiting for Queue slot 1685 state_waiting_host Waiting for post processing host 1686 state_waiting_others Waiting for start of AgentGroup container. 1687 state_waiting_others Waiting for end of parallel host-group tasks 1688 state_waiting_host Waiting for the host of an AgentGroup. 1689 state_waiting_resource Waiting for resource (max. FileTransfers exceeded) 1690 state_waiting_ext Waiting for external dependency 1691 state_waiting Waiting for remote system 1692 state_waiting Waiting for remote SYNC 1693 state_waiting_mrel Waiting for manual release 1694 state_waiting_resource Waiting for resource (max. Jobs exceeded) 1695 state_waiting Waiting for restart time 1696 state_waiting_host Waiting for host 1697 state_waiting_sync Waiting for SYNC 1698 state_waiting_time Waiting for start time 1699 state_waiting Alive 1700 state_waiting Waiting for predecessor 1701 state_sleeping Sleeping 1702 state_waiting Not yet called 1703 state_waiting_precond Waiting for Preconditions 1704 state_running Checking Preconditions 1705 state_running CHANGING_LOG 1709 state_waiting_parallel_task Waiting for end of parallel task(s) 1710 state_registered Registered 1711 state_waiting_others Queued 1799 state_abended Dead 1800 state_abended ENDED_NOT_OK - aborted 1801 state_abended ENDED_NOT_OK - aborted because of SYNC condition 1802 state_abended ENDED_JP_ABEND - not executed due to abnormal Workflow end. 1810 state_abended ENDED_VANISHED - disappeared 1815 state_abended ENDED_LOST - ended undefined (host terminated prematurely). 1820 state_abended FAULT_OTHER - Start impossible. Other error. 1821 state_abended FAULT_NO_HOST - Start impossible. Cannot reach host. 1822 state_abended FAULT_ALREADY_RUNNING - task is already running. 1823 state_abended FAULT_POST_PROCESSING - error in post processing. 1824 state_abended FAULT_POST_CONDITION - Error in Postcondition. 1825 state_fault_backup FAULT_CUSTOM_BACKUP - Error in custom backup 1826 state_fault_backup FAULT_FILE_BACKUP - Error in file backup 1827 state_fault_rollback FAULT_CUSTOM_ROLLBACK - Error in custom rollback 1828 state_fault_rollback FAULT_FILE_ROLLBACK - Error in file rollback 1829 state_abended FAULT_HOSTGROUP_ROLLBACK - Error in AgentGroup rollback 1830 state_abended FAULT_ROLLBACK - General error in rollback 1850 state_abended ENDED_CANCEL - manually canceled 1851 state_abended ENDED_JP_CANCEL - Workflow canceled manually. 1852 state_abended Rejected 1853 state_abended ENDED_QUEUE_CANCEL 1854 state_abended ENDED_CONTAINER_CANCEL 1856 state_abended ENDED_ESCALATED - aborted due to escalation 1860 state_abended Notification failed 1898 state_blocking Blocked 1899 state_abended Status blocked manually removed 1900 state_ended ENDED_OK - ended normally 1901 state_inactive Confirmed 1902 state_inactive ENDED_QUEUE_END 1903 state_inactive ENDED_CONTAINER_END 1904 state_ended_rollbacked ENDED_ROLLBACKED - Task was rolled back successfully. 1905 state_inactive ENDED_WF_ROLLBACKED 1910 state_inactive ENDED_EMPTY - task is empty (STOP NOMSG). 1911 state_inactive ENDED_TRUNCATE - Transfer incomplete due to line limit. 1912 state_inactive ENDED_EMPTY - nothing found. 1913 state_rollback_empty ENDED_ROLLBACK_EMPTY - No rollback defined 1919 state_inactive ENDED_INACTIVE - inactive due to logical date condition of external dependency. 1920 state_inactive_cale ENDED_INACTIVE - Inactive today because of Calendar. 1921 state_inactive_def ENDED_INACTIVE - task not active due to definition 1922 state_inactive_man ENDED_INACTIVE - Task was manually set inactive. 1923 state_inactive Deleted 1924 state_inactive UNPROCESSED 1925 state_inactive_object ENDED_INACTIVE_OBJECT - Object is inactive due to definition. 1930 state_inactive ENDED_SKIPPED - Skipped because of WHEN clause 1931 state_inactive ENDED_SKIPPED - Skipped because of SYNC condition. 1932 state_inactive ENDED_SKIPPED - Schedule ended prematurely 1933 state_inactive ENDED_SKIPPED - Skipped because of conditions. 1940 state_inactive ENDED_TIMEOUT - Not executed because of timeout (WHEN clause). 1941 state_inactive ENDED_TIMEOUT - Start time exceeded. 1942 state_inactive ENDED_TIMEOUT - ended untimely. 1944 state_inactive ENDED_TIMEOUT - period stopped 1960 state_inactive Notification successful 1970 state_inactive Operation successful 1999 state_inactive SYNC 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 2000restart
- 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 thegetName
this method returns always the object name.- Returns:
- the name of the object.
-
getAlias
public UC4Alias getAlias()
In contrast togetName
this method returns always the alias if used.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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
-
-