Class JobPlanTask

  • All Implemented Interfaces:
    ITaskItem

    public class JobPlanTask
    extends java.lang.Object
    implements ITaskItem
    Task in the JobPlan.
    • Constructor Summary

      Constructors 
      Constructor Description
      JobPlanTask​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element task, ConnectionAttributes session)
      Constructs a JobPlanTask from the specified XML document.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      TaskCalendar calendar()
      Gets the calendar condition of this JobPlan task.
      JobPlanCheckpoint checkpoint()
      Deprecated.
      use the method general() instead
      void cloneProperties​(JobPlanTask toClone)
      Creates a deep copy of all task properties of the given task for this task, except the task values (prompts and variables).
      void clonePropertiesAndTaskValues​(JobPlanTask toClone)
      Creates a deep copy of all task properties of the given task for this task, including the task values (prompts and variables).
      JobPlanTask copy()
      Creates a copy of this task with only the properties set.
      JobPlanTask copyWithTaskValues()
      Creates a copy of this task, inclusive of TaskValues (Variables and PromptSets).
      JobPlanDependencies dependencies()
      Gets the dependencies of this JobPlan task.
      JobPlanEarliest earliest()
      Gets the earliest start time settings of this JobPlan task.
      JobPlanExternal external()
      Gets properties for external dependencies.
      ProcessFlowGeneral general()
      This methdo provides access to the "General" tab of a ProcessFlow task.
      UC4HostName getHostName()
      Returns the hostName for the JobPlan task if exist otherwise will return null
      java.lang.String getIdnr()
      Returns the ID of this or ScheduleTask task.
      int getLnr()
      Returns number containing the order of activation.
      java.lang.String getRaAgentName()  
      java.lang.String getRAJobType()
      Returns the Job type of this RA task.
      java.lang.String getRASubJobType()
      Gets the object Subtype of this RA task.
      java.lang.String getSubType()
      Gets the object Subtype of this task.
      java.lang.String getTaskIcon()
      Return the Task Icon
      java.lang.String getTaskName()
      Gets the name of this JobPlan task.
      java.lang.String getTaskTitle()
      Return the Title of the Task
      java.lang.String getTitleOrName()
      Return the Task Title if available else the name of the task object
      java.lang.String getType()
      Returns the object type of this task.
      java.lang.String getUserDefinedID()
      Returns the user defined ID of this task or null if not set.
      int getX()
      Returns the column number of this JobPlan task.
      int getY()
      Returns the row number of this JobPlan task.
      boolean hasCalendarCondition()  
      boolean hasRuntimeCondition()  
      protected boolean isAdded()  
      boolean isExternal()
      Returns true if this task is an external dependency.
      boolean isInactive()
      Return the status of the task
      ConditionsSet postConditions()
      This method provides access to the "Post-Conditions" of a JobPlan task.
      ConditionsSet preConditions()
      This method provides access to the "Pre-Conditions" of a JobPlan task.
      OCVPanel raPanel()
      If this task is an RA solution and the Workflow has been saved and reopened this method can be used to override RA panel values.
      TaskRuntime runtime()
      Gets the runtime settings of this JobPlan task.
      protected void setAdded​(boolean added)  
      void setExternal()
      Do not use - only for testing! Sets this task to type EXTERNAL
      protected void setIdnr​(java.lang.String idnr)  
      protected void setLnr​(int lnr)  
      protected void setTaskName​(java.lang.String taskName)  
      protected void setType​(java.lang.String type)  
      void setUserDefinedID​(java.lang.String userDefinedID)
      Sets the user defined task ID.
      void setX​(int x)
      Sets the column number of this task.
      void setY​(int y)
      Sets the row number of this task.
      org.w3c.dom.Element store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element jobpStruct)  
      java.lang.String toString()  
      TaskValues values()
      Provides access to the values and PromptSets of a Schedule or Workflow task.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JobPlanTask

        public JobPlanTask​(com.uc4.util.XMLDocument doc,
                           org.w3c.dom.Element task,
                           ConnectionAttributes session)
        Constructs a JobPlanTask from the specified XML document. Internal use only.
        Parameters:
        doc - XML document
        task - Task element
        session - Session info
    • Method Detail

      • store

        public org.w3c.dom.Element store​(com.uc4.util.XMLDocument doc,
                                         org.w3c.dom.Element jobpStruct)
        Parameters:
        doc - XMLDocument
        jobpStruct - Jobplan structure
        Returns:
        Element
      • getIdnr

        public java.lang.String getIdnr()
        Description copied from interface: ITaskItem
        Returns the ID of this or ScheduleTask task.
        Specified by:
        getIdnr in interface ITaskItem
        Returns:
        String containing the ID
      • setIdnr

        protected void setIdnr​(java.lang.String idnr)
      • checkpoint

        @Deprecated
        public JobPlanCheckpoint checkpoint()
        Deprecated.
        use the method general() instead
        Gets the checkpoint settings of this JobPlan task. If this method is called on the START task an IllegalStateException is thrown.
        Returns:
        Checkpoint settings
      • getUserDefinedID

        public java.lang.String getUserDefinedID()
        Returns the user defined ID of this task or null if not set.
        Returns:
        User defined task ID
      • setUserDefinedID

        public void setUserDefinedID​(java.lang.String userDefinedID)
        Sets the user defined task ID. This value can later be used to identify this task using the JobPlan.getTaskByUserID() method
        Parameters:
        userDefinedID - Any String with should be used to identify the task later
      • general

        public ProcessFlowGeneral general()
        This methdo provides access to the "General" tab of a ProcessFlow task. If this method is called on the START task an IllegalStateException is thrown.
        Returns:
        General settings
      • values

        public TaskValues values()
        Description copied from interface: ITaskItem
        Provides access to the values and PromptSets of a Schedule or Workflow task.
        Specified by:
        values in interface ITaskItem
        Returns:
        Values and PromptSets
      • raPanel

        public OCVPanel raPanel()
        If this task is an RA solution and the Workflow has been saved and reopened this method can be used to override RA panel values.
        Returns:
        Read and Write access to the XML names of the RA panel.
      • preConditions

        public ConditionsSet preConditions()
        This method provides access to the "Pre-Conditions" of a JobPlan task.
        Returns:
        ConditionSet which contains all Pre-Conditions
      • postConditions

        public ConditionsSet postConditions()
        This method provides access to the "Post-Conditions" of a JobPlan task.
        Returns:
        ConditionSet which contains all Post-Conditions
      • earliest

        public JobPlanEarliest earliest()
        Gets the earliest start time settings of this JobPlan task.
        Returns:
        Earliest start time settings
      • hasCalendarCondition

        public boolean hasCalendarCondition()
        Specified by:
        hasCalendarCondition in interface ITaskItem
        Returns:
        true if this task has a calendar condition.
      • hasRuntimeCondition

        public boolean hasRuntimeCondition()
        Specified by:
        hasRuntimeCondition in interface ITaskItem
        Returns:
        true if this task has a runtime condition.
      • 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.
        Specified by:
        calendar in interface ITaskItem
        Returns:
        Calendar conditions
      • runtime

        public TaskRuntime runtime()
        Gets the runtime settings of this JobPlan task. If this method is called on the START or END task an IllegalStateException is thrown.
        Specified by:
        runtime in interface ITaskItem
        Returns:
        Runtime settings
      • dependencies

        public JobPlanDependencies dependencies()
        Gets the dependencies of this JobPlan task.
        Returns:
        Dependencies
      • getTaskName

        public java.lang.String getTaskName()
        Gets the name of this JobPlan task.
        Specified by:
        getTaskName in interface ITaskItem
        Returns:
        Name of the task
      • getType

        public java.lang.String getType()
        Description copied from interface: ITaskItem
        Returns the object type of this task.
        Specified by:
        getType in interface ITaskItem
        Returns:
        Object type
      • getSubType

        public java.lang.String getSubType()
        Gets the object Subtype of this task.
        Returns:
        Object Subtype
      • getRASubJobType

        public java.lang.String getRASubJobType()
        Gets the object Subtype of this RA task.
        Returns:
        Object RaSubtype
      • getRAJobType

        public java.lang.String getRAJobType()
        Returns the Job type of this RA task.
        Returns:
        Object RaJobtype
      • getRaAgentName

        public java.lang.String getRaAgentName()
        Returns:
        the raAgentName
      • getX

        public int getX()
        Returns the column number of this JobPlan task. The first column starts with 1.
        Returns:
        Column number
      • getY

        public int getY()
        Returns the row number of this JobPlan task. The first row starts with 1.
        Returns:
        Row number
      • getLnr

        public int getLnr()
        Description copied from interface: ITaskItem
        Returns number containing the order of activation. A task with Lnr = 1 is executed first.
        Specified by:
        getLnr in interface ITaskItem
        Returns:
        Order of activation
      • setLnr

        protected void setLnr​(int lnr)
      • setX

        public void setX​(int x)
        Sets the column number of this task. The first column starts with 1. When the JobPlan is saved the position of all tasks is checked.
        Parameters:
        x - Column number
      • setY

        public void setY​(int y)
        Sets the row number of this task. The first row starts with 1. When the JobPlan is saved the position of all tasks is checked.
        Parameters:
        y - Row number
      • setTaskName

        protected void setTaskName​(java.lang.String taskName)
      • setType

        protected void setType​(java.lang.String type)
      • setExternal

        public void setExternal()
        Do not use - only for testing! Sets this task to type EXTERNAL
      • 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
      • toString

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

        protected boolean isAdded()
      • setAdded

        protected void setAdded​(boolean added)
      • isExternal

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

        public UC4HostName getHostName()
        Returns the hostName for the JobPlan task if exist otherwise will return null
        Returns:
        UC4HostName if exist for the JobPlanTask
      • getTitleOrName

        public java.lang.String getTitleOrName()
        Return the Task Title if available else the name of the task object
        Returns:
        A string representing the title or name
      • getTaskIcon

        public java.lang.String getTaskIcon()
        Return the Task Icon
        Returns:
        String representing the taskIcon
      • getTaskTitle

        public java.lang.String getTaskTitle()
        Return the Title of the Task
        Returns:
        String representing the job Title
      • isInactive

        public boolean isInactive()
        Return the status of the task
        Returns:
        boolean representing the status
      • copy

        public JobPlanTask copy()
        Creates a copy of this task with only the properties set.
        Returns:
        A new task with the properties duplicated from this task.
      • copyWithTaskValues

        public JobPlanTask copyWithTaskValues()
        Creates a copy of this task, inclusive of TaskValues (Variables and PromptSets).
        Returns:
        A new task with the properties duplicated from this task.
      • cloneProperties

        public void cloneProperties​(JobPlanTask toClone)
        Creates a deep copy of all task properties of the given task for this task, except the task values (prompts and variables).
        Parameters:
        toClone - The task whose properties to clone.
      • clonePropertiesAndTaskValues

        public void clonePropertiesAndTaskValues​(JobPlanTask toClone)
        Creates a deep copy of all task properties of the given task for this task, including the task values (prompts and variables).
        Parameters:
        toClone - The task whose properties and task values to clone.