Package com.uc4.api
Class AbstractTask
java.lang.Object
com.uc4.api.AbstractTask
- All Implemented Interfaces:
HasAlias
- Direct Known Subclasses:
StatisticSearchItem
,Task
This is the base class of tasks (active or archived).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DateTime
protected UC4Alias
protected String
protected String
protected String
protected boolean
protected DateTime
protected String
protected String
protected boolean
protected String
protected String
protected int
protected String
protected String
protected String
protected String
protected int
protected boolean
protected int
protected String
protected DateTime
protected String
protected String
protected String
protected String
protected int
protected String
protected String
protected String
protected String
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the date and time of object activation.getAlias()
In contrast togetName
this method returns always the alias if used.final String
Returns the first archive key of this task.final String
Returns the second archive key of this task.Returns the first archive key of the object.Returns the second archive key of the object.Returns the Version of the Agent.final String
Deprecated.Use getTaskClient() insteadReturns the date and time of object end.final String
getHost()
Returns the name of the destination Agent.Returns the used account of the object.final String
getName()
Returns the name of the object or an alias if used.In contrast to thegetName
this method returns always the object name.final int
Returns the RunID of the parent.final String
Returns the period description of the task.Returns the platform of the object or an empty String if a platform is not defined for the object.getQueue()
Returns the name of the Queue or an empty String.Returns the remote status of this task.int
Returns the return code which has ended the object.final int
getRunID()
Running number of the execution.Returns the time used for the execution of the task.long
Returns the runtime string into millisecondsfinal DateTime
getStart()
Deprecated.use getStartTime() insteadReturns the date and time of object start.Returns the method used for the start.final String
Returns a description of the status.final String
Returns the status of this task as String which is independent on the logon language.int
Returns the status of the task as integer.protected static String
getStatusIcon
(int status, int restart) Creates a status icon based on the status code.Returns a description of the status.int
Returns the client of the task in the Automation Engine.final String
getType()
Returns the type of the object.final String
Returns a description of the status.final String
Returns the signature of the user.final UC4UserName
Returns the name of the User object of the person who has started the task.int
Returns the value of the version column.boolean
Returnstrue
if this statistic item has an attached comment.protected final void
initObjectNameAndAlias
(String attrName, String attrOriginalName) boolean
Returnstrue
if this task is JOBD which is monitored by the Automation Engine.boolean
Returnstrue
if this task supports rollback.protected void
setUserInfo
(String user) toString()
-
Field Details
-
name
-
type
-
runID
protected int runID -
parentRunID
protected int parentRunID -
startTime
-
endTime
-
statusText
-
host
-
userId
-
archiveKey1
-
archiveKey2
-
state
-
stateWithinParent
-
platform
-
queue
-
typeIcon
-
startType
-
stateIcon
-
rollback
protected boolean rollback -
remoteStatus
-
runtime
-
periodDescription
-
comment
protected boolean comment -
monitoredTask
protected boolean monitoredTask -
cauVersion
-
returnCode
protected int returnCode -
intAccount
-
activationTime
-
version
protected int version -
statusCode
protected int statusCode -
objectName
-
alias
-
-
Constructor Details
-
AbstractTask
-
-
Method Details
-
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
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
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
Returns the time used for the execution of the task.- Returns:
- time used for the execution of the task
-
getIntAccount
Returns the used account of the object.- Returns:
- Account of the object
-
getStartType
Returns the method used for the start.- Returns:
- Method used for the start
-
getQueue
Returns the name of the Queue or an empty String.- Returns:
- Queue
-
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
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
Returns the first archive key of this task.- Returns:
- first archive key
-
getArchive2
Returns the second archive key of this task.- Returns:
- second archive key
-
getArchiveKey1
Returns the first archive key of the object.- Returns:
- First archive key
-
getArchiveKey2
Returns the second archive key of the object.- Returns:
- Second archive key
-
getHost
Returns the name of the destination Agent.- Returns:
- host
-
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.use getStartTime() insteadReturns a calendar object which contains the Start date and time.- Returns:
- Start date and time
-
getStartTime
Returns the date and time of object start.- Returns:
- Date and time of object start.
-
getEndTime
Returns the date and time of object end.- Returns:
- Date and time of object end
-
getUserId
Returns the signature of the user.- Returns:
- Login info from the login object
-
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
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
Returns the type of the object.- Returns:
- type of the object.
-
getStateIcon
Returns a description of the status.- Returns:
- description for task status
-
getTypeIcon
Returns a description of the status.- Returns:
- description for task status
-
getUserName
Returns the name of the User object of the person who has started the task.- Returns:
- UC4 User
-
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
-
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
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
Returns the period description of the task.- Returns:
- period description of the task
-
getObjectName
In contrast to thegetName
this method returns always the object name.- Returns:
- the name of the object.
-
getAlias
In contrast togetName
this method returns always the alias if used. -
toString
-
initObjectNameAndAlias
-
getRuntimeInMillis
public long getRuntimeInMillis()Returns the runtime string into milliseconds- Returns:
- the runtime in milliseconds
-