Class JobPlanMonitor.Task

  • Enclosing class:
    JobPlanMonitor

    public static class JobPlanMonitor.Task
    extends java.lang.Object
    Task in the ProcessFlow monitor.
    • Field Detail

      • DELETED_LINE_STATE

        public static final int DELETED_LINE_STATE
        Constant for lines that have been deleted.
        See Also:
        Constant Field Values
    • Method Detail

      • getLnr

        public java.lang.String getLnr()
        Returns the activation order number of this task.
        Returns:
        Task LNR
      • getEarliestStart

        public DateTime getEarliestStart()
        Returns the earliest start time if configured.
        Returns:
        Earliest start time stamp or an empty DateTime object
      • getExternalParent

        public UC4ObjectName 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

        public java.lang.String getObjectType()
        Returns the type of the Object.
        Returns:
        Object type
      • getStartTime

        public Time getStartTime()
        Returns:
        Start time
      • getStartTimestamp

        public DateTime getStartTimestamp()
        Returns:
        Start timestamp
      • getName

        public java.lang.String getName()
        Returns:
        Name of the UC4 Object
      • getRunID

        public int getRunID()
        Returns:
        RunID of the Task or -1 if not available.
      • getTaskID

        public java.lang.String 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

        public java.lang.String 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

        public java.lang.String 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

        public void addPredecessor​(JobPlanMonitor.Task pre,
                                   TaskState state)
        Adds a dependency to this monitor task.
        Parameters:
        pre - Predecessor task
        state - When or null if no status should be set
      • predecessors

        public java.util.Iterator<JobPlanMonitor.Task> predecessors()
        Returns:
        Iterator over predecessors tasks.
      • getPredecessorState

        public TaskState getPredecessorState​(JobPlanMonitor.Task t)
        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

        public java.lang.Long 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

        public void setEstimatedStartTime​(java.lang.Long estimatedStartTime)
        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

        public java.lang.String getObjectSubType()
        Returns the SubType of the Object.
        Returns:
        Object SubType
      • getTrafficLight

        public java.lang.String getTrafficLight()
        Returns:
        TrafficLight
      • 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: 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

        public java.lang.String getCaption()
        Returns the caption of the task.
        Returns:
        Caption of the task
      • getAlias

        public java.lang.String getAlias()
        Returns the Alias of the task.
        Returns:
        Alias of the task
      • getComponentName

        public java.lang.String getComponentName()
        Returns the Component Name of the task.
        Returns:
        Component Name of the task
      • variableNameIterator

        public java.util.Iterator<java.lang.String> variableNameIterator()
        Returns an iterator over variable names. All variable names have the type java.lang.String
        Returns:
        Iterator
      • getVariable

        public java.lang.String getVariable​(java.lang.String variableName)
        Returns the value of a given variable. The method returns null if the variable name does not exist.
        Parameters:
        variableName - variable name
        Returns:
        Variable value or null if the variable does not exist
      • parentVariableNameIterator

        public java.util.Iterator<java.lang.String> parentVariableNameIterator()
        Returns an iterator over parent variable names. All parent variable names have the type java.lang.String
        Returns:
        Iterator
      • getParentVariable

        public java.lang.String getParentVariable​(java.lang.String variableName)
        Returns the value of a given parent variable. The method returns null 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

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

        public java.lang.String getTaskMonitorType()
        Method to fetch the task Monitor type.
        Returns:
        monitor type of the task.
      • isExternal

        public boolean isExternal()
        Returns true if this task is an external dependency.
        Returns:
        True if this task is an external dependency
      • calendar

        public TaskCalendar calendar()
        Gets the calendar condition of this JobPlan task. If this method is called on the START or END task an IllegalStateException is thrown.
        Returns:
        Calendar conditions
      • external

        public JobPlanExternal external()
        Gets properties for external dependencies. If this method is called and the JobPlan task is not an external dependency an IllegalStateException is thrown.
        Returns:
        Settings for external dependency
      • runtime

        public JobPlanMonitor.JobPlanMonitorRuntime runtime()
        Gets the runtime settings of this JobPlanMonitor task. If this method is called on the START or END task an IllegalStateException is thrown.
        Returns:
        Runtime settings
      • preConditions

        public ConditionsSet preConditions()
        Gets preconditions of this JobPlanMonitor task.
        Returns:
        Preconditions.
      • postConditions

        public ConditionsSet postConditions()
        Gets postconditions of this JobPlanMonitor task.
        Returns:
        Postconditions.
      • forEach

        public com.uc4.communication.requests.JobPlanMonitor.JobPlanMonitorForEach forEach()
        Gets LoopDataSource property of this JobPlanMonitor task.
        Returns:
        LoopDataSource property.