Class JobPlanMonitor

    • Constructor Detail

      • JobPlanMonitor

        public JobPlanMonitor​(int runID,
                              boolean active)
        Constructs a new JobPlanMonitor request.
        Parameters:
        runID - RunID
        active - true if the monitor should be read from the activity window, false if the statistics should be queried
    • Method Detail

      • createRequest

        protected void createRequest​(com.uc4.util.XMLDocument doc,
                                     org.w3c.dom.Element request,
                                     ConnectionAttributes sessionInfo)
        Description copied from class: XMLRequest
        Creates the XML Document for the request. This method is used internally.
        Specified by:
        createRequest in class XMLRequest
        Parameters:
        doc - Document, used to create new Elements
        request - Request Element - classes append information to this request element
        sessionInfo - Information about the session
      • getSrc

        protected java.lang.String getSrc()
        Description copied from class: XMLRequest
        Returns the request source. This method is used internally.
        Specified by:
        getSrc in class XMLRequest
        Returns:
        Source
      • setIncludeTaskProperties

        public void setIncludeTaskProperties​(boolean includeTaskProperties)
        If this method is set to true, the properties of task are also returned in the monitor. The value should be set to false if the values are not used in order to improve the performance for large Workflows.
        Parameters:
        includeTaskProperties - true to include properties of each task in the response.
      • isWrongMonitor

        public boolean isWrongMonitor()
        Returns true if no workflow monitor data was returned. This can happen for example if the RunID of a Schedule was used.
        Returns:
        true if the response of this request did not contain a valid workflow monitor, false if the monitor type is ok.
      • size

        public int size()
        Returns the number of tasks in the ProcessFlow.
        Returns:
        Number of tasks
      • handleContent

        protected void handleContent​(com.uc4.util.XMLDocument doc,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Sub classes extract the values from the XML document and provide public getter methods.
        Overrides:
        handleContent in class XMLRequest
        Parameters:
        doc - XML Document
        session - Info about the user session
      • createTask

        protected JobPlanMonitor.Task createTask​(org.w3c.dom.Element taskElement,
                                                 ConnectionAttributes session,
                                                 JobPlanMonitor monitor)
        Creates a task in the Workflow monitor. Sub classes may override this method.
        Parameters:
        taskElement - XML Element of the task
        session - Session Info
        monitor - Monitor instance
        Returns:
        Task
      • createTask

        protected JobPlanMonitor.Task createTask​(org.w3c.dom.Element taskElement,
                                                 ConnectionAttributes session,
                                                 JobPlanMonitor monitor,
                                                 com.uc4.util.XMLDocument doc)
        Creates a task in the Workflow monitor. Sub classes may override this method.
        Parameters:
        taskElement - XML Element of the task
        session - Session Info
        monitor - Monitor instance
        doc - XMLDocument instance
        Returns:
        Task
      • getTaskByRunID

        public JobPlanMonitor.Task getTaskByRunID​(int runID)
        Returns the task with the specified runID.
        Parameters:
        runID - runID of the task
        Returns:
        Task or null if not found
      • getTaskByRunIDWithType

        public JobPlanMonitor.Task getTaskByRunIDWithType​(int runID,
                                                          java.lang.String objectType)
        Returns the task with the specified runID and Type.
        Parameters:
        runID - runID of the task
        objectType - objectType of the task
        Returns:
        Task or null if not found
      • getFirstTaskByName

        public JobPlanMonitor.Task getFirstTaskByName​(java.lang.String name)
        Returns the first task in the JobPlan monitor which has the specified object name.
        Parameters:
        name - Name of the UC4 object
        Returns:
        Task or null if not found
      • getTaskByLnr

        public JobPlanMonitor.Task getTaskByLnr​(java.lang.String lnr)
        Returns the task with the specified activation number.
        Parameters:
        lnr - Activation number
        Returns:
        Task or null if not found
      • isModificationMode

        public boolean isModificationMode()
        Returns true if this instance of the JobPlanMonitor class represents a ProcessFlow which has been opened for modification.
        Returns:
        true if in modification mode, false otherwise
      • taskIterator

        @Deprecated
        public java.util.Iterator<JobPlanMonitor.Task> taskIterator()
        Deprecated.
        use iterator() instead
        Returns:
        Iterator over JobPlanMonitor.Task
      • getRunID

        public int getRunID()
        returns the RunID of the ProcessFlow.
        Returns:
        RunID
      • getStartTask

        public JobPlanMonitor.Task getStartTask()
        Returns the start task.
        Returns:
        START task
      • getSubType

        public java.lang.String getSubType()
        Returns the SubType of the Workflow.
        Returns:
        Workflow SubTyp
      • 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 estimated runtime.
      • isActive

        public boolean isActive()
        Returns true if the monitor was read form the activity window.
        Returns:
        true if active, otherwise false
      • isAllowedInClientZero

        protected boolean isAllowedInClientZero()
        Description copied from class: XMLRequest
        This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
        Overrides:
        isAllowedInClientZero in class XMLRequest
        Returns:
        true if this request is allowed in client 0, false otherwise