Package com.uc4.communication.requests
Class JobPlanMonitor.Task
java.lang.Object
com.uc4.communication.requests.JobPlanMonitor.Task
- Enclosing class:
- JobPlanMonitor
Task in the ProcessFlow monitor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant for lines that have been deleted. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Task
(Element task, ConnectionAttributes session, JobPlanMonitor parent) protected
Task
(Element task, ConnectionAttributes session, JobPlanMonitor parent, com.uc4.util.XMLDocument doc) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredecessor
(JobPlanMonitor.Task pre, TaskState state) Adds a dependency to this monitor task.calendar()
Gets the calendar condition of this JobPlan task.external()
Gets properties for external dependencies.forEach()
Gets LoopDataSource property of this JobPlanMonitor task.getAlias()
Returns the Alias of the task.Returns the caption of the task.Returns the Component Name of the task.Returns the earliest start time if configured.int
Returns the estimated runtime in seconds.Gets the estimated start time in millis for when the entry is supposed to be executed.Returns the name of the external parent or an empty UC4ObjectName.getLnr()
Returns the activation order number of this task.getName()
Returns the SubType of the Object.Returns the type of the Object.protected JobPlanMonitor
Return theJobPlanMonitor
instancegetParentVariable
(String variableName) Returns the value of a given parent variable.Returns the status of the predecessor.int
getRunID()
Returns the 1st status value of this task as String which is independent on the logon language.Returns the 2nd status value (nullable) of this task as String which is independent on the logon language.int
Returns the status of the task as integer.Returns a description of the status.Returns a unique ID of a task.Method to fetch the task Monitor type.getVariable
(String variableName) Returns the value of a given variable.int
getX()
Returns the position of this task.int
getY()
Returns the position of this task.boolean
boolean
Returnstrue
if this task is an external dependency.Returns an iterator over parent variable names.Gets postconditions of this JobPlanMonitor task.Gets preconditions of this JobPlanMonitor task.int
runtime()
Gets the runtime settings of this JobPlanMonitor task.void
setEstimatedRunTime
(int ert) Sets the estimated runtime in seconds for the entry.void
setEstimatedStartTime
(Long estimatedStartTime) Sets the estimated start time in millis for when the entry is supposed to be executed.toString()
Returns an iterator over variable names.
-
Field Details
-
DELETED_LINE_STATE
public static final int DELETED_LINE_STATEConstant for lines that have been deleted.- See Also:
-
-
Constructor Details
-
Task
protected Task(Element task, ConnectionAttributes session, JobPlanMonitor parent, com.uc4.util.XMLDocument doc) -
Task
-
-
Method Details
-
getParent
Return theJobPlanMonitor
instance- Returns:
-
getLnr
Returns the activation order number of this task.- Returns:
- Task LNR
-
getEarliestStart
Returns the earliest start time if configured.- Returns:
- Earliest start time stamp or an empty DateTime object
-
getExternalParent
Returns the name of the external parent or an empty UC4ObjectName. Use the method UC4ObjectName.isEmpty() to test if an external parent has been defined.- Returns:
- UC4ObjectName containing the external parent or an empty UC4ObjectName if there no external parent.
-
getObjectType
Returns the type of the Object.- Returns:
- Object type
-
getStartTime
- Returns:
- Start time
-
getStartTimestamp
- Returns:
- Start timestamp
-
getName
- Returns:
- Name of the UC4 Object
-
getRunID
public int getRunID()- Returns:
- RunID of the Task or
-1
if not available.
-
getTaskID
Returns a unique ID of a task. This is normally the same as the RunID. Some tasks like START and END have values containing a forward slash.- Returns:
- Task ID
-
getStatus
Returns the 1st status value of this task as String which is independent on the logon language.- Returns:
- status, possible return values are described in the status table:
AbstractTask.getStatusCode()
-
getStatus2
Returns the 2nd status value (nullable) of this task as String which is independent on the logon language.- Returns:
- status, possible return values are described in the status table:
AbstractTask.getStatusCode()
-
predecessorsWithDottedLines
public int predecessorsWithDottedLines()- Returns:
- Number of predecessors with dotted lines.
-
addPredecessor
Adds a dependency to this monitor task.- Parameters:
pre
- Predecessor taskstate
- When ornull
if no status should be set
-
predecessors
- Returns:
- Iterator over predecessors tasks.
-
getPredecessorState
Returns the status of the predecessor.- Parameters:
t
- predecessor task- Returns:
- Status
-
getX
public int getX()Returns the position of this task.- Returns:
- Column starting with 1
-
getY
public int getY()Returns the position of this task.- Returns:
- Row starting with 1
-
getEstimatedRunTime
public int getEstimatedRunTime()Returns the estimated runtime in seconds.- Returns:
- Estimated Runtime in seconds
-
setEstimatedRunTime
public void setEstimatedRunTime(int ert) Sets the estimated runtime in seconds for the entry.- Parameters:
ert
- The new estimated runtime in seconds.
-
getEstimatedStartTime
Gets the estimated start time in millis for when the entry is supposed to be executed. It can be null in case there is no estimated start time (i.e. disabled, already ran, etc). This will be filled by the critical path service.- Returns:
- The estimated start time of the entry in millis.
-
setEstimatedStartTime
Sets the estimated start time in millis for when the entry is supposed to be executed. It can be null in case there is no estimated start time (i.e. disabled, already ran, etc). This will be filled by the critical path service.- Parameters:
estimatedStartTime
- The estimated start time in UTC millis.
-
getObjectSubType
Returns the SubType of the Object.- Returns:
- Object SubType
-
getTrafficLight
- Returns:
- TrafficLight
-
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:
AbstractTask.getStatusCode()
-
getStatusCode
public int getStatusCode()Returns the status of the task as integer.- Returns:
- Status code or
-1
in case of an error. Possible return values are described in the status:AbstractTask.getStatusCode()
-
getCaption
Returns the caption of the task.- Returns:
- Caption of the task
-
getAlias
Returns the Alias of the task.- Returns:
- Alias of the task
-
getComponentName
Returns the Component Name of the task.- Returns:
- Component Name of the task
-
variableNameIterator
Returns an iterator over variable names. All variable names have the typejava.lang.String
- Returns:
- Iterator
-
getVariable
Returns the value of a given variable. The method returnsnull
if the variable name does not exist.- Parameters:
variableName
- variable name- Returns:
- Variable value or
null
if the variable does not exist
-
parentVariableNameIterator
Returns an iterator over parent variable names. All parent variable names have the typejava.lang.String
- Returns:
- Iterator
-
getParentVariable
Returns the value of a given parent variable. The method returnsnull
if the variable name does not exist.- Parameters:
variableName
- parent variable name- Returns:
- Parent variable value or
null
if the variable does not exist
-
hasComment
public boolean hasComment()- Returns:
true
if this task item has an attached comment.
-
toString
-
getTaskMonitorType
Method to fetch the task Monitor type.- Returns:
- monitor type of the task.
-
isExternal
public boolean isExternal()Returnstrue
if this task is an external dependency.- Returns:
- True if this task is an external dependency
-
calendar
Gets the calendar condition of this JobPlan task. If this method is called on the START or END task anIllegalStateException
is thrown.- Returns:
- Calendar conditions
-
external
Gets properties for external dependencies. If this method is called and the JobPlan task is not an external dependency anIllegalStateException
is thrown.- Returns:
- Settings for external dependency
-
runtime
Gets the runtime settings of this JobPlanMonitor task. If this method is called on the START or END task anIllegalStateException
is thrown.- Returns:
- Runtime settings
-
preConditions
Gets preconditions of this JobPlanMonitor task.- Returns:
- Preconditions.
-
postConditions
Gets postconditions of this JobPlanMonitor task.- Returns:
- Postconditions.
-
forEach
Gets LoopDataSource property of this JobPlanMonitor task.- Returns:
- LoopDataSource property.
-